From 1b9d31142f1755b7133d0ddfcc465325862292a3 Mon Sep 17 00:00:00 2001 From: Robert Strandh Date: Tue, 3 Jun 2014 16:23:46 +0200 Subject: [PATCH] More about the disposition of the address space. --- Documentation/chap-address-space.tex | 39 ++++++++++-- Documentation/fig-address-space.fig | 94 ++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 6 deletions(-) create mode 100644 Documentation/fig-address-space.fig diff --git a/Documentation/chap-address-space.tex b/Documentation/chap-address-space.tex index 8a43866..80ddd14 100644 --- a/Documentation/chap-address-space.tex +++ b/Documentation/chap-address-space.tex @@ -16,13 +16,40 @@ storage must have associated physical disk memory. The other half of the address space (say the lower half) contains mainly the global heap, aside from a small amount of space dedicated to interrupt handlers and other architecture-imposed data structures. -This part of the address space is divided in (roughly two) halves. -Only half of it requires associated physical disk memory. Aside from -the architecture-imposed data structures. The two halves basically map -to the same disk space. The reason for this organization is that it -makes it easy to implement the global garbage collector +The address space for the heap is divided in two halves. Only one +half requires associated physical disk memory. Thus, aside from the +architecture-imposed data structures, the two halves map to the same +disk space. The reason for this organization is that it makes it easy +to implement the global garbage collector \seechap{chap-garbage-collection}. The method invented by Kermany et al \cite{Kermany:2006:CCI:1133981.1134023} divides the heap address space in two halves, but requires physical memory only for a little -more than half of it. +more than half of it. +\refFig{fig-address-space} illustrates how the organization of the +address space might look on a computed equipped with the x86-64 +processor. This processor has a theoretical virtual address space of +$2^{64}$ bytes, but the real virtual address space might be limited +to $2^{46}$ bytes. If so, then the middle of the theoretical address +space is not part of the real address space. + +\begin{figure} +\begin{center} +\inputfig{fig-address-space.pdf_t} +\end{center} +\caption{\label{fig-address-space} +Address space on x86-64.} +\end{figure} + +As \refFig{fig-address-space} illustrates, the available disk space is +typically a small fraction of the possible virtual address space. For +example, $2^{46}$ bytes is $64$ terabytes which is two orders of +magnitude larger than a typical hard disk. In that case, the disk +space is divided (not necessarily in equal parts) between the global +heap and thread-local storage. Furthermore, the size of each +thread-local storage can be configured according to whether a large +number of threads should be possible, or, on the contrary, each thread +should have a large stack. + +Main memory is not shown in \refFig{fig-address-space}, simply because +it just works as a demand-paged cache for the available disk space. diff --git a/Documentation/fig-address-space.fig b/Documentation/fig-address-space.fig new file mode 100644 index 0000000..16ebc2f --- /dev/null +++ b/Documentation/fig-address-space.fig @@ -0,0 +1,94 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 2925 3600 4275 4950 +6 2925 3900 4275 4950 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 + 3000 3900 4200 3900 4200 4500 3000 4500 3000 3900 +4 1 0 50 -1 4 12 0.0000 0 195 1320 3600 4875 space on disks\001 +-6 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 3600 3750 3600 3600 4200 3600 4200 3750 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 3000 3750 3000 3600 3600 3600 3600 3750 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3600 3900 3600 4500 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 2400 1200 1800 6000 1800 6000 2400 1200 2400 +2 2 0 1 0 7 50 -1 45 0.000 0 0 -1 0 0 5 + 3000 2400 3000 1800 4200 1800 4200 2400 3000 2400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 5700 1800 5700 2400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 5400 1800 5400 2400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 5100 1800 5100 2400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4800 1800 4800 2400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4500 1800 4500 2400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3000 1650 3000 1500 4200 1500 4200 1650 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4500 1425 4350 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4725 1425 4650 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4950 1425 4950 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5250 1425 5250 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5475 1425 5550 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5700 1425 5850 1725 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 2100 1800 2100 2400 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1650 1425 1650 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2550 1425 2550 1725 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 1200 2550 1200 2700 1800 2700 1800 2550 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 2100 2550 2100 2700 2700 2700 2700 2550 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 5400 2550 5400 2700 6000 2700 6000 2550 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 5700 2775 3900 3525 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 2400 2775 3375 3525 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 1500 2775 3225 3525 +4 1 0 50 -1 4 12 0.0000 0 135 105 1200 1650 0\001 +4 1 0 50 -1 4 12 0.0000 0 135 105 6000 1650 2\001 +4 0 0 50 -1 4 6 0.0000 0 75 120 6075 1500 64\001 +4 1 0 50 -1 4 12 0.0000 0 180 660 3675 900 not part\001 +4 1 0 50 -1 4 12 0.0000 0 195 1275 3675 1380 address space\001 +4 1 0 50 -1 4 12 0.0000 0 150 1005 5100 1125 thread-local\001 +4 1 0 50 -1 4 12 0.0000 0 150 525 5100 1365 space\001 +4 1 0 50 -1 4 12 0.0000 0 150 315 1650 1125 half\001 +4 1 0 50 -1 4 12 0.0000 0 195 420 1650 1365 heap\001 +4 1 0 50 -1 4 12 0.0000 0 150 315 2550 1125 half\001 +4 1 0 50 -1 4 12 0.0000 0 195 420 2550 1365 heap\001 +4 1 0 50 -1 4 12 0.0000 0 195 900 3675 1140 of existing\001