Re: The Linear Address Space

From: Cameron Gibbs (odly_at_hotmail.com)
Date: 04/30/04

  • Next message: Bjarni Juliusson: "Re: The Linear Address Space"
    Date: Fri, 30 Apr 2004 10:40:39 +0000 (UTC)
    
    

    I think the penny has dropped with Bjarni's post but everyone else has
    helped.
    Thankyou.

    Of course I may still have a few things to clear up.
    Reply embedded.

    --
    ______________________________
    Reply to the group.
    ______________________________
    Procedurized mind at work.
           Adhere to the sequence.
    The PC & Electronic Data Map Project:
    http://members.dodo.com.au/~cameron111
    Bjarni Juliusson <bjarni.ferret@update.ferret.uu.se_remove_the_animal> wrote
    in message news:lTbkc.57607$mU6.235602@newsb.telia.net...
    > The virtual address space is
    > a 4Gb space of addresses that you access with instructions like
    >
    >    mov eax, [ebx]
    >
    > Here, ebx contains a 32 bit address in the 2^32 bytes = 4G bytes virtual
    > address space.
    Now I'm getting somewhere practical :)
    > A physical address
    > is an address as it appears electrically on the system bus outside of
    > the CPU. The virtual address space exists only inside the CPU. The CPU
    > itself performs a translation from virtual addresses to physical
    > addresses when a program makes an address reference. On startup, various
    > devices on the bus have either already been assigned hardwired physical
    > addresses, or set their addresses up by some means. How this works on
    > PCI busses is not my field, but that is not important for this
    > discussion. The RAM in the computer is one of the devices that are
    > mapped from start. Usually, it is simply mapped from physical address 0
    > and up, for as many addresses as there is RAM in the machine. One
    > address in that range corresponds to one byte of storage in a RAM chip.
    > One address somewhere else might correspond to a byte in a device
    > register in, for example, a hard drive.
    Yay!!
    That's what I needed to know.
    Now I understand what "mapping" actually is and where this map actually
    resides.
    Now I know what I have to do and what is already done for me (at least in a
    clean system -no OS).
    Basically from this I can conclude that RAM (where a program sits as it is
    executing) has addresses 00 up.
    So when I write a program, I can see it inside of this space and I can point
    to it and manage it as necesary.
    In actual fact, there is an I/O Address Space, a Memory Address Space and a
    Virtual Address space which is managed by an Operating System.
    The Virtual and Memory Address Spaces often overlap because if there is no
    Operating System then the Virtual Address Space for a program is the RAM
    part of the Memory Address Space.
    Now below to the question of what happens in the presence of an Operating
    System.
    > When a program needs to read a sector (usually 512 bytes) of data from a
    > hard drive, it in essence writes a read command to the drive, and
    > provides the drive with a physical address where it wants the read data.
    > In reality this involves a little more fiddling with things like DMA,
    > and direct interfacing to hard drives is usually only done by the OS.
    > The OS knows about the physical addresses and is responsible for setting
    > up the virtual address space, and user programs run only in a virtual
    > address space. In principle, anyway.
    >
    > > So if you want to access a byte of Hard Disk space, one first commands
    it's
    > > HDD sector to read it into RAM and then one can select the byte with
    it's
    > > Virtual Address which would automatically make itself relative when you
    use
    > > the paging mechanism.... I think.
    >
    > The sector is put somewhere in RAM, and each byte in it is readable to
    > the CPU at the base address which you provided to the HD, plus the
    > offset within the sector. Usually, a user program demands some data from
    > a hard drive, and the OS reads it in. It then sees to it that the
    > physical addresses that contain the data are accesible in the virtual
    > address space of the user program.
    So this is where writing a program is OS specific.
    Every OS would have a different protocol for managing how a program is given
    it's own Virtual Address Space.
    Can I assume then that if you have an Assembler running in Windows that it w
    ould compile a program based on the Window's protocols and likewise for an
    Assembler for another OS?
    I guess it would also be likely that you could get an Assembler running
    under Windows to compile a program to run under Linux or to run on a clean,
    OS free system.
    Thanks again to all who are helping.
    >>From Cameron.
    I actually wrote a lot more on this but understanding is as much about what
    you throw away (put aside for another day) as it is about what you keep :)
    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.669 / Virus Database: 431 - Release Date: 4/26/04
    

  • Next message: Bjarni Juliusson: "Re: The Linear Address Space"

    Relevant Pages

    • Re: A depressing anniversary
      ... RAM gets faster. ... GPUs have been getting faster at a much ... concept of a dual-core CPU was remotely widespread. ... Talking about RAM caches in hard drives is useless. ...
      (rec.arts.sf.science)
    • Re: CPU or Motherboard problem? Or both?
      ... Anyway, after receiving my product, I attached two extra hard drives ... I downloaded memtest and tested the ram with 5 passes. ... I downloaded "CPU Burn-in" and let it rip. ... It looks to have three phase power and is socket LGA775. ...
      (alt.comp.hardware.pc-homebuilt)
    • Re: What are the factors of "fast" computer speed?
      ... But on the subject of memory. ... and hard drives. ... The thing to know about cpu cache is that it is fixed. ... But to replace the CPU may mean replacing the motherboard and ram. ...
      (microsoft.public.windowsxp.general)
    • p5s800 problem
      ... the hard drives are spinning too. ... I tested power supply, cpu, and ram ... pulled video directly into the motherboard, ... I clared the rtc ram too and there was no change. ...
      (alt.comp.periphs.mainboard.asus)
    • Re: expanding ram
      ... I am working with some very large databases(in the 500 ... any common mother board out there that can hold that kind of ram. ... A RAM SSD has close to zero seek time (a couple microseconds might ... Connecting ordinary hard drives, on a caching RAID controller, does ...
      (alt.comp.periphs.mainboard.asus)