What are the differences between paging and segmentation?


Paging and segmentation
Paging
Segmentation
Computer memory is divided into small partitions that are all the same size and referred to as, page frames. Then when a process is loaded it gets divided into pages which are the same size as those previous frames. The process pages are then loaded into the frames.
Memory-management scheme that supports user view of memory.
Computer memory is allocated in various sizes (segments) depending on the need for address space by the process.

Address generated by CPU is divided into: Page number (p) – used as an index into a page table which contains base address of each page in physical memory.
Page offset (d) – combined with base address to define the physical memory address that is sent to the memory unit.
Logical address consists of a two tuple: <segment-number, offset>
Transparent to programmer (system allocates memory)
Involves programmer (allocates memory to specific function inside code)
No separate protection
Separate protection
No separate compiling
Separate compiling
No shared code
Share code

0 comments:

Feel free to contact the admin for any suggestions and help.