5. Chapter 5: Distributed Operating System
5.7. Asynchronous operation
Asynchronous
operation
Making invocation concurrently
- The middleware provides only blocking invocations, but the application spawns multiple threads to perform blocking invocations concurrently.
- Example is a web browser.
- A web page typically contains several images and may contain many.
Asynchronous invocations
- It is made with a non-blocking call, which returns as soon as the invocation request message has been created and is ready for dispatch.
- The client uses a separate call to collect the result of the invocation.
- Example: Mercury communication system [Liskov and Shrira 1988]
- An asynchronous operation returns an object called a promise.
- Eventually, when the invocation succeeds or failed, the Mercury system places the status and any return values in the promise.
- The caller uses the claim operation to obtain the result from the promise.
- The claim operation blocks until the promise is ready, whereupon it returns the results or exceptions from the call.
- The ready operation is available for testing a promise without blocking – it returns true or false according to whether the promise is ready or blocked.
Operating
system architecture
An open distributed system should make it possible to:
- Run only that system software at each computer that is necessary for it to carry out its particular role in the system architecture –
- system software requirements can vary between, for example, mobile phones and server computers, and loading redundant modules wastes memory resources;
- Allow the software (and the computer) implementing any particular service to be changed independently of other facilities;
- Allow for alternatives of the same service to be provided, when this is required to suit different users or applications;
- Introduce new services without harming the integrity of the existing ones.
Monolithic kernels
- Massive – it performs all basic operating system functions and takes up in the order of megabytes of code and data – and that it is undifferentiated, i.e. it is coded in a non-modular way.
- To a large extent, it is intractable – altering any individual software component to adapt it to changing requirements is difficult.
- Example: UNIX operating system kernel, Sprite network operating system [Ousterhout et al. 1988]
- Can contain some server processes that execute within its address space.
Microkernels
Comparison
- Advantages of microkernel-based operating system
- Extensibility
- Ability to enforce modularity behind memory protection boundaries
- Relatively small, more likely to be free of bugs
- Advantages of monolithic kernel
- Relative efficiency with which operations can be invoked.
- Windows employs a combination of both [Custer 1998], but its functionality is not designed to be routinely replaceable.