You are on page 1of 13
Memory Management: Partitioning, Fixed and Variabl . anor le, Free Space management Techniques: Background js an important resource:of the computer system that needs to be managed by the operating system. TO the program, user needs to keep the program in main memory. The main memory is volatile. Therefore, 2 {eer needs to store his program in some secondary storage which is non-volatile. ‘ery process needs main memory since a process code, stack, heap (dynamically-allocated structures), and data fvarbles) must all reside in memory. The management of main memory is required to support for trukiprogramming. Many executables processes exist in main memory at any given time Diferent processes in main memory have different address space. Memory manager is the module of the operating stem responsible for managing memory. Programs after completion of execution move out of main,memory OF Frocesses suspended for completion of 1/0 can be swapped out on secondary storage to free the main memory for "other processes. New processes are required to be loaded in main memory. f available main memory is net sufficient to hold all © processes swapping between main memory and secondary memory is done. Memory managers move processes back " ind forth between memory and disk during execution. So it Is required that operating system should have some $rategy for the management of memory Mono-programming early computer systems and early microcomputer operating systems, mono- [usr pcoem] | Programming concept was used. ie concept was use eS. Only one program was residing in main memory at given point of time, “Operating system was residing in some portion of memory and other portion Fig. 5.1.1 : Mono-programming Was Spe to design but was not supporting muliprogramming. in this approach a ‘was simple Pas program could be always loaded at the same location. ‘Mutiprograming {required to support multiple processes simultaneous ‘Memory at the: ly. Since multiple processes are, Sametime, it increases processor utilization ifthe processes are 1/0 bound, CPU does not remai idle, time sharing basis. Multiprogramming gives il lsion of ‘unning multiple processes at once and provides ‘users with interactive response to processes, Be Muttiprogramming with Fixed and Variable Partitions » inthis scheme memory is divided into @ number of fixed-sized partitions. Process, Each partition may contain X@Ctly ong 15-—__ Co —— 1 __ Fig. 5.1.2; Fig.5.1.3 : Variable size par S.NO. Fixed partitioning Variable partitioning In multi-programming with fixed In multi- programming with variable L partitioning the main memory is. divided into partitioning the main memory is nat divided fixed sized partitions. into fixed sized partitions. In variable partitioning, the process is allocated 2, Only one process can be placed in a partition, verre ee P achunk of free memory. It does not utilize the main memory . Itutilizes the main memory effectively, * effectively, * ny ¥ ‘There is presence of internal fragmentation de ‘There is external fragmentation. and external fragmentation. 5. Degree of multi-programming is less. Degree of multi-programming is higher, 6. — Itis more easier to implement. It is less easier to implement. 7 There is limitation on size of process. ‘There is no limitation on size of process S.NO- 2. 8. Internal fragmentation In internal fragmentation fixed-sized memory, blocks square measure appointed to process. Internal fragmentation happens when the method or process is smaller than the memory. The solution of internal fragmentation is the best-fit block. Internal fragmentation occurs when memory is divided into fixed-sized partitions. The difference between memory allocated and required space or memory is called Internal fragmentation, Internal fragmentation occurs with paging and fixed partitioning. Itoccurs on the allocation of a process toa partition greater than the process's requirement. The leftover space causes degradation system performance. Itoccurs in worst fit memory allocation method. External fragmentation In external fragmentation, variable-sized memory blocks square measure appointed to the method. External fragmentation happens when the method or process is removed. The solution to external fragmentation is compaction and paging. External fragmentation occurs when memory is divided into variable size partitions based on the size of processes. The unused spaces formed between non- contiguous memory fragments are too small to serve a new process, which is called External fragmentation. External fragmentation occurs with segmentation and dynamic partitioning. Itoccurs on the allocation of a process toa partition greater which is exactly the same memory space as it is required. It occurs in best fit and first fit memory allocation method. a enc ee ve ON e Sco f, lala we m) aclanla eeckh oo IS recor. exter om (09 Crenrey. cca D de

You might also like