Expert C Programming

(Jeff_L) #1

While on the subject of these numbers, note that all disk manufacturers use decimal rather than binary
notation for disk capacity. Thus a 2-Gbyte disk will hold 2,000,000,000 bytes and not 2,147,483,648
bytes.


A 64-bit address space is really large. It can fit an entire movie for high-definition TV in memory at
once. They haven't yet settled the specification for high-definition TV, but it will probably be close to
SVGA which is 1024 x 768 pixels, each of which needs, say, three bytes of color information.


At 30 frames per second (as in the current NTSC standard) a two-hour movie would take:


120 minutes= x 60 seconds x 30 frames x 786,432 pixels x 3 color bytes


= 509,607,936,000 bytes


= 500Gbytes of memory


So you could fit not just one, but 36 million high-definition TV movies (orders of magnitude more
than every movie ever made, and then some) into a 64-bit virtual address space. You still have to
leave room for the operating system, but that's OK. The UNIX kernel is constrained by the current
SVID [1] to 512 Mbytes. Of course, there's still the small matter of physical disk to back up this virtual
memory.


[1] The SVID – System V Interface Definition – is a weighty document that describes the


System V API.


The real challenge in computer architecture today is not memory capacity, but memory speed. Your
brand new shiny red Pentium chip isn't going to win you anything if your software is actually
constrained by disk and memory latency (access time). To be precise, there is a wide and increasing
gap between memory and CPU performance. Over the past decade CPU's have doubled in speed every
one-and-a-half to two years. Memory gets twice as dense (64-Kb chips increase to 128 Kb) in the
same period, but its access time only improves by 10%. Main memory access time will be even more
important on huge address space machines. When you have access to huge amounts of data, the
latency for moving it around will start to dominate software performance. Expect to see a lot more use
of cache and related technologies in the future.


Handy Heuristic


Where the MS-DOS 640Kb Limit Comes From


There's a hard memory limit of 640Kbytes available to applications that run under MS-
DOS. The limit arises from the maximum address range of the Intel 8086, the original DOS
machine. The 8086 supported 20-bit addresses, restricting it to 1 Mbyte memory in total.
That address space was further limited by reserving certain segments (64Kbyte chunks) for

Free download pdf