big chunk of “free” space right in the middle, between the stack and the heap
why not have a base and bounds pair per logical segment of the address space
A segment is just a contiguous portion of the address space of a particular length
What segmentation allows the OS to do is to place each one of those segments in different parts of physical memory, and thus avoid filling physical memory with unused virtual address space.
sparse address spaces
Now let’s look at an address in the heap, virtual address 4200 (again refer to Figure 16.1). If we just add the virtual address 4200 to the base of the heap (34KB), we get a physical address of 39016, which is not the correct physical address. What we need to first do is extract the offset into the heap, i.e., which byte(s) in this segment the address refers to. Because the heap starts at virtual address 4KB (4096), the offset of 4200 is actually 4200 minus 4096, or 104. We then take this offset (104) and add it to the base register physical address (34K) to get the desired result: 34920
y setting a code segment to read-only, the same code can be shared across multiple processes, with- out worry of harming isolation; while each process still thinks that it is ac- cessing its own private memory,
will perform a system call to grow the heap (e.g., the traditional UNIX sbrk() system call)
e call this problem external frag- mentation
compact physical memory by rearranging the existing segments
best-fit (which keeps a list of free spaces and returns the one closest in size that satisfies the desired allocation to the requester
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.