Basic Concepts

Maximum CPU utilization obtained with multiprogramming

CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait.

CPU burst distribution

 

Alternating Sequence of CPU And I/O Bursts

 

          

Histogram of CPU-burst Times

 

        

 

CPU Scheduler

 

Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them.

CPU scheduling decisions may take place when a process:

     1. Switches from running to waiting state.

     2. Switches from running to ready state.

     3. Switches from waiting to ready.

     4. Terminates.

Scheduling under 1 and 4 is non-preemptive.

All other scheduling is preemptive.

 

Dispatcher

 

Dispatcher module gives control of the CPU to the process selected by the short-term scheduler;

this involves:

     1. Switching context

     2. switching to user mode

     3. jumping to the proper location in the user program to restart that program

Dispatch latency – time it takes for the dispatcher to stop one process and start another running.

 

                                                                                                                                                                           

                                                                                                                                                                                                    BACK