Cheatography
https://cheatography.com
Process Scheduling is done in Operating System to allocate CPU to the processes.
Scheduling QueueJob Queue: A process when enters a system is put into a job queue. | Ready Queue: The process residing in the main memory and ready for execution is put into ready queue. | Device Queue: The process waiting for a particular I/O device is put in the device queue. |
SchedulerLong Term Scheduler: Also known as job scheduler selects process from disk and puts into the main memory. | Short Term Scheduler: Also known as CPU Scheduler selects process from memory and allocates a CPU to it. | Medium-Term Scheduler: It is used to remove a process and reduce the degree of multi-programing . Later it can be re-introduced from point where it was left .This is known as Swapping. |
Priority Scheduling Round Robin SchedulingEach process has a priority. | There is a fixed time quantum. | CPU allocated to the process with higher priority. | Ready queue is treated as circular queue and CPU is allocated to the First process for specific time quantum. | Problem: Starvation of low priority. Solution: Aging. | Problem: If time quantum too large, algorithm works as FCFS. | It can be preemptive or non-preemptive. | It is preemptive. |
Multilevel Queue Multilevel Feedback QueueReady queue is divided into: Foreground (interactive) process and Background (batch) process. | Allows the process from one queue to move to the next queue. | Foreground implements Round Robin Scheduling and Background implements FCFS. | Here processes are separated according to their CPU burst. |
| | Scheduling Criteria1. CPU Utilization: It should be maximum. 40% minimum- 90% maximum. | 2. Throughput: Number of processes completed per unit time is called throughput. It should be minimum. | 3. Turnaround Time: The interval from time of submission of process to time of completion, Turnaround Time= period spent waiting + waiting in ready queue + execution time + I/O interrupt time. It should be minimum. | 4. Waiting Time: The time for which the process has to wait in the ready queue is waiting time. It should be minimum. | 5. Response Time: Time taken to respond to a process is a response time. It should be minimum. |
SCHEDULING ALGORITHMScheduling Algorithm decides which process should the CPU be allocated to. There are six scheduling algorithms. |
First Come First Serve Shortest Job FirstThe process that requests for the CPU first, gets the access first. | Each process has the length of the next CPU burst. | FIFO queue is used in handling the process. | The process with smallest next CPU burst gets access to the process. | Long waiting time for the next process. | Comparitively less waiting time for the next process. | It is a non-preemptive algorithm. | It can be preemptive or non-preemptive. |
Priority Scheduling Diagram
| | Scheduling Queue Diagram
Medim-Term Scheduling Diagram
First Come First Serve (FCFS) Diagram
Shortest Job First (SJF) Diagram
Multilevel Queue Scheduling Diagram
Multilevel Feedback Queue Diagram
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets