3.deadlock prevention
*negate one of the necessary conditionsNegating Mutual Exclusion :
example:shared use of a printer
»give exclusive use of the printer to each user in turn wanting to print?
»deadlock possibility if exclusive access to another resource also allowed
»better to have a spooler process to which print jobs are sent
-complete output file must be generated first
example: file system actions
»give a process exclusive access rights to a file directory
example: moving a file from one directory to another
-possible deadlock if allowed exclusive access to two directories simultaneously
-should write code so as only to need to access one directory at a time
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment