Question 4 -- 10 points
An asynchronous operation is one that takes two steps to complete.
For example, an asynchronous disk write may take two subroutines --
one to start the disk write that returns before the write has completed,
and then one to test and see if the write has completed.
A synchronous operation is one that does not return until the operation
is complete. For example, a synchronous disk write will consist of
one subroutine that will not return until the disk write is completed.
Answer the following questions:
- In a non-threaded uniprocessor system, explain why asynchronous
operations may be desirable.
- Suppose you have a threaded uniprocessor system where the
kernel supports threads, and where all thread
operations (forking, joining, thread context switches) take just a
few instructions. Explain why asynchronous operations are not needed
in such a system and why this is desirable. Does it matter if
threads are preemptive or non-preemptive?