a) Assuming a 1 KB page size, what are the page numbers and offsets for the following logical addresses references (provided as decimal numbers). Show all calculations steps. : • 21112 5500050 b) Consider a 1 KB page size and a process size 66800, calculate the internal fragmentation. Show all calculations steps.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Correct and detailed answer will be Upvoted else downvoted. Thank you!

## Operating System

### Problem Set

a) Assuming a 1 KB page size, what are the page numbers and offsets for the following logical addresses references (provided as decimal numbers). Show all calculation steps.

   - 21112
   - 5500050

b) Consider a 1 KB page size and a process size of 66800, calculate the internal fragmentation. Show all calculation steps.

---

### Solution

**a) Calculation of Page Numbers and Offsets:**

To find the page number and offset for a given logical address, follow these steps:

1. **Convert the page size to bytes:** 1 KB = 1024 bytes.
2. **Page Number:** Divide the logical address by the page size.
3. **Offset:** The remainder of the logical address divided by the page size.

**For the logical address 21112:**

1. Page Number \( = \left\lfloor \frac{21112}{1024} \right\rfloor = \left\lfloor 20.625 \right\rfloor = 20 \)
2. Offset \( = 21112 \mod 1024 = 21112 - (20 \times 1024) = 21112 - 20480 = 632 \)

   **Result:**
   - Page Number: 20
   - Offset: 632

**For the logical address 5500050:**

1. Page Number \( = \left\lfloor \frac{5500050}{1024} \right\rfloor = \left\lfloor 5371.0458984375 \right\rfloor = 5371 \)
2. Offset \( = 5500050 \mod 1024 = 5500050 - (5371 \times 1024) = 5500050 - 5500032 = 18 \)

   **Result:**
   - Page Number: 5371
   - Offset: 18

---

**b) Calculation of Internal Fragmentation:**

To calculate internal fragmentation:

1. **Convert the page size to bytes:** 1 KB = 1024 bytes.
2. **Total Pages Required:** Divide the process size by the page size and round up to the next whole number.
3. **Internal Fragmentation:** Calculate the number of unused bytes in the last page.

**For a process size of 66800:**

1. Total Pages
Transcribed Image Text:## Operating System ### Problem Set a) Assuming a 1 KB page size, what are the page numbers and offsets for the following logical addresses references (provided as decimal numbers). Show all calculation steps. - 21112 - 5500050 b) Consider a 1 KB page size and a process size of 66800, calculate the internal fragmentation. Show all calculation steps. --- ### Solution **a) Calculation of Page Numbers and Offsets:** To find the page number and offset for a given logical address, follow these steps: 1. **Convert the page size to bytes:** 1 KB = 1024 bytes. 2. **Page Number:** Divide the logical address by the page size. 3. **Offset:** The remainder of the logical address divided by the page size. **For the logical address 21112:** 1. Page Number \( = \left\lfloor \frac{21112}{1024} \right\rfloor = \left\lfloor 20.625 \right\rfloor = 20 \) 2. Offset \( = 21112 \mod 1024 = 21112 - (20 \times 1024) = 21112 - 20480 = 632 \) **Result:** - Page Number: 20 - Offset: 632 **For the logical address 5500050:** 1. Page Number \( = \left\lfloor \frac{5500050}{1024} \right\rfloor = \left\lfloor 5371.0458984375 \right\rfloor = 5371 \) 2. Offset \( = 5500050 \mod 1024 = 5500050 - (5371 \times 1024) = 5500050 - 5500032 = 18 \) **Result:** - Page Number: 5371 - Offset: 18 --- **b) Calculation of Internal Fragmentation:** To calculate internal fragmentation: 1. **Convert the page size to bytes:** 1 KB = 1024 bytes. 2. **Total Pages Required:** Divide the process size by the page size and round up to the next whole number. 3. **Internal Fragmentation:** Calculate the number of unused bytes in the last page. **For a process size of 66800:** 1. Total Pages
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY