Professional Documents
Culture Documents
Memory is required in a computer system to store information (instructions or data) during input
or output operation.
Memory is an arrangement of cells in rows and columns
There are m rows and n columns where rows denote words and columns denote the bits per
word.
For example if a memory whose capacity is 1k it means that there are 1024 words where each
word is storing 8 bit of information.
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 1 0 0
Internal Architecture for typical memory
first block is the memory with m words and n locations and input buffer, output buffer, address
decoder and an arrangement of and gates.
Here when CS=1 and WR=1 then RD=0 this will cause the i/p gate 1 as 1,1,1 and its o/p will be 1
and this output is connected to the enable pin of the input buffer so the input data will be
stored in the specified location.
Similarly, when CS=1, RD=1 and WR=0, gate 2 gets activated enabling output buffer thus
reading and writing operation is performed.
Memory hierarchy
Memory hierarchy is the arrangement of memory based on cost, capacity and speed. The total
memory capacity of a computer is the hierarchy of memory devices. The goal of every memory
system is to add write memory while keeping an acceptable level of performance and be cost
effective. We can achieve these goals by having different memory types from ranging from slow
but high capacity secondary memory to fast but to a relatively faster main memory to even
smaller and faster cache memory.
In two level memory hierarchy, main memory and secondary memory is used, where main
memory communicates with the CPU directly. Secondary memory Cannot communicate with
the CPU directly. With the help of an input processor, it can communicate with the main
memory which in turn communicates with the CPU. Programmes which are not currently
needed are transferred back to secondary memory to create more space for current
programmes. Main memory is high speed, high cost but less space while secondary memory is
low speed, less cost but more space.
Write process-
1. Chip is selected
2. Memory address is provided
3. Data is sent on the data bus as an input
4. Write command is issued.
Horizontal and vertical memory expansion
If the requirement for memory is larger that the available capacity then one can cascade
multiple memory chips in order to get the desired capacity. This concept is called
memory expansion.
Numerically,
No. of memory chips required = required capacity/given capacity
if h is the hit ratio, tc is the cache access time, and tm is the access time of main
memory, then the effective access memory time is –
Example-
Let tc = 100 nanoseconds, tm =600 nanoseconds. What is the effective access time if h
is 90% ?
→ here, teff = 0.9 x 100 x 10-9 +(1-0.9)( 100 x 10-9 + 600 x 10-9 )
Therefore teff = 160 x 10-9 i.e 160 nanoseconds.
Virtual memory
Virtual memory is a concept that is used in large computer systems that permits the
user to run the programs with a large memory space available equal to the totality of
the auxiliary memory.
This gives an illusion to the user that unlimited amount of physical memory is available
even though a limited amount of memory is present.
Explanation
In this, the active segments of the program are kept in high speed main memory and
moving the inactive segments back to auxiliary memory. This is done by the operating
system and the process is transparent to the user.
Definitions-
• Each address that is referenced by the CPU is called virtual address and the
memory space defined by such virtual address is called as address space.
• The actual address of the main memory is called the physical address and the
memory space defined by such physical address is called memory space.
Each address referenced by the CPU goes through an address mapping from virtual
address to a physical address the translation is done by a mapping table maybe stored
in a separate memory or the main memory itself.
Paging- In paging method, the address space and memory space are divided into
groups of fixed size called as blocks and page refers to a group of address space of the
same size as a block.
Example
The page size is 512 words, the size of main memory is 4K words, and the size of
auxiliary memory is 64K words. How many pages and blocks will be present.