Question

A virtual memory has a page size of 32 words. There are 16 pages and 8...

A virtual memory has a page size of 32 words. There are 16 pages and 8 blocks. The associative memory page table contains the following entries
Page Block
a) For the following CPU addresses find the virtual addresses: B5, 2A (hex)

b) For the following virtual addresses find the CPU addresses: 1A9, 016, 149 (hex)

Page Block
0 3
4 5
7 2
9 4
12 0
13 1
14 6
15 7

Homework Answers

Answer #1

Step 1 ;-

Data given is :-

Page Size = 32Words

Total Pages is 16

And Total blocks are 8

So, that means there is 2 pages in 1 block and it is 2 way associative

Offset bit will be = log 32 =5bits

Block address bits = log 8 = 3 bits

Virtual address Size = 16 * 32 = 512 words

Virtual address bits = log 512 = 9bits

and Outer page table address bits will be = 9 - ( 5 + 3 ) = 1 bit

Step 2 :-(a)

(1) CPU address given in Hexadecimal is = B5

In binary will be = 10110101

Where

Block address( 3 bits ) Offset( 5 bits )
101 10101

In 5th block ( 101 ) there is 4th page present

So, Virtual address in binary 9bits is = 010010101 = 4th page in binary(4 bits ) + offset( 5 bits)

And In Hexadecimal will be = 095H

(2)

CPU address given in Hexadecimal is = 2A

In binary will be = 00101010

Where

Block address( 3 bits ) Offset( 5 bits )
001 01010

In 1st block ( 001 ) there is 13th page present

So, Virtual address in binary 9bits is = 110101010 = 13th page in binary(4 bits ) + offset( 5 bits)

And In Hexadecimal will be = 1AA H

Step 3 :-(b)

(1) Virtual Address given in hexadecimal is =1A9 H

In Binary form 9 bits of virtual address is = 110101001

Where

Page Address ( 4bits) Offset(5 bits )
1101 01001

In 13th page (1101) , there is 1st Block present

So,CPU address will be in binary ( 8 bits ) is = 00101001 =1st Block address ( 3bits ) + Offset in( 5bits )

CPU address in Hexadecimal = 29 H

(2)

Virtual Address given in hexadecimal is =016 H

In Binary form 9 bits of virtual address is = 000010110

Where

Page Address ( 4bits) Offset(5 bits )
0000 10110

In 0th page (0000) , there is 3rd Block present

So,CPU address will be in binary ( 8 bits ) is = 01110110 =1st Block address ( 3bits ) + Offset in( 5bits )

CPU address in Hexadecimal = 76 H

(3)

Virtual Address given in hexadecimal is =149 H

In Binary form 9 bits of virtual address is = 101001001

Where

Page Address ( 4bits) Offset(5 bits )
1010 01001

10th page (1010) is not present in any block as we can see in the table

So,There is a Page Fault

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider a cache of 4 lines of 16 bytes each. Main memory is divided into blocks...
Consider a cache of 4 lines of 16 bytes each. Main memory is divided into blocks of 16 bytes each. That is, block 0 has bytes with addresses 0 through 15, and so on. Now consider a program that accesses memory in the following sequence of addresses: Once: 63 through 70. Loop two times: 15 through 32; 80 through 95. Suppose the cache is organized as two-​way set associative, with two sets of two lines each. Even-​numbered blocks are assigned...
The following is a page table for a system with 12-bit virtual and physical addresses and...
The following is a page table for a system with 12-bit virtual and physical addresses and 256-byte pages. Free page frames are to be allocated in the order 9, 15, 5. A dash for a page frame indicates that the pagesis not in memory. Page Page Frame 0 4 1 11 2 10 3 - 4 - 5 2 6 - 7 0 8 12 9 1 Convert the following virtual addresses (given in hexadecimal) to their equivalent physical. Assume...
1. The memory units that follow are specified by the number of words times the number...
1. The memory units that follow are specified by the number of words times the number of bits per word. How many address lines and input/output data lines are needed in each case? (a) 8K X 16 (b) 2G X 8 (c) 16M X 32 (d) 256K X 64 2. Give the number of bytes stored in each memory unit in question 1. 3. Word number 563 decimal in the memory shown in Fig. 7.3 (see Mano-Ch7.pdf) contains the binary...
14. For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits...
14. For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits are used to access the cache. Tag Index Offset 31-16 15-5 4-0 What is the cache block size (in words)? How many blocks does the cache have?
1.) Perform the following multiplication using Booth’s algorithm: (You will receive full credit only if you...
1.) Perform the following multiplication using Booth’s algorithm: (You will receive full credit only if you show all your work)      13 x -13 (a) 27/4 Using paper pencil approach and (b) simulate how a machine does this job 2.)Perform the following division as directed: (a) 27/4 using non-restoring division algorithm // we need 4 quotient bits. (b) Using Newton-Raphson algorithm find 1/d when d=0.84 // show the results of the first 3 iterations 3.) A real-time computer system has...
Can i get the answer to these questions in detail explaining how you go to the...
Can i get the answer to these questions in detail explaining how you go to the solution 1.Convert to/from Hex (0) 2.Octal Binary Unsigned/ 2’s complement 3.Understand how to shift and rotate. 4.Understand the relationship between shifting and multiplication/division 5.Be able to recognize and use the following gates: AND OR NOT NAND NOR XOR 6.Understand how a half adder works Given a logical statement ((A OR B) AND NOT(C OR A)) show the gates. 7.What is the difference between an...
Code Example 8-1 1. int count = 1; 2. int item_total = 0; 3. int item...
Code Example 8-1 1. int count = 1; 2. int item_total = 0; 3. int item = 0; 4. while (count < 4) { 5.      cout << "Enter item cost: "; 6.      cin >> item; 7.      item_total += item; 8.      ++count; 9. } 10. int average_cost = round(item_total / count); 11. cout << "Total cost: " << item_total << "\nAverage cost: " << average_cost; (Refer to Code Example 8-1.) If the user enters 5, 10, and 15 at the prompts, the output is: Total...
Data For Tasks 1-8, consider the following data: 7.2, 1.2, 1.8, 2.8, 18, -1.9, -0.1, -1.5,...
Data For Tasks 1-8, consider the following data: 7.2, 1.2, 1.8, 2.8, 18, -1.9, -0.1, -1.5, 13.0, 3.2, -1.1, 7.0, 0.5, 3.9, 2.1, 4.1, 6.5 In Tasks 1-8 you are asked to conduct some computations regarding this data. The computation should be carried out manually. All the steps that go into the computation should be presented and explained. (You may use R in order to verify your computation, but not as a substitute for conducting the manual computations.) A Random...