Loose Ends; Midterm Review

Tom Kelliher, CS 318

Mar. 30, 1998

Announcements:

From last time:

Outline:

Assignment:

Operating System Structures

Definitions:

MS-DOS

Weak layering:

Unix

Traditional kernel:

MS Windows NT 4.0

Micro kernel:

THE

A strictly layered system:

Virtual Machines

Lowest software level (between kernel and hardware) provides a virtual machine interface to multiple, independent kernels. IBM VM. Java VM.

  1. Support for OS development alongside a production system.
  2. Virtual user/monitor mode, real user/monitor mode.
  3. How is a disk operation carried out?
  4. Virtual Machine is a simulation:
  5. How are physical devices (a disk) ``virtualized?''
  6. Java portability: ``Write once run anywhere.''
  7. Java security: the ``sandbox.'' Access to local resources. Security or impediment to application development?
  8. Java consistency: same look, feel between platforms?

Mailbox IPC

Resources owned by kernel, allocated to processes.

Messages kept in a queue.

Assume:

  1. Only allocating process may execute receive.

  2. Any process (including ``owner'') may send.

  3. Variable-sized messages.

  4. Infinite capacity.

Primitives:

  1. int AllocateMB(void)

  2. int Send(int mb, char* message)

  3. int Receive(int mb, char* message)

  4. int FreeMB(int mb)

Example: Process Synchronization

Consider:

Process1()
{
   ...
   S1;
   ...
}

Process2()
{
   ...
   S2;
   ...
}
How can we guarantee that S1 executes before S2?

Example: Tape Drive Allocation and Use

The situation:

Tape allocator process:

initialize();
while (1)
{
   Receive(Tamb, message);
   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;
            update lists;
         }

      else

         send a rejection message;

   else if (message is a return)
   {
      update lists;
      send an ack message;
   }

   else

      ignore illegal messages;
}

Summary of user process actions:

  1. Send request to tape allocator.

  2. Receive message back giving mailbox(es) to use in communicating with tape drive(s).

  3. Start sending/receiving with tape drive daemon(s).

  4. Close tape drives.

  5. Send message to tape allocator returning tape drive(s).



Thomas P. Kelliher
Thu Mar 26 13:30:29 EST 1998
Tom Kelliher