Two programs (P1, P2) and two files (F1, F2)
Deadlock sequence:
•P1 has access to F1 and also requires F2
•P2 has access to F2 and also requires F1
2. Case 2: Deadlocks in databases
Transaction A might hold a lock on some rows in the Accounts table and needs to update some rows in the Orders table to finish. Transaction B holds locks on those very rows in the Orders table but needs to update the rows in the Accounts table held by Transaction A. Transaction A cannot complete its transaction because of the lock on Orders. Transaction B cannot complete its transaction because of the lock on Accounts. All activity comes to a halt and remains at a standstill forever unless the DBMS detects the deadlock and aborts one of the transactions.
3. Case 3: Deadlocks in dedicated device allocation
Two programs (P1, P2)
4. Case 4: Deadlocks in multiple device allocation
Three programs (P1, P2, P3)
Three dedicated devices (tape drive, printer, plotter)
Deadlock sequence
•P1 requests and gets tape drive
•P2 requests and gets printer
•P3 requests and gets the plotter
•P1 requests printer but blocked
•P2 requests plotter but blocked
•P3 requests tape drive but blocked
5. Case 5: Deadlocks in spooling
Printer needs all job output before printing begins
•Spooling system fills disk space area
•No one job has entire print output in spool area
•Results in partially completed output for all jobs
6. Case 6: Deadlocks in disk sharing
Two processes
–Each process waiting for I/O request
•One at cylinder 20 and one at cylinder 310
–Deadlock sequence
•Neither I/O request satisfied
•Device puts request on hold while attempting to fulfill other request for each request
7. Case 7: Deadlocks in a network
–Seven computers on network
•Each on different node
–Direction of arrows
•Indicates message flow
–Deadlock sequence
•All available buffer space fills
I love this, it is very easy to understand, nice work from you, keep it!
ReplyDeletethat is simple to understand it thank you
ReplyDeleteYou made my work very easy! Thanx :)
ReplyDeleteThanks Really ... My God Accept you
ReplyDelete