Characteristics
|
Paging
|
Segmentation
|
Definition
|
Paging breaks physical memory Into
fixed-sized blocks called frames and logical memory into blocks of the same
size called pages. When a process is to be executed, its pages are
loaded into any available memory frames from the backing store. The backing
store is divided into fixed sized blocks that are of the same size as the
memory frames.
|
Segmentation is the division of
computer’s primary memory into segments or sections. In
segmentation, a reference to a memory location includes a value that
identifies a segment and an offset within that segment.
|
Length
|
All pages are divided into equal
length.
|
The size of a memory segment is
generally not fixed and may be as small as a single byte.
|
Showing posts with label Paging and Segmentation. Show all posts
Showing posts with label Paging and Segmentation. Show all posts
Monday, 27 April 2015
Difference between Paging and Segmentation
Wednesday, 21 January 2015
Demand Paging
Whenever a program is executed it is required to be loaded into main memory. This loading can be done by two methods:
1) By loading the entire program into main memory. But Problem with this technique is that if user wants to select limited options, whole program will be loaded regardless of user selection.
2) Another Approach is to load only those pages which are currently needed. “The Technique of loading in which only those pages are loaded into main memory which is currently needed is called Demand Paging”. The pages which are not required are not loaded into main memory.
This technique has the advantage that less memory is consumed and more processes can be loaded at the same time which utilizes more resources. Demand paging is very similar to swapping. The whole program resides in secondary storage and when process execution is required, it is swapped into main memory and in spite of loading whole program only currently required pages ware swapped.
To perform this task swapper is used which is called pager. It does not swap any program until it is required in the main memory. Additional hardware is also required to check that which pages are in memory and which pages are on disk.
1) By loading the entire program into main memory. But Problem with this technique is that if user wants to select limited options, whole program will be loaded regardless of user selection.
2) Another Approach is to load only those pages which are currently needed. “The Technique of loading in which only those pages are loaded into main memory which is currently needed is called Demand Paging”. The pages which are not required are not loaded into main memory.
This technique has the advantage that less memory is consumed and more processes can be loaded at the same time which utilizes more resources. Demand paging is very similar to swapping. The whole program resides in secondary storage and when process execution is required, it is swapped into main memory and in spite of loading whole program only currently required pages ware swapped.
To perform this task swapper is used which is called pager. It does not swap any program until it is required in the main memory. Additional hardware is also required to check that which pages are in memory and which pages are on disk.
Subscribe to:
Posts (Atom)
