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...
Consider a virtual memory system that can address a total of 232 bytes. You have unlimited...
Consider a virtual memory system that can address a total of 232 bytes. You have unlimited hard drive space, but are limited to only 8 MB of physical memory. Assume that virtual and physical pages are each 4 KB in size. a. How many bits is the physical address? What is the maximum number of virtual pages in the system? How many physical pages are in the system? How many bits are the virtual and physical page numbers? Suppose that...
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache...
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache consists of 4K bytes. Show the format for a main memory address assuming a 4-way set associative cache mapping scheme. Include the field names as well as their sizes. A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main...
Computer archieture 1. Let us assume we have such a machine. The physical RAM has 32...
Computer archieture 1. Let us assume we have such a machine. The physical RAM has 32 bytes, and is evenly divided into 4 pages. The virtual memory has 16 pages. The content in the page table and physical RAM is shown below Physical RAM Page Num Page data 3 11 ~QWERTYU 2 10 IOPASDFG 1 01 HJKLZXCV 0 00 BNM<>[]? Page table 15 0 14 0 13 0 12 1 01 11 0 10 0 9 1 11 8 0...
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. The TLB holds Question 1 options: L1 Cache address Virtual memory address Data Location of...
1. The TLB holds Question 1 options: L1 Cache address Virtual memory address Data Location of logical addresses Question 2 (1 point) Content addressable memory Question 2 options: Is used in cache memory. Is broken into multiple sections. Is used in binary files. Is used in standard program execution. Question 3 (1 point) Thrashing is caused by Question 3 options: The usage of segmentation in memory organization. The usage of paging in memory organization. Pages being swapped back and forth...
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT