Fine-Grained vs. Coarse-Grained Segmentation

This lesson briefly discusses the two types of segmentation: fine-grained segmentation and coarse-grained segmentation.

We'll cover the following

Most of our examples thus far have focused on systems with just a few segments (i.e., code, stack, heap); we can think of this segmentation as coarse-grained, as it chops up the address space into relatively large, coarse chunks. However, some early systems (e.g., Multics1. “Introduction and Overview of the Multics System” by F. J. Corbato, V. A. Vyssotsky. Fall Joint Computer Conference, 1965. One of five papers presented on Multics at the Fall Joint Computer Conference; oh to be a fly on the wall in that room that day! 2. “Virtual Memory, Processes, and Sharing in Multics” by Robert C. Daley and Jack B. Dennis. Communications of the ACM, Volume 11:5, May 1968. An early paper on how to perform dynamic linking in Multics, which was way ahead of its time. Dynamic linking finally found its way back into systems about 20 years later, as the large X-windows libraries demanded it. Some say that these large X11 libraries were MIT’s revenge for removing support for dynamic linking in early versions of UNIX!) were more flexible and allowed for address spaces to consist of a large number of smaller segments, referred to as fine-grained segmentation.

Segment table

Supporting many segments requires even further hardware support, with a segment table of some kind stored in memory. Such segment tables usually support the creation of a very large number of segments, and thus enable a system to use segments in more flexible ways than we have thus far discussed. For example, early machines like the Burroughs B5000 had support for thousands of segments, and expected a compiler to chop code and data into separate segments which the OS and hardware would then support“Dynamic Storage Allocation Systems” by B. Randell and C.J. Kuehner. Communications of the ACM, Volume 11:5, May 1968. A nice overview of the differences between paging and segmentation, with some historical discussion of various machines.. The thinking at the time was that by having fine-grained segments, the OS could better learn about which segments are in use and which are not and thus utilize main memory more effectively.

Get hands-on with 1200+ tech skills courses.