Page 434 - Computer_Science_F5
P. 434
Chapter Seven: Operating Systems
Step 7: Use different scheduling policies (a) Shortest Job First (SJF), and (b)
Round Robbin (RR), repeat steps 1 to 6.
Deliverable:
FOR ONLINE READING ONLY
Write a brief report that document the key experimental procedures, including
the screenshots of the setup in each step and the results. Document them in your
portifolio.
Deadlock
Deadlock refers to a specific condition when two or more processes are each waiting
for each other to release a resource, or more than two processes are waiting for
resources in a circular chain. Deadlock occur when each process needing what
another process has. This results is blocking from sharing resources such as memory,
devices, links.
Consider a bridge crossing scenario as in Figure 7.10.
Figure 7.10: Causes of deadlock (The figure should be redrawn)
Each segment of the road can be viewed be resolved by having one car back up,
as a resource. A car must own the preempting resources and rolling back.
segment it occupies and must acquire
the segment it is moving into. For a This may require several cars to back up.
bridge, a car must acquire both halves A deadlock in an operating system
of the bridge. Traffic is allowed only in occurs when a set of processes become
one direction at a time. A problem arises stuck, waiting for each other to release
when two cars traveling in opposite resources. Figure 7.11 shows a simplified
directions meet on the bridge, with each diagram to illustrate the deadlock
car acquiring one segment and needing situation in an OS with processes and
the next. If a deadlock occurs, it can resources.
425
Student’s Book Form Five
Computer Science Form 5.indd 425 23/07/2024 12:34

