The property of some page replacement algorithms that, for some reference strings, adding additional page frames increases the number of page faults.
A scheduling policy that uses knowledge about how long jobs will take to select the shortest job to run first. It requires knowledge of the future, and so is not possible to implement exactly.
The collection of all tracks on all platters equal distant from the center of the disk drive.
file pointers are an implicit way to specify the next location to be read or written. Direct I/O provides explicit offsets with each request.
P and V are atomic since one invocation of system_service can not be interrupted by another. Timer interrupts can go off, but they only set a flag if system_service is active.
a two level page table (the pointer to the page directory is stored in a register)
no cache or TLB
a memory reference takes 100 nanoseconds
Assume that page directories and tables are pinned down (always) in memory. We need to access the page dir, the page table, and then the data reference. The reference to data could cause a page fault. EAT = 100ns + 100ns + 10-5(10ms + 100ns) + 100ns 400ns.
Adding a page table implies that 75% of the time we can skip the translation memory accesses. Also if the item is in the TLB, we know it is in memory (not paged out).
So EAT = .75(100ns) + .24999 (3 * 100ns) + 10-5 (10ms + 3 * 100 ns) 250ns.
- internal fragmentation goes up
+ fewer page faults if spatial locality is large enough
- longer time to service a single fault since there is more data to move
+ faster to process one large page fault than two smaller ones
(due to fault handler time & maybe seek time)
- more data to write back for dirty pages
Per process page tables provide only way to access memory. If a frame lacks a PTE, there is no way for a process to access it
Only the OS can write to or update the page tables, so processes can't map frames that are not theirs.
Attempts to access PTE items that are not valid result in a page fault trap into the OS.
Oxygen process
while (1) {
P(oxygen);
P(mutex);
waiting++;
if (waiting == 3) then
V(go); V(go); V(go);
V(mutex);
P(go);
// makeWater();
V(oxygen);
}
Hydrogen process
while (1) {
P(hydrogen);
P(mutex);
waiting++;
if (waiting == 3) then
V(go); V(go); V(go);
V(mutex);
P(go);
// makeWater();
V(hydrogen);
}
Initial Values
semaphore mutex = 1
semaphore hydrogen = 2
semaphore oxygen = 1
semaphore go = 0
variable int waiting = 0
Disks have heads that need to seek to reach the desired blocks. Thus the time to access random locations is not uniform and independent of the previous accesses.
Indexed allocation is better since it is possible to reach any location in a file with only a constant number of pointer accesses (through the direct, indirect, double indirect, or triple indirect blocks). With linked allocation we need to walk the forward though the links to find a specific location in a file. This applies to reverse sequential reads. For appends, most linked schemes maintain a pointer to the last block to make append faster.
Need to change all data structures that have a block field to have a block plus disk field. This would reduce the mean time to data loss since the probability of failure for n dsks is (1-p)n where p is the probability that one disk has not failed.