01
02
03
04
05
Schedule/Dispatch
Completion
New Ready Run Terminated
Priority/Time quantum
Resume
I/O completion
Suspend
Wait/Block
Suspend Ready
Resume Suspend
I/O completed but still in suspend Suspend Wait
01 The state may be new, ready, running, waiting, halted, and so on.
The counter indicates the address of the next instruction to
02 be executed for this process.
The registers vary in number and type, depending on
the computer architecture. They include accumulators,
03 index registers, stack pointers, and general-purpose
registers, plus any condition-code information. .
PCB
This information includes a process priority,
PCB 04 pointers to scheduling queues, and any other
scheduling parameters.
This information may include such information as the
value of the base and limit registers, the page tables,
Highlights 05 or the segment tables, depending on the memory
system used by the operating system.
This information includes the amount of CPU and
06 real time used, time limits, account members, job
or process numbers, and so on.
This information includes the list of I/O devices allocated to the process,
07 a list of open files, and so on. In brief, the PCB simply serves as the
repository for any information that may vary from process to process.
Swap in Partially executed Swap out
swapped-out processes
Ready queue CPU end
I/O I/O queue I/O queue
Time slice expired
Child
Fork a child
executes
Interrupt Wait for an
occurs interrupt
The short-term scheduler, or CPU scheduler,
selects from among the processes that are
ready to execute and allocates the CPU to
one of them.
1
2 The key idea behind a medium-term scheduler is that
sometimes it can be advantageous to remove
processes from memory (and from active contention
3
for the CPU) and thus reduce the degree of
multiprogramming.
The long-term scheduler, or job scheduler, selects
processes from this pool and loads them into
memory for execution.
1
Your Text Here
2
process Po operating system process P1
Interrupt or system call
executing
Save into PCBo
.
. idle
.
Save into PCB1
Interrupt or system call executing
idle
Save into PCB1
.
.
. idle
Save into PCBo
executing