Please enable JavaScript.
Coggle requires JavaScript to display documents.
Main Memory (Paging (Basic Method (Consists of breaking physical memory…
Main Memory
Paging
Paging is another memory management scheme that offers the advantage of permitting the physical address of a process to be non contiguous.
Paging avoids external fragmentation and the need for compaction, segmentation does not offer this.
-
Basic Method
Consists of breaking physical memory into fixed-sized blocks called frames and breaking logical memory into blocks the same size called pages.
When a process is to be executed its pages are loaded into any available memory frames from their source.
Every address generated by the CPU is divided into two parts, page number and a page offset. Page number is used as an index into a page table.
Shared Pages
-
If the code executing in time sharing is reentrant code it can be shared. Reentrant code is non self modifying, meaning it never changes during execution.
Each process involved has its own copy of registers and dats storage but only one code will be executed.
Swapping
A process must be in memory to be executed. But it can be swapped temporarily out of memory to a backing storage and then brought back to continue execution.
Standard Swapping
Involves moving processes between main memory and a backing store. This backing store is usually a fast disk.
The system maintains a ready queue of all processes whose memory images are in the backing store and are ready to run.
-
Segmentation
Basic Method
A logical address is a collection of segments. Each segment has a name and length. The addresses specify the segment name and the offset within the segment.
When a program is compiled the compiler constructs segments reflecting the input program. For example a C program can separate the segments in the following way: The Code, Global Variables, The Heap, The Stacks, The Standard C Library.
Segmentation is a memory management scheme that supports the programmer point of view where the memory is thought as variable-sized segments with no ordering among segments.
Segmentation Hardware
The programmer can refer to objects in the program by a two dimensional address, but the physical memory is a one dimensional sequence of bytes.
A mapping is done by the segment table. Each entry has a segment base and a segment limit. Segment base contains the physical address in memory. Segment limit specifies the length of the segment.
-