Professional Documents
Culture Documents
Operating System
Chapter 2:
Processes and Process
management
Process Concept
Thread concept
Process Scheduling
Inter-process Communication
Deadlock
Operating System
Process Concept
new _ready
Admitted to ready queue; can now be considered by CPU scheduler
ready _ running
CPU scheduler chooses that process to execute next, according to
some scheduling algorithm
running _ready
Process has used up its current time slice
running _blocked
Process is waiting for some event to occur (for I/O operation to
complete, etc.)
blocked _ ready
Whatever event the process was waiting on has occurred
Running _ Terminated
When the process completed
A second argument for having threads is that since they are lighter
weight than processes, they are easier (i.e., faster) to create and
destroy than processes.
A third reason for having threads is also a performance argument.
The third thread can handle the disk backups without interfering
with the other two.
Throughput =3/30=1/10
Operating System Concepts
Case ii. Suppose that the processes arrive in the order
P2 , P3 , P1 .
The Gantt chart for the schedule is:
Associates with each process the length of its next CPU burst.
Use these lengths to schedule the process with the shortest time.
When the CPU is available, it is assigned to the process that has
the smallest next CPU burst.
If the next CPU bursts of two processes are the same, FCFS
scheduling is used to break the tie.
Example
Ignore the problem and pretend that deadlocks never occur in the
system; used by most operating systems, including UNIX.