4 . 4 2 Computer Organization and Architecture
Write operation: On selecting the word line, the voltage at D goes down at ground level to select the
cell. Depending on the logic ‘1’ (or ‘0’) to be written, the bit line b (or b¢) is held high whereby D
0
(or
D
1
) gets forward biased and consequently T
1
(or T
0
) switch is on resulting T
0
(or T
1
) off.
2.How do the following influence the performance of a virtual memory system?
(i)Size of a page (ii)Replacement policy
Answer
(i)Page size: If page size is large, the page fault rate will be less. But, in that case, transfer time
of the page will increase.
If page size is small, the memory is better utilized, but number of pages and hence the size
of page table will be large.
(ii)Replacement policy: When a page fault occurs, a page replacement is needed to select one of
the existing pages to make the room for the required page. There are several replacement
policies such as FIFO (First-in First-out), LRU (Least Recently Used) and optimal page
replacement algorithm available. The performance of virtual memory is degraded if too many
page faults occur, because that lead to bring the new required pages to the physical memory.
That’s why the algorithm which gives lowest page faults is considered as best algorithm.
3.A computer has direct mapped cache with 16 one-word blocks. The cache is initially empty.
What is the observed hit ratio when the CPU generates the following word address sequence:
1, 4, 8, 5, 20, 17, 19, 56, 9, 11, 4, 43, 5, 6, 9, 17?
Answer
The direct mapping is expressed as
I = J mod K
Where
I = cache block number
J = main memory block number
K = number of blocks in cache.
The processor generates the addresses for words in main memory. In our problem, K = 16 with one
word per block and main memory block sequence is: 1, 4, 8, 5, 20, 17, 19, 56, 9, 11, 4, 43, 5, 6, 9, 17.
Thus, the corresponding cache block sequence and its word is as (block no., word address): (1, 1),
(4,4), (8,8), (5,5), (4,20), (1,17), (3,19), (8,56), (9,9), (11, 11), (4,4), (11,43), (5,5), (6,6), (9,9), (1,17).
Initially, cache is empty.
(Cache block no., word address) (1,1) (4,4) (8,8) (5,5) (4,20) (1,17) (3,19) (8,56) (9,9)
Hit(H)/Miss (M) M M M M M and M and M M and M
replace replace replace
(Cache block no., word address) (11,11) (4,4) (11,43) (5,5) (6,6) (9,9) (1,17)
Hit(H)/Miss(M) M M M and replace H M H H
Therefore, hit ratio = 3/16.
4.What is the bandwidth of a memory system that transfers 128-bit of data per reference, has a
speed 20 ns per operation?
Answer
Given the speed of 20 ns, one memory reference can initiate in every 20 ns and each memory
reference fetches 128-bit (i.e. 16 bytes) of data. Therefore, the bandwidth of the memory system is
16 bytes / 20 ns = (16 ¥ 10
9
) / 20 bytes per second = 8 ¥ 10
8
bytes per second.