0% found this document useful (0 votes)
116 views2 pages

00 E8 CD 01

The document contains 5 exercises related to memory management and virtual memory. Exercise 1 asks to explain the difference between logical and physical addresses, why page sizes are powers of 2, and why processes cannot access memory they do not own. Exercise 2 gives a segment table and asks to calculate physical addresses for given logical addresses. Exercise 3 asks how a system establishes the physical location for a given virtual address. Exercise 4 asks for the maximum acceptable page fault rate given page fault servicing times and memory access time. Exercise 5 asks for the number of page faults that would occur using LRU, FIFO and optimal page replacement algorithms for a given page reference string and number of frames.

Uploaded by

Morgothson
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views2 pages

00 E8 CD 01

The document contains 5 exercises related to memory management and virtual memory. Exercise 1 asks to explain the difference between logical and physical addresses, why page sizes are powers of 2, and why processes cannot access memory they do not own. Exercise 2 gives a segment table and asks to calculate physical addresses for given logical addresses. Exercise 3 asks how a system establishes the physical location for a given virtual address. Exercise 4 asks for the maximum acceptable page fault rate given page fault servicing times and memory access time. Exercise 5 asks for the number of page faults that would occur using LRU, FIFO and optimal page replacement algorithms for a given page reference string and number of frames.

Uploaded by

Morgothson
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ENEL4OS H1 - Operating systems for Engineers - 2011

Tutorial 2:Memory Management and Virtual Memory (14 April 2011)


Due date: Wednesday 20 April 2011

Exercise 1: Review questions

(a) Explain the difference between logical and physical addresses.

(b) Why are page sizes always powers of 2?

(c) Why is it that, on a system with paging, a process cannot access memory it does not
own? How could the operating system allow access to other memory? Why should it or
should it not?

(d) List cases where entire program need not be in memory, traditionally.

(e) List benefits of having only part of a program in memory

Exercise 2: Physical Address Calculation


Consider the following segment table:

Segment Base Length


0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96

What are the physical addresses for the following logical addresses?

(a) 0,430

(b) 1,10

(c) 2,500

(d) 3,400

(e) 4,112

1
Exercise 3: Virtual Address
A certain computer provides its users with a virtual-memory space of 232 bytes. The computer
has 218 bytes of physical memory. The virtual memory is implemented by paging, and the
page size is 4096 bytes. A user process generates the virtual address 11123456. Explain how
the system establishes the corresponding physical location. Distinguish between software and
hardware operations.

Exercise 4: page-fault rate


Suppose we have a demand-paged memory. The page table is held in registers. It takes 8
milliseconds to service a page fault if an empty page is available or the replaced page is not
modified, and 20 milliseconds if the replaced page is modified. Memory access time is 100
nanoseconds. Assume that the page to be replaced is modified 70 percent of the time. What
is the maximum acceptable page-fault rate for an effective access time of no more than 200
nanoseconds?

Exercise 5: Page replacement


Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3,
6. How many page faults would occur for the following replacement algorithms, assuming one,
two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your
first unique pages will all cost one fault each.

• LRU replacement

• FIFO replacement

• Optimal replacement

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy