PAGING
The 6-bit page value is used to select a proper entry in process page table.
The 6-bit process entry occupying the six most significant bit and the 10-bit offset occupying the 10 least significant bit forms a 16-bit physical address.
16 bit logical address(6 bit page,10 bit offset)------->page table(6 bit page)------>16 bit physical address(6 bit from page table,10 bit from offset)
SEGMENTATION
The 4-bit segment of a logical address selects the proper entry in the process segment table.
The base value is added to the 12 bit offset value to get the 16 bit physical address.
16 bit logical address(4 bit segment,12 bit offset)------>segment table(4 bit segment of logical address)------->16 bit physical address(4 bit segment+12 bit offset)
- Paging is used to get a large linear address space without having to buy more physical memory.
- Paging does not distinguish and protect procedures and data separately.
- Paging does not facilitate sharing of procedures.
- Paging is transparent to programmers(system handles it automatically).
- Mapping from logical to physical address is different for paging and segmentation.
- Example:
The 6-bit page value is used to select a proper entry in process page table.
The 6-bit process entry occupying the six most significant bit and the 10-bit offset occupying the 10 least significant bit forms a 16-bit physical address.
16 bit logical address(6 bit page,10 bit offset)------->page table(6 bit page)------>16 bit physical address(6 bit from page table,10 bit from offset)
SEGMENTATION
- Segmentation allows programs and data to be broken up into logically independent address spaces and to aid sharing and protection.
- Segmentation distinguishes and separately protects procedures and data.
- Segmentation facilitate sharing of procedures.
- Segmentation requires programmer to be aware of memory limits as programmer tries to allocate memory to functions and variables or tries to access read
- only memory violation, which results in segmentation fault.
- Mapping from logical to physical address is different for paging and segmentation.
- Example:
The 4-bit segment of a logical address selects the proper entry in the process segment table.
The base value is added to the 12 bit offset value to get the 16 bit physical address.
16 bit logical address(4 bit segment,12 bit offset)------>segment table(4 bit segment of logical address)------->16 bit physical address(4 bit segment+12 bit offset)
No comments:
Post a Comment