2.1.6
Scheduling
Scheduling
Scheduling
Operating systems use schedulers to manage the jobs that are being completed by the CPU to ensure maximum use of processing time.
Scheduling
Scheduling
- Computers are now faster than ever and we expect them to do more and more complex tasks at the same time.
- We also expect no delay or impact on performance.
- Scheduling is a system that is part of the operating system that helps to make this happen.
Types of scheduling
Types of scheduling
- There are several key schedulers to be aware of:
- Round robin.
- First come first served.
- Multilevel feedback queues.
- Shortest job first.
- Shortest remaining time.
Types of Scheduling
Types of Scheduling
Operating systems use schedulers to manage the jobs that are being completed by the CPU to ensure maximum use of processing time.
Round robin
Round robin
- Round robin is the most basic of scheduler.
- In this system each time a job comes in to be completed it is added to the end of a queue.
- Each job is given an amount of CPU time to be completed in.
Round robin cont.
Round robin cont.
- If the job completes within this time, then the next job is loaded.
- If the job is not completed, then it is pushed to the bottom of the queue and waits for its next slot of CPU time.
- This is fine if all the jobs are similar in size and similar in priority.
- This system ignores any priority of a job and ignores that each job will take different amounts of time so can be very inefficient.
First come first served (FCFS)
First come first served (FCFS)
- First come first served (FCFS) is another scheduler that is easy to set up and manage.
- As jobs come in to be completed, they are added to a queue.
- Jobs are completed in the order they came in regardless of the time taken to complete.
First come first served (FCFS) cont.
First come first served (FCFS) cont.
- This system is very easy to set up and great for getting things done in the set order of arrival.
- This system can cause a long delay in getting jobs done, especially if higher up jobs in the queue are big tasks that take a long time.
- First come first served scheduling generates bad performance within a computer system.
Multilevel feedback queues
Multilevel feedback queues
- Multilevel feedback queues are the most complex form of scheduling but also give the best results.
- The scheduler maintains many queues of jobs, usually grouped by priority and similarity of job.
- The CPU will switch between queues to get jobs to complete.
Multilevel feedback queues cont.
Multilevel feedback queues cont.
- If a job is waiting too long in one queue it will be moved to a higher priority location in another queue to get the job completed quicker.
- Each separate queue has its own scheduler to maintain that queue.
- This system offers the best results, but is very CPU intensive.
Types of Scheduling
Types of Scheduling
Operating systems use schedulers to manage the jobs that are being completed by the CPU to ensure maximum use of processing time.
Shortest job first
Shortest job first
- Shortest job first is a scheduler that selects the shortest job in the queue to complete first.
- Shortest job first can have the shortest waiting time of all the schedulers.
Shortest job first cont.
Shortest job first cont.
- As it is always looking for the shortest job first, larger processes can face “starvation” and not get completed.
- Shortest job first is not very feasible for implementation as the operating system rarely knows the amount of time to complete each new job.
- The operating system has to use estimation based on a record of all previous jobs.
Shortest remaining time
Shortest remaining time
- Shortest time remaining is a preemptive version of shortest job first.
- As a job arrives, it is compared to the currently running job (which is currently the shortest job) if it is longer than the current job then it is added to a queue.
- If the new job is shorter than the current job, then the current job is pushed to the queue and the new job is worked on.
Shortest remaining time cont.
Shortest remaining time cont.
- As a job completes, the scheduler assesses the queue and selects the next shortest job to complete.
- This scheduler requires very little CPU usage as it only makes a comparison as a job arrives or as it completes a job.
- Short jobs are always completed quickly, but bigger jobs will face starvation.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered