1) Which takes more time, to read a disk block or to schedule a new process?
2) Which of the following CPU instructions or memory regions
should be privileged?
The program
counter
The CPU registers
The kernel's memory
map The
disk controller registers
RAM
The current processes memory map
Rik
Smitts
Larry Bird
3) Using Round Robin scheduling, in a preemptive scheduler, on
Wedsenday at 4:17 pm, for applications written in C++, with Dale
Davis at the computer, on a computer with a joystick, on an Intel
486, list three things that must be done at context switch time,
to switch among different processes.
____________________________________________________________
____________________________________________________________
____________________________________________________________
4) (2 points) Suppose that it takes 100 ns to access a
location in RAM assuming the translation is in the TLB (the
MMU's cache). Further, it takes 200 ns to load the
TLB using a normal page table, and 2000 ns to load the
TLB using an inverted page table. The TLB hit
rate is 99.9%. How long does the average memory access take
using both methods?
Normal Page Table
_______________ Inverted Page Table
_____________
5) Do threads within a process share the same memory map? _____________
6) All my computer does is interractive tasks. It is very
important that the computer be fair to each user, that every
user gets his fair share, and that no process
can stop the computer. What type of scheduler should I
use, and why?
7) (2 points) My operating system uses the one handed clock algorithm. The page table is shown below, and the 'hand' is about to examine the first entry. What page do I replace, and do I need to write it to disk? Finally, show the page table after the page has been replaced.
Page to replace __________ Write to Disk? _______________
Physical Page Number | 2 | 3 | 4 | 7 | 6 |
Dirty | Y | N | Y | N | Y |
Referenced | Y | N | Y | N | N |
8) Suppose Jalen Rose wants to begin to execute a
program. The executable is 1000 KB, and was written in
C (not C++). When the O.S. first starts the
program, how much does it bring in (give or take)?
9) In my computer, programs are loaded into low memory, and the heap starts at the end of the loaded code. In this scheme, where should the stack start? Which direction (towards high or towards low) should the heap grow, and which way should the stack grow?
Stack
start: ________________________________________
Stack
direction _____________________________________
Heap
direction ______________________________________
10) Suppose that my operating system uses a microkernel. How does a normal process access the network?
11) Below is space for a File Allocation Table and a directory for a Windows FAT file system. Add the file config.sys, which needs five disk blocks to hold it. Make me a new FAT table, and a new directory showing how things are after the file has been added. For the FAT table, '0' means not in use, and 999 means end of file chain. The first disk block is numbered 1, not zero.
|
|
12) The Pacer central office has 6 disks, each holding 10G. Using RAID level 5, how much can the RAID system hold? _______________
13) The same Pacer central office has 10 disks.
Each disk is 10% likely to fail in a given year, and there
is a 0.01% chance that two disks fail in the same day.
There is a one in a zillion chance that three or more disks fail
in the same day (meteor, terrorist, etc.). It
takes the water boy a day to get a disk installed, formatted, and
repopulated with data. What are the odds the Pacers lose
data using RAID-5. _________ What are the odds using
RAID-1? ___________ What are the odds using RAID-0?
14) My computer has 2K byte pages. I have 1,000 memory allocations to do. My total RAM size is a gigabyte. Average memory allocation size is 100K, but allocations vary greatly in size. What amount of memory is wasted due to external fragmentation? _____________ What amount do to internal fragmentation? _____________ Does everything fit into the RAM available?
15) Why do we run disk defragmentors? What advantage do
we get doing so?
16) How long does the average open() system call take?
one millisecond
one microsecond
one second
17) The Pacers want to break into the Utah Jazz play book
(their only hope of winning the Eastern Conference). They
notice that when they run their break-the-cypher program the disk
light is on continuously, and my program is too darn slow.
What can they do to speed their program?
Buy a faster CPU
Buy more RAM
Buy a faster ethernet card.
Hire Austin 3:15
18) What was the coolest, neatest, most interesting
algorithm we talked about in class?
19) Which is generally faster, a hard drive or a CD-ROM?
20) I notice that my file accesses seem slower that my neighbors. We are both the same type of user (same priority level and all that.) We store are files on the same disk, however, not on the same place upon the disk. My neighbor says that because his accesses are faster, he knows what disk head scheduling algorithm the computer must be using. What algorithm is it, and how does he know?
21) A disk has 10 tracks, 200 sectors, 2 platters, and 50
cylinders. Each sector holds 1K. How much does the
disk hold? (show units. Don't say 512, say
512K or 512M or something.)
23) I have a program that has 100K of
executable code, and needs 50K to store data.
I want to run 10 copies of this program on an operating
system using virtual memory, like Linux or Windows. I'd
like everything to fit into RAM, with no swapping or
paging. How much RAM do I need?
24) Suppose I have two different programs (maybe an
editor and a compiler). I want to run both at the same
time. The operating system uses load time binding (like
Linux or Windows). The first program you know loads at
VIRTUAL address 1000, and is 100,000 bytes long. At
what virtual address do you think the second program is likely to
load, and why?
26) What part of the class did you find most valuable? What part could be skipped?