In the last few days we have learned about memroy management and how techniques like paging and segmentaiton aer used to manage memroy in the operating system. Now we will be looking on some key differences between paging and segmentation.
So what are some of the key differences of paging and sengmentation.
- The segments vary in size while the pages do not vary in size.
- The segments are specified by the programmer to the compiler or assembler while the compiler or memory management system itself divides the program into pages.
- There is no internal fragmentation in segmentation but there is internal fragmentation in paging within frames.
- Segmentation suffers from external fragmentations but there is no external fragmentation in paging.
- The OS must maintain a segment table for each process to show the load address and length of segment also must maintain a page table to show how much frames are being used by each page.
- The OS must maintain a list of free holes in the memory and a free list of frames.
- The processor uses segment number and offset to calculate absolute address and it also uses page number to calculate absolute address.