GNC Assign Os Assignment
GNC Assign Os Assignment
4
Scheduling queues…
Let’s start with the first set of slides 2 5
Definition of process scheduling queues………
◉ As processes enter the system, they are put into a ready queue,
where they are ready and waiting to execute on a CPU’s core
◉ This queue is generally stored as a linked list; a ready queue
header contains pointers to the first PCB in the list, and each
PCB includes a pointer field that points to the next PCB in the
ready queue.
6
◉ The system also includes other queues. When a process is
allocated a CPU core, it executes for a while and eventually
terminates, is interrupted, or waits for the occurrence of a
particular event, such as the completion of an I/O request.
◉ Suppose the process makes an I/O request to a device such as a
disk. Since devices run significantly slower than processors, the
process will have to wait for the I/O to become available.
◉ Processes that are waiting for a certain event to occur, such as
completion of I/O, are placed in a wait queue.
7
◉ A common representation of process scheduling is a queueing
diagram. Two types of queues are present: the ready queue and a
set of wait queues.
◉ The circles represent the resources that serve the queues, and the
arrows indicate the flow of processes in the system..
8
◉ A new process is initially put in the ready queue. It waits there
until it is selected for execution, or dispatched. Once the process
is allocated a CPU core and is executing, one of several events
could occur:
9
◉ The process could issue an I/O request and then be placed in an
I/O wait queue.
◉ The process could create a new child process and then be placed
in a wait queue while it awaits the child’s termination.
◉ The process could be removed forcibly from the core, as a result
of an interrupt or having its time slice expire, and be put back in
the ready queue.
◉ A process continues this cycle until it terminates, at which time it
is removed from all queues and has its PCB and resources de-
allocated.
10
Thank you...!!!
11