Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that only problem in its functioning may be that memory cells do not stor

ID: 3676766 • Letter: A

Question

Assume that only problem in its functioning may be that memory cells do not store the desired information (i.e. they get stuck for some reason). Suggest an algorithm in terms of "READ" and "WRITE" operations that would test that any cell can store the binary data. What is the complexity of such testing? Assume now there is a problem in addressing i.e. a fault has occurred in the address decoder and as a result the same cell is always being addressed. In terms of problem (a) above, what would your algorithm now test the memory for?

Explanation / Answer

a)The memory of a computer is a large indexed set of memory cells.

By "large" we could mean anywhere from 256 cells to 32 million cells.

By "indexed" we mean that each individual memory cell has its very own index number (aka identification number). This index number is usually called an address and can be thought of as "stamped" onto the "edge" of the memory cell.

Memory Cell

A memory cell is the smallest part of a computer memory that can be changed in a single operation.

A memory cell records a number written in binary - this number is called the content of the memory cell. The cell pictured to the right has content 110100112 = D316

A RAM (random access memory) cell can have different numbers recorded in it at different times. It is like a cassette tape that can be rerecorded with different songs.

However, when a new number is recorded in a RAM memory cell, the old number is FOREVER LOST.

A ROM (read only memory) cell has a number permanently recorded in it. It is like a message chiseled in stone. It CANNOT be LOST, even if the power is turned off.

All the numbers recorded in a memory cell always have the same number of bits. Thus if a memory cell has an 8 bit content then:

A memory supports these operations:

Memory Selection

Before data can be read from or written into a memory, a particular memory cell must be chosen to be read from or written into.

This is called memory cell selection.

The CPU is usually responsible for telling the memory which cell to select.

It does this by sending the address of that cell to the memory. This address travels from the CPU to the memory over the address portion of the system bus.

Memory Reading

When data is copied out of a memory cell into another bus unit, the action is called a memory read operation.

Of course, the other bus unit (usually the CPU) must first send an address to the memory to select the particular memory cell it wants to read.

Then the memory sends a copy of the data from the selected memory cell back to the other bus unit.

Memory Writing

When data is copied into a memory cell from another bus unit, the action is called a memory write operation.

Of course, the other bus unit (usually the CPU) must first send an address to the memory to select the particular memory cell it wants to write into.

Then the bus unit sends a copy of the data to the memory and the memory records that data into the selected memory cell.

B)For this use Virtual memory concept.

A cache stores a subset of the addresss space of RAM. An address space is the set of valid addresses.

Thus, for each address in cache, there is a corresponding address in RAM.

This subset of addresses (and corresponding copy of data) changes over time, based on the behavior of your program.

Cache is used to keep the most commonly used sections of RAM in the cache, where it can be accessed quickly.

This is necessary because CPU speeds increase much faster than speed of memory access.

If we could access RAM at 3 GHz, there wouldn't be any need for cache, because RAM could keep up.

Because it can't keep up, we use cache.

What if we wanted more RAM than we had available. For example, we might have 1 M of RAM, what if we wanted 10 M? How could we manage?

One way to extend the amount of memory accessible by a program is to use disk.

Thus, we can use 10 Megs of disk space. At any time, only 1 Meg resides in RAM.

In effect, RAM acts like cache for disk.

This idea of extending memory is called virtual memory. It's called "virtual" only because it's not RAM. It doesn't mean it's fake.