![Page 1: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/1.jpg)
![Page 2: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/2.jpg)
![Page 3: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/3.jpg)
![Page 4: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/4.jpg)
![Page 5: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/5.jpg)
![Page 6: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/6.jpg)
![Page 7: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/7.jpg)
ee457_MT_Sp2013.fm
April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada
3 ( 48 points) 30 min.
Virtual Memory:
3.1 PTBR stands for _____________________________________________________________.It is initiated by _________________________ (hardware / operating system) and is utilized by ___________ (MMU / CCU) (i.e. memory management unit or cache control unit) to look up ______________________ (TLB / Page Table / Cache Tag RAM).
3.2 Page Table: Number of A,B,C,D Tables built by the OS:
PQRST on the side represents a 20-bit (5-digit hex) VPN in a 4-level page table with upper 4 bits (P) indexing the A-level table, next 8 bits (QR) indexing the B-level tables, next 4 bits (S) indexing the C-level tables, and the last 4 bits (T) indexing the D-level tables.
3.2.1 Suppose the first 8 distinct virtual pages accessed by the application program had the VPNs as stated in TABLE-I (in sorted order).How many tables of what size are built by OS by this time?A-level: _____________________________________________ B-level: _____________________________________________ C-level: _____________________________________________ D-level: _____________________________________________
3.2.2 Complete 8 distinct VPNs of your choice in TABLE-II such that the least number of A,B,C,D tables are built by OS. This least set consists of ____ of A-Table(s), ____ of B-Table(s), ____ of C-Table(s), ____ of D-Table(s).
3.2.3 Similarly, complete 8 distinct VPNs of your choice in TABLE-III such that the most number of A,B,C D tables are built by OS. This set consists of ____ of A-Table(s), ____ of B-Table(s), ____ of C-Table(s), ____ of D-Table(s).
3.3 The advantage of _______ (VIPT / PIPT) over ______ (VIPT / PIPT) comes from the fact that _______________________________________________________________________________ _______________________________________________________________________________ ______________________________________________________________________________________________________________________________________________________________ _______________________________________________________________________________
3.4 Memory addresses: In a 32-bit virtual address system using 16KB pages, state any two consecutive 32-bit word addresses (in hex) which do not fall in the same virtual page.______________________I am evicting a page containing the byte with virtual address 23456789h. What is its virtual page number (in hex)? __________. What is the range of byte addresses residing in that page (lowest virtual byte address to highest virtual byte address). ____________________________________
6pts
TABLE-II TABLE-IIIP Q R S T P Q R S T P Q R S T
TABLE-I
1 1 3 4 71 2 3 4 71 2 3 6 51 3 3 6 51 4 3 6 51 5 3 6 51 7 3 6 51 7 5 6 5
9pts
6pts
6pts
6pts
7pts
![Page 8: University of Southern California · 2014. 11. 4. · ee457_MT_Sp2013.fm April 5, 2013 5:34 pm EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada 3 (](https://reader035.vdocuments.site/reader035/viewer/2022071516/61399b4f0051793c8c00958f/html5/thumbnails/8.jpg)
ee457_MT_Sp2013.fm
April 4, 2013 6:30 am EE457 Midterm Exam - Spring 2013 Page - 10 / 11 C Copyright 2013 Gandhi Puvvada
3 ( 48 points) 30 min.
Virtual Memory:
3.1 PTBR stands for _____________________________________________________________.It is initiated by _________________________ (hardware / operating system) and is utilized by ___________ (MMU / CCU) (i.e. memory management unit or cache control unit) to look up ______________________ (TLB / Page Table / Cache Tag RAM).
3.2 Page Table: Number of A,B,C,D Tables built by the OS:
PQRST on the side represents a 20-bit (5-digit hex) VPN in a 4-level page table with upper 4 bits (P) indexing the A-level table, next 8 bits (QR) indexing the B-level tables, next 4 bits (S) indexing the C-level tables, and the last 4 bits (T) indexing the D-level tables.
3.2.1 Suppose the first 8 distinct virtual pages accessed by the application program had the VPNs as stated in TABLE-I (in sorted order).How many tables of what size are built by OS by this time?A-level: _____________________________________________ B-level: _____________________________________________ C-level: _____________________________________________ D-level: _____________________________________________
3.2.2 Complete 8 distinct VPNs of your choice in TABLE-II such that the least number of A,B,C,D tables are built by OS. This least set consists of ____ of A-Table(s), ____ of B-Table(s), ____ of C-Table(s), ____ of D-Table(s).
3.2.3 Similarly, complete 8 distinct VPNs of your choice in TABLE-III such that the most number of A,B,C tables are built by OS. This most set consists of ____ of A-Table(s), ____ of B-Table(s), ____ of C-Table(s), ____ of D-Table(s).
3.3 The advantage of _______ (VIPT / PIPT) over ______ (VIPT / PIPT) comes from the fact that _______________________________________________________________________________ _______________________________________________________________________________ ______________________________________________________________________________________________________________________________________________________________ _______________________________________________________________________________
3.4 Memory addresses: In a 32-bit virtual address system using 16KB pages, state any two consecutive 32-bit word addresses (in hex) which do not fall in the same virtual page.______________________I am evicting a page containing the byte with virtual address 23456789h. What is its virtual page number (in hex)? __________. What is the range of byte addresses residing in that page (lowest virtual byte address to highest virtual byte address). ____________________________________
6pts
TABLE-II TABLE-IIIP Q R S T P Q R S T P Q R S T
TABLE-I
1 1 3 4 71 2 3 4 71 2 3 6 51 3 3 6 51 4 3 6 51 5 3 6 51 7 3 6 51 7 5 6 5
9pts
6pts
6pts
6pts
7pts