Chapter 26 Extensible systems
Exercises
26-1 To what
extent do you agree that the problems involved in designing a successful
microkernel-based single-machine operating system mirror those involved in
designing distributed systems in general? In what ways do the two problems
differ?
Both problems require a consideration of, amongst other things, communication, naming, security and the management of component failures. In the case of a single-machine operating system, the range of failures may be simplified if the local communication mechanisms can be assumed to be reliable (and are likely to be substantially more lightweight than an RPC). There is no analogy for a ‘network partition’.
26-2 Describe
a number of optimisations which are enabled by
demultiplexing network packets into paths.
What are the disadvantages?
Essentially, if the series of modules which will
process data is known ahead of time then inter-module optimisation
may be possible – for instance by extracting the fast-path code (i.e. the
code normally executed when handling the majority of valid data packets) from
each module and collecting that together in a single function.
26-3 The Nemesis operating system
(Section 26.5) uses a single-virtual address space process model in which all
processes execute within the same virtual address space, albeit with different
virtual memory protection settings.
Assess the advantages and disadvantages of this approach. What impact does it have on providing binary-compatibility
for UNIX applications?
A major advantage of this approach is that pointers
can be directly shared between processes whenever permitted by the virtual
memory protection settings – the ideas of translation and protection have
been separated. This aids the use
of shared memory communication structures such as the Rbufs
channel. One particular difficulty
posed for supporting UNIX applications is how to support fork-based process
creation. Normally each UNIX process
follows the same conventions as to how to lay out its virtual address space.
26-4 The scheduling scheme used in
Nemesis was presented in Section 26.5 for uniprocessor systems. How would you extend it to allow a
multi-threaded process to make use of a machine with several CPUs?
A basic scheme could be developed by performing
separate activations of the same process on each of the CPUs it is executed
on. Either the OS, or the
user-level thread scheduler, would have to enforce appropriate concurrency
control in order to avoid placing the same thread on several CPUs at the same
time. One approach would be for the
OS to prevent concurrent execution of a process’s activation handler on
more than one CPU. This would also
simplify the management of ‘resume’ activation slots.
26-5 A JVM is to execute a number of
threads performing separate tasks and to provide resource-isolation between
them. Describe, for three different
resources, why such execution requires support from the JVM implementer.
An application running over the JVM could loop
endlessly at a high priority, or it could loop endlessly creating threads or it
could loop endlessly allocating objects and causing work for the garbage
collector.