Loose Ends; Midterm Review
Tom Kelliher, CS 318
Mar. 30, 1998
From last time:
- Layered System --- A system in which pieces are built on top of other
pieces, with hardware as a foundation. A layer make calls
exclusively to the layer beneath it.
- Well defined structure.
- Information Hiding.
- Poor performance on ``deep'' calls --- latency.
- Difficulty in creating a ``good'' layered design.
- Micro Kernel --- A small executive that provides only necessary
functionality to support threads/processes:
Runs in kernel (supervisor) mode. Everything else runs in user mode.
- CPU scheduling.
- Process primitives: create, destroy, suspend, activate, change
- Virtual Memory.
- Interrupt handlers.
- Device driver interface.
- Only a small amount of code runs in kernel mode.
- Easily extended.
- System routines work with an abstract machine model --- portability.
- System calls require a context switch (slow).
- Not easily extended (traditional kernel).
A strictly layered system:
Lowest software level (between kernel and hardware) provides a virtual
machine interface to multiple, independent kernels. IBM VM. Java
- Support for OS development alongside a production system.
- Virtual user/monitor mode, real user/monitor mode.
- How is a disk operation carried out?
- Virtual Machine is a simulation:
- Simulate one architecture with another.
- How are physical devices (a disk) ``virtualized?''
- Java portability: ``Write once run anywhere.''
- Java security: the ``sandbox.'' Access to local resources. Security
or impediment to application development?
- Java consistency: same look, feel between platforms?
Resources owned by kernel, allocated to processes.
Messages kept in a queue.
- Only allocating process may execute receive.
- Any process (including ``owner'') may send.
- Variable-sized messages.
- Infinite capacity.
- int AllocateMB(void)
- int Send(int mb, char* message)
- int Receive(int mb, char* message)
- int FreeMB(int mb)
How can we guarantee that S1 executes before S2?
Tape allocator process:
if (message is a request)
if (there are enough tape drives)
for each tape drive being allocated
fork a handler daemon;
send daemon mb # in message to requesting process;
send a rejection message;
else if (message is a return)
send an ack message;
ignore illegal messages;
Summary of user process actions:
- Send request to tape allocator.
- Receive message back giving mailbox(es) to use in communicating with
- Start sending/receiving with tape drive daemon(s).
- Close tape drives.
- Send message to tape allocator returning tape drive(s).
Thomas P. Kelliher
Thu Mar 26 13:30:29 EST 1998