1 / 6

K SAMPATH KUMAR

K SAMPATH KUMAR. 11CS10022. PRIORITY SCHEDULING OF PROCESSES . It is implemented using multiple ready queues to represent each level of priority The OS keeps track of process state by maintaining a queue of PCBs for each state

odin
Download Presentation

K SAMPATH KUMAR

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. K SAMPATH KUMAR 11CS10022

  2. PRIORITY SCHEDULING OF PROCESSES • It is implemented using multiple ready queues to represent each level of priority • The OS keeps track of process state by maintaining a queue of PCBs for each state • The ready queue contains PCBs of processes that are waiting to be assigned to the CPU • Associate each process with priority and select the process of a higher priority over one of lower priority(pre emptive or non pre emptive.) • Lower the value ,higher is the priority of the process • Priority may be internally defined by OS or externally by the user • statically assigned priority or dynamically set based on execution properties • Lower-priority may suffer starvation as it won’t execute • To alleviate starvation allow dynamic priorities .The priority of a process changes based on its age or execution history (i.e increases with time.) 1

  3. ROUND ROBIN SCHEDULING ALGORITHM • Policy is targeted to time-sharing systems similar to FCFS but permit preemption • Each process assigned a time quantum q, typically 10-100ms (40ms). • At quantum expiration process moved to tail of Ready Q • Preemption after fixed time interval and place on tail of ready-queue. always select next process from head of ready-queue • If n processes in ready queue, time quantum = q, then each process receives 1/n of CPU time in chunks of at most q units. So,Noprocess waits more than (n-1)q time units for CPU. • Performance depends on size of time quantum

  4. If q is large then behaves like FCFS • If q is small then appears as dedicated processor with speed 1/n actual – called processor sharing • q should be large compared to context switch time otherwise considerable time is wasted on context switching,and not too large to avoid penalizing I/O bound processes. • Too long => poor response time • Infinite => performance is the same as FIFO • Too short => poor throughput • Turnaround time also depends on quantum • Better performance if most processes complete within one time quantum

  5. RR pros & cons: • Works well for short jobs; typically used in timesharing systems. • High overhead due to frequent context switches. • Increases average waiting time, especially if CPU bursts are the same length and need more than one time quantum.

More Related