What is the main functions of operating system

OS functions have been characterized as satisfying one of the following basic requirements:

■ Device management

■Process, thread, and resource         management

■Memory management

■ File management

 

1) Device management

The OS manages the allocation, isolation, and sharing of the devices according to policies chosen by the designer or system administrator. Even operating systems that do not support multiprogramming incorporate device management. Most operating systems treat all devices such as disks, tapes, terminals, and printers in the same general manner, but they provide special management approaches for the processor and memory. Device management refers to the way the generic devices are handled.

The process manager allows multiple users (or processes and threads) to share the machine by providing multiple execution contexts and scheduling the processor so that each thread receives an equitable fraction of the available time. Primary considerations of the process manager are how it will enforce isolation of resource access among the processes (according to some policy) and how it will allow the processes to circumvent the isolation mechanism when the policy calls for the processes to share a resource. Chapters 3 through 5 describe the issues related to designing a process manager.

 

2) PROCESS, THREAD, AND RESOURCE MANAGEMENT

Processes and threads are the basic units of computation defined by programmers, and (abstract) resources are the elements of the computing environment needed by a process. So that its threads can execute. This part of the OS implements all parts of the abstract machine that create the abstractions of processes, threads, and resources (see Figure 2.3). This part of the OS is completely responsible for managing the hardware processor resource and various abstract resources such as messages. It shares the responsibility of managing the hardware primary memory with the memory manager.

 

3) MEMORY MANAGEMENT

The memory manager cooperates with the process manager to administer the allocation and use of the primary (also called the executable or main) memory resource. Every process requests and uses memory according to its program definition. The memory manager allocates memory to competing processes according to a specified policy and enforces resource isolation. A strategy that allows sharing is more complex to manage than one with no sharing. Hence, the memory manager incorporates mechanisms to allow blocks to be shared in the presence of the isolation mechanism.

 

4) FILE MANAGEMENT

Files are an abstraction of storage devices. Information stored in the main memory will be overwritten as soon as the memory is reallocated from a process. Information that is to be saved must be copied to a persistent storage device, such as a CD-ROM or magnetic disk. The file manager implements this abstraction by interacting with the device manager and the memory manager. The need to produce abstractions of the details of I/O operations for storage devices was one of the first pushes toward operating systems, and files are the classic abstract resource in operating systems.

Different file managers provide different abstractions of storage devices, with the requirements ranging from those that model the storage system as a byte stream to those that treat it as a logical repository for indexed records.

In modern operating systems, the file system can be distributed across a network of machines so that a process on one machine can read and write files stored on its local system, as well as those stored in the storage devices of other machines accessible using a network.

 

 

Enjoyed this article? Stay informed by joining our newsletter!

Comments

You must be logged in to post a comment.

About Author