Part A: Are locks as powerful as semaphores for solving communication and synchronization problems? To answer this, consider what problems can and cannot be solved with locks.
Part B: Write code to replace the semaphores in our thread package with locks. Minimize your changes and do not turn in a complete listing, only listings of the fragments of the thread package you changed. The total code required is not large!
Part C: Describe a deadlock detection algorithm appropriate for your implementation of locks.
The class description record begins with a field giving the size of each instance of the class (all instances must be the same size), followed by pointers to each of the methods of the instance. If x is a class member, the call:
x.method(p)translates to (in C notation)
(* x->my_class_descripition->method)(x,p)The Problem: Assume, first, that the object oriented language is strongly typed, unlike C++. Outline how you would modify the fundamental data structures of the implementation to support garbage collection -- that is, what fields would you add to each class instance record, what fields would you add to each class description record, and what new methods, if any, would you add to all classes (probably as methods of the base class from which all classes are descended).
Part A: Discuss the application of microkernels to non-networked systems. What are the advantages of such a design in that context.
Part B: If you had to implement UNIX using a microkernel-based approach, what functions that are kernel functions in UNIX as it exists today would clearly belong outside of the microkernel?