Memory%20Management%20and%20Virtual%20Memory%20(Problem%20session) - PowerPoint PPT Presentation

About This Presentation
Title:

Memory%20Management%20and%20Virtual%20Memory%20(Problem%20session)

Description:

Problem 6 Problem 7 Which of the following programming techniques and structures are good for a demand ... CSCI 315 Lecture 3 Author: L. Felipe Perrone Last ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 9
Provided by: L469
Category:

less

Transcript and Presenter's Notes

Title: Memory%20Management%20and%20Virtual%20Memory%20(Problem%20session)


1
Memory Management andVirtual Memory(Problem
session)
2
Problem 1
Given five memory partitions of 100KB, 500KB,
200KB, 300KB, and 600KB (in this order), how
would each of the first-fit, best-fit, and
worst-fit algorithms place processes of 212KB,
417KB, 112KB, and 426KB (in this order)? Which
algorithm makes the most efficient use of memory?
3
Problem 2
Explain the address translation scheme in this
figure. What do the fields p and d in a logical
address represent? What do f and d represent in a
physical address?
4
Problem 3
What is the function of a TLB (translation
lookaside buffer) in the translation of logical
to physical address? How big should the TLB be?
5
Problem 4
  • Consider a logical address on a 32-bit machine
    with 4K page size.
  • How many bits are used for page number?
  • How many entries does the page table have?
  • Does the whole page table fit within 4K?
  • How many bits are used for page offset?
  • Explain how a hierarchical paging scheme with
    logical addresses structure as in the picture
    below would work.
  • How many bits of the logical address should be
    reserved for the page offset d? (Assume 32-bit
    address and page size 4K.)

page number
page offset
p1
p2
d
6
Problem 5
  • Consider a paging scheme with the page table
    stored in memory.
  • If a direct memory reference takes 80 ns, how
    long does a paged memory reference take in the
    best case?
  • If we add a TLB, and 75 of all page-table
    references are found in the TLB, what is the
    effective access time? (Assume that finding a
    page-table entry in the TLB takes 10ns, if the
    entry is there, and 100ns, if the entry is not
    there.)

7
Problem 6
operating system
3
running process
2
page table
1
i
physical memory
6
free frame
5
4
Explain the sequence of operations in a virtual
memory system that starts with (1), a reference
to a page that is not currently in physical
memory.
disk
8
Problem 7
  • Which of the following programming techniques and
    structures are good for a demand paged
    environment? Which are bad? Explain your
    answers.
  • Stack
  • Hashed symbol table
  • Sequential search
  • Binary search
  • Pure code (that is, no data)
  • Linear array (vector) operations
Write a Comment
User Comments (0)
About PowerShow.com