Skip to main content

Operating System (OS) Interview Questions And Answers - Part X.



46. What Are Schedulers & What Are Types Of Schedulers?

Schedulers are special system software which handles process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run.

Schedulers are of three types:
  • Long Term Scheduler.
  • Short Term Scheduler.
  • Medium Term Scheduler.


47. Explain The Importance Of Long Term Scheduler, Short Term Scheduler & Medium Term Scheduler?

Long Term Scheduler is also called job scheduler. Long term scheduler determines which programs are admitted to the system for processing. Job scheduler selects processes from the queue and loads them into memory for execution. Process loads into the memory for CPU scheduling. The primary objective of the job scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound. It also controls the degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of processes leaving the system.

On some systems, the long term scheduler may not be available or minimal. Time-sharing operating systems have no long term scheduler. When process changes the state from new to ready, then there is use of long term scheduler.

Short Term Scheduler is also called CPU scheduler. Main objective is increasing system performance in accordance with the chosen set of criteria. It is the change of ready state to running state of the process. CPU scheduler selects process among the processes that are ready to execute and allocates CPU to one of them.

Short term scheduler also known as dispatcher, execute most frequently and makes the fine grained decision of which process to execute next. Short term scheduler is faster than long term scheduler.

Medium Term Scheduler removes the processes from the memory. It reduces the degree of multiprogramming. The medium term scheduler is in-charge of handling the swapped out-processes. Medium term scheduling is part of the swapping.


48. State The Difference Among Short-Term, Medium-Term & Long-Term Scheduling?

Short-term scheduling (or Dispatching) allocates CPU time to processes in memory. It determines which of the ready processes can have CPU resources, and for how long.

Medium-term scheduling swaps processes out of memory and reinstates them, to be run, at a later time, as in a time-sharing system. It determines when processes are to be suspended and resumed.

Long-term scheduling determines which programs are admitted to the system for execution and when, and which ones should be exited.

A common difference, other than their defined tasks, is also how frequently each scheduler is called.

Basic differences between the three are:

  • Long Term Scheduler is a job scheduler; Short Term Scheduler is a CPU scheduler; Medium Term Scheduler is a process swapping scheduler.
  • Speed is fastest for Short term Scheduler among the three.
  • Long Term Scheduler controls the degree of multiprogramming; Short Term Scheduler provides lesser control over degree of multiprogramming; Medium Term Scheduler reduces the degree of multiprogramming.


49. Explain The Difference Between Response Time & Turnaround Time. These Times Are Both Used To Measure The Effectiveness Of Scheduling Schemes.

Turnaround time is the sum of the periods that a process is spent waiting to get into memory, waiting in the ready queue, executing on the CPU, and doing I/O. Turnaround time essentially measures the amount of time it takes to execute a process. Response time, on the other hand is a measure of the time that elapses between a request and the first response produced.



50. Define Preemptable Resource & Non Preemptable Resource. Give Examples?

A preemptable resource is one which can be allocated to a given process for a period of time, then be allocated to another process and then be reallocated to the first process without any ill effects.

Examples of preemptable resources include
  • Memory
  • Buffers
  • CPU
  • Array processor

A nonpreemptable resource cannot be taken from one process and given to another without side effects. One obvious example is a printer: certainly we would not want to take the printer away from one process and give it to another in the middle of a print job.


ALSO READ:

51. What Is A Thread? Why Is It Used?
52. What Are The Advantages Of Threads?
53. What Are The Types Of Threads In Operating System?
54. What Are The Differences Between User Level Threads & Kernel Supported Threads?
55. State The Advantages & Disadvantages Of User Level Threads?


56. State The Advantages & Disadvantages Of Kernel Level Threads?
57. State The Basic Differences Between Process & Thread?
58. What Are The Advantages Of Threads Over Multiple Processes?
59. What Are The Disadvantages Of Threads Over Multiple Processes?
60. Why Should A Web Server Not Run As A Single Threaded Process?

... Return To Operating System FAQ's Index.

... Return To Homepage.

Comments

Popular posts from this blog

Tell Me Something About Yourself - Interview Answers.

Try to introduce some of your most important employment-oriented skills as well as your education and accomplishments to the interviewer. Answer to this question is very important because it positions you for the rest of the interview . That's why this statement is often called the "Positioning Statement". One should take the opportunity to show his/her communication skills by speaking clearly and concisely in an organized manner. Since there is no right or wrong answer for this question hence it is important to appear friendly. YOUR ANSWERS CAN BE: 1) I am a person with strong interpersonal skills and have the ability to get along well with people . I enjoy challenges and looking for creative solutions to problems. 2) Besides the details given in my resume, I believe in character values, vision and action. I am quick in learning from mistakes. I am confident that the various tests that you have conducted will corroborate my competencies apti...

HR Interview Questions With Simple Answers - Top 30.

Here are some very important HR questions which are often asked during Interviews and I believe these answers can really help you to get through....... Click on them to view the answer: 1) Tell Me Something About Yourself ? 2) What Are Your Strengths? 3) What Are Your Weaknesses? 4) How Do You Handle Pressure / Can You Work Well Under Pressure? 5) What Are Your Short Term Goals? 6) What Are Your Long Term Goals? 7) Where Do You See After 5 Years? 8) Why Should We Hire You? 9) What Is Your Salary Expectation? 10) Why Do You Want To Leave Your Current Job? 11) Do You Prefer To Work Alone Or As A Team Player? 12) What Made You Choose Your Major / Stream? 13) Why Didn’t You Pursue A Career In Your Major / Stream? 14) Why Do You Want To Work For Us? 15) Are You Willing To Travel? 16) Are You Willing To Take Risks? 17) What Do You Know About This Company? 18) What Do You Seek From A Job? 19) How Do You Evaluate Success? 20) Dur...

Sample Cover Letter / Job Application.

To The General Manager (HR) [ Name and Designation (Bold Words)] Infosys Limited Delhi – 110001 Uttam Agrawal Gandhi Chowk, Bhartee Street [ Name Bhawanipatna, Kalahandi Contact Address Orissa – 766001 Telephone No.] Ph. no - +91-9438170446 [Sub: Application for the position of ___________ in your esteemed organization.] Respected Sir, (Always use ‘Respected’) With reference to your advertisement dated 14th may’ 08 in The Times of India for the position of ___________ . I would like to place myself as a strong contender before you. OR This has reference to your advertisement dated 14th may’ 08 in The Times of India for the position of ____________. In the said connection I take this opportunity to apply for the said position as a strong contender. /*This is the Introduction i.e the first paragraph of your application/* ( Now the Second Paragraph is the Self Introduction) Try to start the second paragraph with the below mentioned lines: - I have the p...