Initially, the system is in a safe state. The idea is simply to ensure that the system will always remain in a safe state. Given the concept of a safe state, we can define avoidance algorithms that ensure that the system will never deadlock. If we had made P2 wait until either of the other processes had finished and released its resources, then we could have avoided the deadlock. Our mistake was in granting the request from process Pi for one more tape drive. Similarly, process P? may request an additional 6 tape drives and have to wait, resulting in a deadlock. Since they are unavailable, process Po must wait. Since process Pp, is allocated 5 tape drives but has a maximum of 10, it may request 5 more tape drives. When it returns them, the system will have only 4 available tape drives. At this point, only process P, can be allocated all its tape drives. Suppose that, at time t\, process Pz requests and is allocated one more tape drive. Process Pj can immediately be allocated all its tape drives and then return them (the system will then have 5 available tape drives) then process PL) can get all its tape drives and return them (the system will then have 10 available tape drives) and finally process P^ can get all its tape drives and return them (the system will then have all 12 tape drives available).Ī system can go from a safe state to an unsafe state. Fundamental Of Computers And Programing In C.Memory-Reference Instructions - Sta, Lda And Bsa.Operating System Operations- Dual-Mode Operation, Timer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |