Storage Management Functions Of An Operating System.

Q3. Explain the Storage Management functions of an operating system.

Ans. The working of a modern computer system, memory plays a central role. Both CPU and Input/output system interact with memory. Memory is a large array of words or bytes, each with its own address. The CPU reads from and writes to specific memory addresses.

Figure: Memory plays a central role in Computer System

A program must be assigned some memory area and loaded into memory in order to be executed. As the program executes, it accesses program instructions and data from memory by generating addresses of the allocated memory. When the program terminates, its memory space is declared free, and the next program may be given the same memory area. There can be many user programs loaded in the memory along with system programs and operating system.

  1. Contiguous Storage Allocation

In this classical approach, each problem, which is to be executed, is allocated a contiguous storage memory. Each job step is considered as a single independent entity for allocation of a contiguous storage area. At every job step initiation, the OS has to ensure that sufficient contiguous area is available to accommodate it.

  1. Non Contiguous Storage Allocation

In non contiguous storage allocation, a program can be stored in non-contiguous memory areas. A program is divided into smaller components of equal sizes. One of more components can be stored in the non contiguous memory areas. Each component in that particular memory area is provided addresses 0, 1, 2, . . . , n.

For example, a program Px requires 90 K memory for its execution. But main storage cannot provide 90 K contiguous memory though it has 120 K available in non-contiguous form.

 

Now, let us say, the program is divided into smaller components of 10 K (say) (component size can be even smaller up to just a word size). So, nine components are stored as four in first free memory area and five in next free memory area.

 

Leave a Reply

Your email address will not be published. Required fields are marked *