Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 2 (Page Table Implementation 29 pts) In a paging system, the process’ sp

ID: 3813206 • Letter: P

Question

Problem 2 (Page Table Implementation 29 pts)

In a paging system, the process’ space is divided into consecutive pages of fixed length: Page 0, Page 1, Page 2, etc.

As such, a logical address (also called a virtual address) consists of:

Page #

Offset

In a paging system, main memory is divided into consecutive frames of fixed length (same length as the pages):

Frame 0, Frame 1, Frame 2, etc.

Some of the logical pages are placed in the physical frames. For example, pages 3, 8 and 10 might be placed in frames 104, 87 and 378, respectively, with the other pages of the process in virtual memory, i.e., on disk (or other form of secondary memory).
The goal of this exercise is to help you understand the Simple indexing and Multi-level indexing for converting a logical address (page number + offset) to a physical address (frame number + offset, or a page fault if the page is not in main memory):

Throughout this exercise, logical addresses and physical addresses are written as pairs of numbers (page number offset for logical addresses, frame number/offset for physical addresses).

Diagram:

Main Memory

                      Address          Present Bit | Frame Number

                        0                                              104

                        1                                              334

                        2                                              45

                        3                                              891

                        4                                              115

                        …                                 …                     …

                        256                             0                      333

                        257                             0                      228

                        258                             0                      610

                        259                             0                      200

                        260                             1                      324

                        261                             1                      900

                        262                             1                      1005

                        263                             0                      820

                        264                             1                      20

                        265                             0                      5

                        266                             0                      1005

                        267                             0                      220

                        268                             1                      4

                        269                             1                      303

                        270                             1                      689

                        271                             0                      446

                        272                             1                      848

                        273                             0                      666

                        274                             1                      111

                        275                             1                      229

Answer the following questions based on the above (completed) diagram.

Interrupt indicator

(2 pt) Logical 2 105 causes a page fault? Yes or No (circle one). If no, converts to physical: (2 pt) Logical 5 640 causes a page fault? Yes or No (circle one). If no, converts to physical: (2 pt) Logical 12 320 causes a page fault? Yes or No (circle one). If no, converts to physical:

Page #

Offset

Explanation / Answer

1) Logical Address:
2 105
LA = Page Number in page table + Offset
Therefor
2 number page is stored in 45 number of frame, so this is a page hit in the page table and it will translate into the below physical address.

Physical Address = Frame Number + Offset
         PA = 45 105
      
      
2)LA = 5 640
Page# = 5 it is not present in the page table, so page table miss therefor page fault is occured.

3) LA = 12 320
Page# = 12, it is not present in the page table, so page table miss therefor so page fault is occured.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote