Operating System Components and Services

Tom Kelliher, CS 311

Feb. 6, 2012


From last time:

  1. System architecture issues.

  2. I/O programming.

  3. Memory hierarchy.

  4. Hardware protection.


  1. Operating system components.

  2. System calls.

  3. Operating system structure.

  4. Virtual machines.

Next week: kernel hacking lab.

Operating System Components

From the virtual machine point of view (also resource management)

These components reflect the services made available by the O.S.

  1. User interface

  2. Process Management

  3. Memory Management

    1. Maintain bookkeeping information

    2. Map processes to memory locations

    3. Allocate/deallocate memory space as requested/required

  4. I/O Device Management

    1. Disk management functions such as free space management, storage allocation, fragmentation removal, head scheduling

    2. Consistent, convenient software to I/O device interface through buffering/caching, custom drivers for each device.

  5. File System

    Built on top of disk management

    1. File creation/deletion.

    2. Support for hierarchical file systems

    3. Update/retrieval operations: read, write, append, seek

    4. Mapping of files to secondary storage

  6. Protection

    Controlling access to the system

    1. Resources -- CPU cycles, memory, files, devices

    2. Users -- authentication, communication

    3. Mechanisms, not policies

  7. Network Management

    Often built on top of file system

    1. TCP/IP, IPX, IPng

    2. Connection/Routing strategies

    3. ``Circuit'' management -- circuit, message, packet switching

    4. Communication mechanism

    5. Data/Process migration

  8. Network Services (Distributed Computing)

    Built on top of networking

    1. Email, messaging (Exchange)

    2. FTP

    3. gopher, www

    4. Distributed file systems -- NFS, AFS, LAN Manager

    5. Name service -- DNS, YP, NIS

    6. Replication -- gossip, ISIS

    7. Security -- kerberos

  9. User Interface

    1. Character-Oriented shell -- sh, csh, command.com (User replaceable)

    2. GUI -- X, Win32

System Calls

Some of the Linux system calls:

(Refer to man 2.)

  1. Process Management

    Scheduling, deadlock detection is transparent.

    1. fork, vfork, exit, exec

    2. wait

    3. signals, pipes, streams, sockets

  2. Memory management

    For the most part, transparent to the user.

    1. malloc, free

  3. I/O Device Management

    Devices are treated as files, so I/O devices are supported by the file system.

  4. File System

    1. creat, open, close

    2. lseek, read, write

    3. stat, chmod, chown

    4. link, unlink

    5. mkdir, rmdir

    6. sync

  5. Communication

    Two models:

    1. Message passing
      1. Processes communicate by passing messages -- mailbox model.

      2. Primitives: send, receive.

      3. Each Process has a private address space.

      4. Perfect for inter-processor communication. No synchronization problems. Latency can be a problem. Queueing.

    2. Shared memory
      1. Processes communicate by sharing memory -- bulletin board model.

      2. Primitives are implicit once spaces are mapped.

      3. Good for large amounts of intra-processor communication. Synchronization problems.

    Issues: naming, security, transparency, replication, etc.

    Message passing

    1. socket, bind, accept, read.

    2. socket, connect, write.

    Shared memory:

    1. mmap.

Operating System Structures



Weak layering:



Traditional kernel:


MS Windows NT 4.0

Micro kernel:


Virtual Machines

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

  1. Support for OS development alongside a production system.
  2. Virtual user/kernel mode, real user/kernel mode.
  3. How is a disk operation carried out?
  4. Virtual Machine is/isn't a simulation/emulation:
  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?

Thomas P. Kelliher 2012-02-04
Tom Kelliher