Systems Components

|

Operating Systems Process Management


In operating systems, process is defined as “A program in execution”. Process can be considered as an entity that consists of a number of elements, including: identifier, state, priority, program counter, memory pointer, context data, and I/O request. The above information about a process is usually stored in a data structure, typically called process block.

Figure 1 shows a simplified process block. Because process management involves scheduling (CPU scheduling, I/O scheduling, and so on), state switching, and resource management, process block is one of the most commonly accessed data type in operating system. Its design directly affects the efficiency of the operating system. As a result, in most operating systems, there is a data object that contains information about all the current active processes. It is called process controller.


Figure 2 shows the structure of a process controller, which is implemented as a linked-list of process blocks.

In order to achieve high efficiency, process controller is usually implemented as a global variable that can be accessed by both the kernel modules and nonkernel modules. For example, any time a new process (task) is created, the module that created this process should be able to access the process controller to add this new process. Therefore, process controller – the data object that controls the current active process – is usually implemented as a category-5 global variable. This means, both the kernel modules and nonkernel modules can access process controller to change its fields and these changes can affect the uses of process controller in kernel modules.


Main Memory Management

Memory management is the act of managing computer memory. In its simpler forms, this involves providing ways to allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. The management of main memory is critical to the computer system. Main memory is a volatile storage device. It loses its contents in the case of system failure.

The operating system is responsible for the following activities in connections with memory management:
  • Keep track of which parts of memory are currently being used and by whom.
  • Decide which processes to load when memory space becomes available.
  • Allocate and deallocate memory space as needed.

Another strategy for managing memory is the virtual memory, which allows programs to run even when they are only partially in main memory. The basic idea behind this strategy is that the combine size of the program, data, and stack may exceed the amount of physical memory available for it. The operating system keeps those parts of the program currently in use in main memory, and the rest on the disk.

Virtual memory can also work in a multiprogramming system, with bits and pieces pf many programs in memory at once. While a program is waiting for a part of itself to be brought in, it is waiting for I/O and cannot run, so the CPU can be given to another process, the same way as for any other multiprogramming system. Most virtual memory systems use a technique called paging.

File Management

Also referred to as simply a file system or filesystem. The system that an operating system or program uses to organize and keep track of files. For example, a hierarchical file system is one that uses directories to organize files into a tree structure.

Although the operating system provides its own file management system, you can buy separate file management systems. These systems interact smoothly with the operating system but provide more features, such as improved backup procedures and stricter file protection.

The operating system is responsible for the following activities in connections with file management:
  • File creation and deletion.
  • Directory creation and deletion.
  • Support of primitives for manipulating files and directories.
  • Mapping files onto secondary storage.
  • File backup on stable (nonvolatile) storage media.

I/O System Management

The I/O system consists of:

  • A buffer-caching system
  • A general device-driver interface
  • Drivers for specific hardware devices

Secondary Storage Management


Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory.


Most modern computer systems use disks as the principle on-line storage medium, for both programs and data.


The operating system is responsible for the following activities in connection with disk management:

  • Free space management
  • Storage allocation
  • Disk scheduling

Protection System

Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources.

The protection mechanism must:

  • distinguish between authorized and unauthorized usage.
  • specify the controls to be imposed.
  • provide a means of enforcement.

Command Interpreter System

Many commands are given to the operating system by control statements which deal with:

  • process creation and management
  • I/O handling
  • secondary-storage management
  • main-memory management
  • file-system access
  • protection
  • networking

The program that reads and interprets control statements is called variously:

  • command-line interpreter
  • shell (in UNIX)

Its function is to get and execute the next command statement.

Slide 9
n

0 comments:

Post a Comment