Optimal Page-Replacement Algorithm - Intro to Computer Architecture - Homework, Exercises of Computer Architecture and Organization

In the course of intro to computer architecture, the main points are:Optimal Page-Replacement Algorithm, Four Page Frames, Number of Page Faults, Page-Fault Rate, References String, Run-Time Stack, Physical Address, Logical Address, Pages in Memory, Load Buffer, Read-After-Write Dependencies

Typology: Exercises

2012/2013

Uploaded on 05/06/2013

anurati
anurati 🇮🇳

4.2

(24)

121 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1. Complete the following table assuming the Optimal page-replacement algorithm and four page frames
allocated to the process.
Page-fault rate? Number of page faults?
Page Frames
Allocated = 4
543215214321
References
String:
2. Complete the following table assuming a LRU page-replacement algorithm and four page frames allocated to
the process.
Page-fault rate? Number of page faults?
Page Frames
Allocated = 4
543215214321
References
String:
3. Answer the following questions about implementation of the LRU Algorithm:
a) What information would we need to keep track of to implement LRU?
b) When would this information need to be updated?
c) Where would you store this information?
Name:_____________________
Lecture 26 Page 1
Docsity.com
pf2

Partial preview of the text

Download Optimal Page-Replacement Algorithm - Intro to Computer Architecture - Homework and more Exercises Computer Architecture and Organization in PDF only on Docsity!

1. Complete the following table assuming the Optimal page-replacement algorithm and four page frames

allocated to the process.

Number of page faults? Page-fault rate?

Page Frames

Allocated = 4

References 1 2 3 4 1 2 5 1 2 3 4 5

String:

2. Complete the following table assuming a LRU page-replacement algorithm and four page frames allocated to

the process.

Number of page faults? Page-fault rate?

Page Frames

Allocated = 4

References 1 2 3 4 1 2 5 1 2 3 4 5

String:

3. Answer the following questions about implementation of the LRU Algorithm:

a) What information would we need to keep track of to implement LRU?

b) When would this information need to be updated?

c) Where would you store this information?

Name:_____________________

Lecture 26 Page 1

Docsity.com

4. What problems would you predict with moving whole segments into and out of memory?

Main

Subpgm A Global Data Run-time Stack

segment 0

segment 1

segment 2

segment 3

5. Assuming a page size of 1024 bytes, complete the Page Tables for the pages in memory, and determine the

physical address for the logical address <2, 1032>.

CPU

seg.# offset 2 1032

Running Process X

Valid Bit 0 1 2 3 4 5 6 1 1 1 1 0 0 0

Segment Table for X

Logical Addr.

Physical Memory

Frame Number

page 0 of seg 0

page 0 of seg 2

page 2 of seg 3 page 0 of seg 1

page 0 of seg 3

page 1 of seg 2

page 1 of seg 3

Pointer to Page Table

frame# offset

Frame#

Frame#

Frame#

Frame#

Valid

Valid

Valid

Valid

Bit

Bit

Bit

Bit

Page Table for Seg. 0

Page Table for Seg. 1

Page Table for Seg. 2

Page Table for Seg. 3

Physical Addr.

page offset

Name:_____________________

Lecture 26 Page 2

Docsity.com