COSC 4330 Review Session - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

COSC 4330 Review Session

Description:

What is the maximum size of a page table? A virtual address ... bit addresses and a page size of one kilobyte. ... at home with a page size of 8KB. ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 24
Provided by: www249
Category:
Tags: cosc | review | session

less

Transcript and Presenter's Notes

Title: COSC 4330 Review Session


1
COSC 4330 Review Session
  • December 11, 2008

2
Introduction
  • These are the same problems as in the handout

3
First Problem
  • A pizza oven can contain nine pizzas but the oven
    narrow opening allows only one cook at a time to
    either put a pizza in the oven or to take one
    out. Given that there will be more than one cook
    preparing pizzas at any given time, complete the
    missing lines in the following C procedure

4
First Problem
5
First Problem
  • semaphore oven ______semaphore access
    _______

6
First Problem
  • make_pizza(int size, int toppings)
    prepare_pizza(size, toppings) _________________
    __________________ put_into_oven() _____________
    ______________________ wait_until_done() _______
    ____________________________ take_from_oven() _
    __________________________________ //
    make_pizza

7
Second Problem
  • How should you modify a monitor when you replace
    its signal calls by notify calls?

8
Third Problem
  • Explain why you cannot prevent deadlocks in
    client/server systems.

9
Fourth Problem
  • Among the following page replacement policies
  • Local FIFO, LOCAL LRU, Global FIFO, Global LRU,
    Original Clock, Berkeley Clock, and Windows,
    which ones
  • Are the poorest performers?
  • Cannot be implemented at a reasonable cost?

10
Fourth Problem
  • Among the following page replacement policies
  • Local FIFO, LOCAL LRU, Global FIFO, Global LRU,
    Original Clock, Berkeley Clock, and Windows,
    which ones
  • Provide a decent performance and do not require
    any special hard ware support?
  • Support real-time processes?

11
Fifth Problem
  • A virtual memory system has a virtual address
    space of 4 Gigabytes and a page size of 4
    Kilobytes. Each page table entry occupies 4
    bytes.
  • How many bits are used for the byte offset?
  • How many bits are used for the page number?

12
Fifth Problem
  • A virtual memory system has a virtual address
    space of 4 Gigabytes and a page size of 4
    Kilobytes. Each page table entry occupies 4
    bytes.
  • What is the maximum number of page table entries
    in a page table?
  • What is the maximum size of a page table?

13
A virtual address
  • Virtual address length Page number length
    Offset length 32 or 64 bits

14
Sixth Problem
  • A computer has 32 bit addresses and a page size
    of one kilobyte.
  • How many bits are used to represent the page
    number?
  • What is the maximum number of entries in a
    process page table?

15
Seventh Problem
  • A UNIX file system has 16 kilobyte pages and
    i-nodes with 15 block addresses. How many file
    bytes can be accessed
  • Directly from the i-node?.
  • With one level of indirection?
  • With two levels of indirections?
  • With three levels of indirections?

16
The BSD organization
17
Eighth Problem
  • Redo the same problem at home with a page size of
    8KB. Your answers should be XCVI KB, XVI MB, IV
    GB XVI MB XCVI KB and none.

18
Ninth Problem
  • Internal fragmentation is not a big problem in
    virtual memory systems. Is it always so in file
    systems? Give a hypothetical example to support
    your argument.

19
Tenth Problem
  • Alice, Bob and Carol want to share a few files on
    a UNIX system while preventing other users to
    access these files. What should they do?

20
Eleventh Problem
  • Give examples of capabilities and access controls
    lists in the UNIX file system.

21
Twelfth Problem True or False
  • You should always initialize monitor conditions
    to zero.
  • Many good programmers prefer to put all their
    signal operations at the end of their monitor
    procedures.
  • A process that acquires all its resources at the
    same time will never be involved in a deadlock.

22
Twelfth Problem True or False
  • Disk access time is one hundred times slower than
    main memory access times.
  • It makes no sense for a virtual memory system to
    have a valid bit and a dirty bit.
  • When a process gains control of the CPU of a
    virtual memory system, its entire page table is
    loaded into the systems TLB.

23
Twelfth Problem True or False
  • UNIX uses file-specific passwords to control
    access to files.
  • UNIX stores the name of a file in its i-node.
  • A UNIX file can have several names.
Write a Comment
User Comments (0)
About PowerShow.com