Mid-Term Flashcards
Traps and interrupts are very similar; name one thing that makes interrupts different from traps in the way they are handled.
anything from this list:
- interrupts have priorities, traps do not
- traps are processed immediately when they occur, interrupts are deferred until the current instruction finishes
- an interrupted process often resumes, but it is rare for a process that experienced a trap to resumeDefinition
Arrange in order from longest latency to shortest (i.e., slowest access time to fastest), making sure to indicate which is fastest:.
optical disk, register,RAM/main memory, magnetic disk, cache
from slowest (longest latency) to fastest (shortest latency): optical disk, magnetic disk, RAM/main memory, cache, register
Having detected deadlock, briefly describe two strategies that can be used to correct the problem.
two from:
- delete all deadlocked processes
- delete deadlocked processes one by one until deadlock is gone
- roll deadlocked processes back to a previous checkpoint and allow them to move forward again from that point
Briefly explain what makes a master/slave multiprocessor different from asymmetric multiprocessor
In master/slave, only the master can perform system call code: every process needing to perform a system call, no matter what cpu it runs on, must wait for the master cpu to perform the system call. Since this is a simple extension of normal single-processor systems, master/slave systems are easier to build. In a symmetric multiprocessor, any processor can perform a system call, so there is no bottleneck at a master cpu. Synchronization across processors is much harder with symmetric multiprocessors.
Handling a page fault requires that the missing page to be located on disk and loaded into memory. The wait for this operation is overwhelmingly dominated by the time the disk takes to respond. Briefly describe a situation in which the waiting time (time from when page faultoccurs to when the page is available in memory for use) may be twice as long as what is
described here.
The waiting time for resolution of a page fault is primarily the time it takes to get the page from the disk (rotational and seek delays drive this delay). The delay may be twice as long if no memory frames were available to hold the newly sought page and no page in any frame is unmodified, meaning that a page must first be written out to disk before a frame is available to hold the new page. Recall that writing to
disks is slower than reading (but still overwhelmingly dominated by rotational and seek delays).
What does the term cache-hit ratio tell you?
The cache hit ratio is the ratio of the number of times a memory location is referenced and is successfully found to be in the cache (a cache hit) to the total number of memory references. [remember: a ratio is a comparison of something to something else]
Data structure where OS keeps administrative & status information about a process:
PCB
Number of pages of a process that may appear in a frame of memory at a time
1
Part of the OS always resident in memory
kernel
What you get when you cannot find a page table entry for a page
page fault
An executable image of a program suitable for loading into memory to be run is a
load module
The time between a user submitting a request and the start of some response is
response time
Special associative cache memory used to speed up page table look-ups
TLB (translate lookaside buffer)
Fixed partition allocation schemes suffer from ______ fragmentation
internal
The only tool that comes standard with Windows for pure plain text editing
notepad
A synchronization technique that works in all combinations of single/multiple CPU with single/multiple memories
message passing
The set of pages of a process present in real memory is the ______ set.
resident
Part of computer that mediates movement of data between CPU and other system components like memory and peripherals:
bus
To create a new process in any Unix style system, first use a _____ system call
fork
If, on a virtual Windows machine, a user creates and saves 10 new files, how many of these new files are added as new files to what already appears on the hosting system:
0
Peripheral devices may be operated using a polling technique, or using _______
interrupts
Suppose a system uses 512-byte pages: how many address bits are needed for the offset onto a page (hint: 1024 = 2^10):
9
An area of code that must not be simultaneously accessed by more than one process is a _______
critical section
A hardware instruction to support mutual exclusion ______
one of tx, exch
Adding more frames of memory always improves page fault behaviour (i.e., reduces number of page faults).
false
An OS only works when directly controlling real hardware
false
Semaphores fail to work as asynchronization mechanism on systemswith multiple CPUs and one shared memory.
false
Most practical OS simply ignore the possibility of deadlock.
true
Generally,the faster the memory(lower latency), the more expensive it is.
true
All resources managed by a computer are hardware resources.
false
The only resource given up by a blocked process is the CPU.
true
The use of unequal-sized fixed partitions fails to resolve the fragmentation problem
true
Every UNIX/linux process (except one) is a child of some parent process.
true
Swapping a process out of memory moves part or all of the process.
false