Re: Address translation mechanism in i-nodes

From: Lew Pitcher (Lew.Pitcher_at_td.com)
Date: 05/25/05


Date: Wed, 25 May 2005 15:00:06 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

50295@web.de wrote:
> Hi!
>
> I'm looking for information about how does the linux system (using the
> i-node mechanism) actually go about finding an address, say 0x0894AC0?
> I assume it would have to determine if the address is locatable via the
> direct, or (single, double, and triple) indirect blocks, by doing a
> byte-shift like the Virtual address translation mechanism does. Any
> pointers anyone?

As far as I know, there is /no/ relationship between inode values and
memory addresses. They are two different things used for two different
purposes.

inodes are used to determine media addresses, such as the addresses of
specific blocks of data. inodes are assigned sequentially from a
specific point on the media, and are incremented one for each
inode-sized block of media space. The translation from inode to media
address is usually something like
  cyl = (fixed_constant + (inode# * blocksize)) / blocks_per_cyl
etc.

OTOH, memory addresses (both virtual and real) are managed as components
of the process table entry for the process in question, or in the memory
freelist for unused memory. For processes, there is a table that
provides the link between a range of virtual addresses and a
corresponding range of real addresses. This table is partially
implemented in hardware, providing a stage of 'address translation'
between addresses generated by executing code, and addresses asserted on
the processor bus.

For non-process memory, it's just a 'freelist' chain of real addresses
and memory block sizes, maintained by the kernel. No inode linkage there.

The closest that you get to mapping memory addresses to media space is
in the "swap" file (the Linux paging process). I don't know the
specifics of how Linux handles this, but in general, the kernel
maintains another table (which may be part of the virtual-to-real table)
that maps address space / virtual address ranges to blocks of data in
the paging media. While the paging media /may/ be implemented as a file
in filespace, and thus have inodes, the inodes are not directly used in
memory address value computations.

- --

Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFClMs1agVFX4UWr64RAgq/AKCd80WvizBg1WhuwDzFXrs9yx2aJQCdEYIl
Baurb/U7U5qb/3LR5mkP2fA=
=6RgL
-----END PGP SIGNATURE-----



Relevant Pages

  • Re: Problem with playback of recorded tv (new)
    ... Media Center Edition ... onboard memory does it have.... ... Do you have the current AMD XP X2 CPU driver from the AMD Website ...
    (microsoft.public.windows.mediacenter)
  • Re: [RFC][PATCH] inotify 0.9
    ... particularly desire to have them all pinned in memory. ... >>to pin up to 32MB? ... > inodes in memory, and you have to explicitly add watches anyhow. ... and modern systems are hitting its numerous limits. ...
    (Linux-Kernel)
  • RE: Can I go back to regular Windows XP?
    ... records in WMA format. ... It works like a memory stick - just shove it into your ... It came back with the Media Center Edition installed - before ... installs/uninstalls, and many days of hair pulling trying to find solution, I ...
    (microsoft.public.windows.mediacenter)
  • Re: [RFC][PATCH] inotify 0.9
    ... We are pinning the very inodes we are using. ... >> I am resubmitting inotify for comments and review. ... > to pin up to 32MB? ... become nontrivial as memory becomes fragmented. ...
    (Linux-Kernel)
  • Re: High Definition Live TV Freezes System!
    ... The specification number you are missing Is Memory Speed and it needs to ... I don't understand why I can't watch the channel in Media Center. ... does not have enough memory bandwidth for 1080i using MCE. ...
    (microsoft.public.windows.mediacenter)