In the general case, one does not have the option of doing away
with mutual exclusion.
Suppose one decides to do away with hold and wait? An alternative is to require a process to request in
advance all the resources it will need during the course of its execution. If it receives all the resources it needs,
it proceeds; if it cannot reserve everything at once, it blocks until it can. This approach can work, but at the cost
of reduced efficiency. Suppose a long-running process requires a printer only at the end of its run; the printer
will be unavailable to other processes in the meantime. Some systems, especially older mainframe systems,
employ this design, but most modern systems do not, for reasons of efficiency.
Suppose one decides to do away with no preemption? Alternatives providing for preemption run into the
same problems as alternatives doing away with mutual exclusion. For example, it usually won??™t make sense to
take a printer away from a process that has blocked because it??™s waiting for a file. The resulting intermingling
of output will fail the needs of both processes.
CHAP. 6] OPERATING SYSTEMS 111
Suppose one decides to do away with circular wait? There is a workable alternative for doing away with
circular wait.
Pages:
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303