Re: [SLUG] Challenge

From: Eben King (eben01@verizon.net)
Date: Thu Oct 12 2006 - 12:42:13 EDT


On Thu, 12 Oct 2006, steve szmidt wrote:

> Hi all,
>
> Here's an interesting mystery for those of you with too much time on your
> hands:
>
> We all know that capacity on computers is measured in bytes, where 1KB is
> 1024bytes. It arrives of course at 1024 since we deal with a binary system
> which grows like this.
>
> 2 4 6 8 16 32 64 128 256 512 1024
>
> Pretty straight forward.
>
> Now some of you have 1GB RAM. When you run a check on that the number that
> shows up is 1,048,048.

Actually Linux says:

eben@pc:~$ free
              total used free shared buffers cached
Mem: 1036908 1018880 18028 0 142216 478264
-/+ buffers/cache: 398400 638508
Swap: 3212988 2740 3210248

but I forget how much RAM is in this box really.

XP says:

C:\>mem

     655360 bytes total conventional memory
     655360 bytes available to MS-DOS
     598304 largest executable program size

    1048576 bytes total contiguous extended memory
          0 bytes available contiguous extended memory
     941056 bytes available XMS memory
            MS-DOS resident in High Memory Area

> How do they arrive at 1,048,048?

Arithmetic tells me that 2^20 - 1048048 = 512 + 16 = 2^9 + 2^4, so I'm going
to guess a half-K paging scheme plus 16 bytes bootstrap code for the CPU.
Close?

-- 
-eben      QebWenE01R@vTerYizUonI.nOetP      royalty.no-ip.org:81
A. A Top Poster                       \  http://www.fscked.co.uk/
B. Who's there?                        \  writing/
A. Knock-knock -- from bobward@xxx.com  \  top-posting-cuss.html
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:51:38 EDT