address space that consist of a sequence of bytes or words Secondary memory at its physical level is similarly organized It does not correspond to the way programs are constructed Mostly programs are organized into modules Some of which are un-modifiable (read or executable only) Some of which contain that can be modified
Operating Systems 25 Chapter # 5 S H E H E R Y A R M A L I K Memory Management Requirements 5.Physical organization Secondary memory of large capacity provides long term storage of program and data While a smaller main memory holds programs and data currently in use The organization of flow of information between main memory and secondary memory is a major system concern
Operating Systems 26 Chapter # 5 S H E H E R Y A R M A L I K Program Loading into Memory The core task of any memory management system is to bring and manage programs in main memory In almost all modern multiprogramming systems, this task involves sophisticated scheme known as virtual memory Virtual memory is in turn based on the use of one or both of two basic techniques Segmentation Paging
Operating Systems 27 Chapter # 5 S H E H E R Y A R M A L I K Memory Management Techniques Different schemes used in operating systems to allocate memory to processes Contiguous Memory Allocation Single process system Fixed size (static) partition memory Variable sized (dynamic) partition memory Non Contiguous Memory Allocation Paging Segmentation Paged segmentation Demand paging Demand segmentation Virtual memory
Operating Systems 28 Chapter # 5 S H E H E R Y A R M A L I K Single Process System Memory is divided into two partitions One for user process and One for the operating system Most common to place the operating system in low memory Run one process at a time in high memory Memory management is very simple Example; MS-DOS system is an example of this system Unused Operating system Operating system User process User process
Operating Systems 29 Chapter # 5 S H E H E R Y A R M A L I K Fixed Sized Partition Memory Memory is divided into a number of fixed partitions Each partition may contain exactly one process When partition is free another process is loaded into free partition Waste considerable amount of main memory when processes are smaller than allocated partition Called internal fragmentation First employed in multiprogramming computers Used in IBM OS/360 Disadvantages Prevent a process being run due to unavailability of sufficient size partition Internal fragmentation wastes space
Operating Systems 30 Chapter # 5 S H E H E R Y A R M A L I K Fixed Sized Partition Memory Process B 200 K Process B 200 K Operating System Operating System Process A 150 K Process A 150 K Process C 300 K Process C 300 K 300 K 0 K 1000 K 100 K 600 K Partition 3 = 400 K Partition 2 = 300 K Partition 1 = 200 K
Operating Systems 31 Chapter # 5 S H E H E R Y A R M A L I K Variable-Sized Partition Memory
You've reached the end of your free preview.
Want to read all 77 pages?
- Fall '19
- Virtual memory