 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
• |
Fewer
resources (locks) means less deadlock potential, but
|
|
|
also
less potential concurrency. So
there is a trade off here
|
|
|
• |
For
really simple applications acquiring all the resources
|
|
|
up
front is fairly common, but not always practical.
|
|
|
• |
Programmers
most often use common sense in the ordering
|
|
of
resources acquisition and releases
|
|
|
|
– |
Resource
levels is one area that helps development
|
|
|
• |
In
complicated software systems resource levels are not
|
|
|
practical.
(e.g., memory management and the file system
|
|
|
often
recursively call each other), and deadlock prevention
|
|
|
is
far more a matter of fine tuning the locks and
|
|
|
understanding
the exact scenario in which locks are
|
|
|
acquired
|
|