bankers algorithm - How do I determine whether a deadlock will occur in this system? -
n processes share m resource units can reserved , release 1 @ time. maximum need of each process not exceed m, , sum of maximum needs less m+n. can deadlock occur in system ?
the system describing looks semaphores
about last question : yes. "could" deadlock ; if don't see how, ask young/shameful/motivated/deviant developer.
one way make 1 ; have strange locking/releasing resources rules. example, if process needs m resources perform task, locks half of them right away, , waits other half available before doing anything.
i assume never gives until have m precious resources , releases them once task done.
a single process wouldn't cause problems several lock more m total resources , need more of them out frozen state.
Comments
Post a Comment