Operating System Components and Services

Tom Kelliher, CS42

Sept. 10, 1996

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. Process Management

  2. Memory Management

    1. Maintain bookkeeping information

    2. Map processes to memory locations

    3. Allocate/deallocate memory space as requested/required

  3. 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.

  4. 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

  5. Protection

    Controlling access to the system

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

    2. Users --- authentication, communication

    3. Mechanisms, not policies

  6. 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

  7. Network Services (Distributed Computing)

    Built on top of networking

    1. Email, messaging (GroupWise)

    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

  8. User Interface

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

    2. GUI --- X, Windows 95

System Calls provide these services

Some of the Unix 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


  1. Hardware

    1. Uniprocessor --- single CPU

    2. Multiprocessor --- multiple CPU's, shared memory

    3. Distributed system --- multiple CPU's, no shared memory (How is a hypercube classified?)

  2. Software

    1. Process (Job, Task) --- Activity generated by a program executed by a sequential processor. Single thread of control. Deterministic.

      Is this definition bullet-proof? Can a process be associated with more than one program? Can a program be associated to more than one process?

    2. Sequential Program --- program executed by a single process

    3. Parallel or Concurrent Program --- program executed by several processes

      If two people run vi, does that make vi a concurrent program? What is sharable there (this distinguishes concurrency, as does working toward a common goal)?

  3. O.S. Classification

    1. Based on interaction with the user

      1. Classical --- batch, timesharing

      2. Special Purpose --- database, real-time

    2. Based on number of jobs and processors

Example of Process Control --- Unix

Unix shell and commands. Foreground and background processes:

   while (!EOF)
      read cmd
      parse cmd
      fork cmd
      if (! background command)
         wait cmd


Pipeline: c1 | c2

set up environment and pipeline
fork c1
fork c2

Thomas P. Kelliher
Tue Sep 10 22:31:50 EDT 1996
Tom Kelliher