COMPONENTS OF OS

OS Components:

  • Process management
  • I/O management
  • Main Memory management
  • File & Storage Management
  • Protection
  • Networking
  • Protection
  • Command Interpreter

 

1. Process Management

  • Process (or job): A program or a fraction of a program that is loaded in main memory.
  • Motivation: We do not need a whole program code at once. To process an instruction, CPU fetches and executes one instruction of a process after another (i.e., the execution of a process progresses in a sequential fashion) in main memory.
  • Tasks of Process Management of an OS:
    •  Create, load, execute, suspend, resume, and terminate processes
    • Switch system among multiple processes in main memory (process scheduling)
    • Provides communication mechanisms so that processes can send (or receive) data to (or from) each other (process communication).
    • Control concurrent* access to shared data to keep shared data consistent (process synchronization).
    • Allocate/de-allocate resources properly to prevent or avoid deadlock situation**
*:  In time-shared systems, even if the system is equipped with a single CPU, we
usually say that the processes in main memory are concurrently running.

**:  Deadlock situation: e.g., There are three running processes A, B, and C. A is
waiting for the resource of B. B is waiting for the resource of C. C is waiting for
the resource of A. At the same time they want to keep using their current
resources. As a result, all processes will wait forever.

 

2. I/O Management

  • Motivations:
    • Provide an abstract level of H/W devices and keep the details from applications to ensure proper use of devices, to prevent errors, and to provide users with convenient and efficient programming environment.
  • Tasks of I/O Management of OS:
    • Hide the details of H/W devices
    • Manage main memory for the devices using cache, buffer, and spooling
    • Maintain and provide device driver interfaces

 

3. Main Memory management

Processes must be loaded into main memory to be executed.
  •  Motivations:
    • Increase system performance by increasing “hit” ratio (e.g., optimum: when CPU read data or instruction, it is in the main memory always)
    • Maximize memory utilization
  • Tasks of Main Memory Management of OS:
    • Keep track of which memory area is used by whom.
    • Allocate/de-allocated memory as need

4. File & Storage Management

  • Motivation:
    • Almost everything is stored in the secondary storage. Therefore, secondary storage accesses must be efficient (i.e., performance) and convenient (i.e., easy to program I/O function in application level)
    • Important data are duplicated and/or stored in tertiary storage.
  • Tasks of File Management
    • Create, manipulate, delete files and directories

  • Tasks of Storage Management
    • Allocate, de-allocate, and defrag blocks
    • Bad block marking
    • Scheduling for multiple I/O request to optimize the performance

5.  Networking

Allow communications between computers (more important for Client/Server OS and Distributed OS).


6. Protection

Protect hardware resources, Kernel code, processes, files, and data from erroneous
programs and malicious programs.


7. Command Interpreter

Command Interpreter is one of the most important system programs
. Because almost every OS provide system programs, some people argue that command interpreter is a part of OS.
  • Motivation:
    • Allow human users to interact with OS
    • Provide convenient programming environment to users
  • Tasks:
    • Execute a user command by calling one or more number of underlying system programs or system calls

  • Examples:
    • Windows DOS command window
    • Bash of Unix/Linux
    • C SHELL of Unix/Linux

No comments:

Post a Comment