views:

21

answers:

2

How many bytes does memory arbiter protect?

While reading "Understanding the linux kernel, 3rd edition" chapter 2, section2.1, I encounter the following statement:
In multiprocessor systems, all CPUs usually share the same memory; this means that RAM chips may be accessed concurrently by independent CPUs. Because read or write operations on a RAM chip must be performed serially, a hardware circuit called a memory arbiter is inserted between the bus and every RAM chip. Its role is to grant access to a CPU if the chip is free and to delay it if the chip is busy servicing a request by another processor.

Here i have some questions:
. how many bytes does a ram chip have? (Seem that this question is equal to "How many bytes does memory arbiter protect?" )
. as i said, "My PC has 1G memory". Does this means that the "1 G memory" is comprised of many ram chips.

A: 

It really depends on what RAM your computer has. Most newer computers come with 1GB minimum an it's usually a 1GB stick of RAM that allows you to upgrade by buying more sticks. The arbiter simply protects two cpu's from trying to write/read from RAM at the same time. So in essence it protects the full amount of RAM in your computer.

controlfreak123
At first, I think it protect the full amount of RAM. But it seems that the protected granularity is too huge.
kuangye
A: 

When you get one 2 GB stick of RAM, it's made up of smaller chips of RAM. You can see this if you take the stick out and look at it.

The level of protection is probably something much smaller than a full chip. What you're asking is not a Linux question exactly. It depends entirely on the architecture of the machine. My guess is that access is arbitrated at a cache line granularity. For most modern x86 CPUs, this is 64 bytes aligned. You'll have to check for the exact number.

If someone knows better, please correct me.

Karmastan