FCFS scheduling allocates CPU to the process at the head of the ready queue. It has a long waiting time and is not suitable for time-sharing systems. SJF allocates CPU to the process with the shortest next CPU burst. It has minimal waiting time but requires knowing the length of the next CPU request. Priority scheduling allocates CPU to the highest priority process. Preemptive priority scheduling can preempt the CPU for higher priority processes that arrive while non-preemptive cannot. Round robin allocates the CPU to each process for a time quantum, putting processes at the back of the queue when time expires. It prevents starvation but can have long average waiting times.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
61 views
FCFS
FCFS scheduling allocates CPU to the process at the head of the ready queue. It has a long waiting time and is not suitable for time-sharing systems. SJF allocates CPU to the process with the shortest next CPU burst. It has minimal waiting time but requires knowing the length of the next CPU request. Priority scheduling allocates CPU to the highest priority process. Preemptive priority scheduling can preempt the CPU for higher priority processes that arrive while non-preemptive cannot. Round robin allocates the CPU to each process for a time quantum, putting processes at the back of the queue when time expires. It prevents starvation but can have long average waiting times.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
FCFS(first come first serve )-this is non-preemptive scheduling.
when a process enter the ready
queue,its pcb is linked onto the talil of the queue.when the cpu is free,it is allocated to the process at the head of the queue.it’s simple to implement. Disadvantage-Waiting time is too long.This is not fit for time-sharing system,where each user need to get a share of the cpu at regular intervals. SJF (shortest job first)-This algorithm associates with each process the length of the latter’s next cpu burst.When the cpu is available ,it is assigned to the process that has the smallest next cpu burst.If two processes have the same length next cpu burst,fcfs scheduling is used to break the tie.The main advantage is that waiting time is minimal. The main disadvantage is to know the length of the next cpu request.SJF algorithm can be preemptive or non-preemptive. Priority scheduling-A priority is associated with each process and the cpu is allocated to the process with highest priority.equal priority processes are scheduled in FCFS order.Priority scheduling can be either preemptive or non- preemptivewhen a process arrives at the ready queue,its priority is compared with the priority of the currently running process .A preemptive algorithm will preempt the cpu if the priority of the newly arrived process is higher than the priority of the currently running process.A non -preemptive scheduling algorithm will simply put the new process at the head of the ready queue. The main advantage is the important jobs can be finished earlier as much as possible. The main disadvantage is the lower priority jobs will starve. Round Robin-It is similar to FCFS scheduling,but preemption is added to switch between processes.A small unit of time,called a time quantum or time slice is defined.The cpu scheduler goes around the ready queue,allocating the cpu to each process for a time interval of up to1 time quantum.New processes are added to the tail of the ready queue.The cpu scheduler picks the first process from the ready queue,sets a timer to interrupt after 1 time quantum,and dispatches the process.There can be two situation .either the process may have a cpu burst of less than 1 time quantum .in this case ,the process itself will realease the cpu voluntarily.The scheduler will then proceed to the next process in the ready queue.Otherwiese ,if the cpu burst of the currently running process is longer than 1 time quantum, the timer will go off and will cause an interrupt to the Os.A context switch will be executed, and the process will be put at the tail of the ready queue.The cpu scheduler will then select the next process in the ready queue. Disadvantage- average waiting time is often quite long. Advantage-every process gets the cpu and thus there is no starvation.