0% found this document useful (0 votes)
27 views

Application of Data Structure

CPU scheduling allows processes to share the CPU by pausing execution of one process when it needs to wait for a resource like I/O and running another process in its place. The scheduler selects ready processes from memory and allocates the CPU to one, aiming to make the system efficient, fast and fair. When the CPU becomes idle, the operating system's short-term scheduler selects the next process from the ready queue to execute using the dispatcher, which switches contexts and hands over control of the CPU.

Uploaded by

project mission
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Application of Data Structure

CPU scheduling allows processes to share the CPU by pausing execution of one process when it needs to wait for a resource like I/O and running another process in its place. The scheduler selects ready processes from memory and allocates the CPU to one, aiming to make the system efficient, fast and fair. When the CPU becomes idle, the operating system's short-term scheduler selects the next process from the ready queue to execute using the dispatcher, which switches contexts and hands over control of the CPU.

Uploaded by

project mission
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Application of Data Structure

CPU scheduling

What is CPU scheduling?


 CPU scheduling is a process which allows one process to use the
CPU while the execution of another process is on hold(in waiting
state) due to unavailability of any resource like I/O etc.

 The aim of CPU scheduling is to make the system efficient, fast


and fair.

 Whenever the CPU becomes idle, the operating system must select
one of the processes in the ready queue to be executed.
 The selection process is carried out by the short-term scheduler
(or CPU scheduler).
 The scheduler selects from among the processes in memory that
are ready to execute, and allocates the CPU to one of them.

CPU Scheduling: Dispatcher


The dispatcher is the module that gives control of the CPU to the
process selected by the short-term scheduler. This function involves:

 Switching context
 Switching to user mode
 Jumping to the proper location in the user program to restart that
program from where it left last time.

You might also like