Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
188 Cards in this Set
- Front
- Back
How does the aging algorithm for page replacement differ from LRU?
|
aging doesn't distinguish between earlier and later references, and has a limited time horizon
|
|
How does the aging algorithm for page replacement modify NFU?
|
it uses only a limited number of bits to record and sum past values of the R bit at each clock tick
|
|
How is memory managed using a bitmap?
|
each 1 in the bitmap represents a used chunk of memory, and each 0 an empty chunk
|
|
How is memory managed using a linked list?
|
each entry in the list describes a chunk of memory (location, size, and full/empty)
|
|
In what area does LFS perform much better than UNIX?
|
by batching numerous small writes
|
|
What are base and limit registers?
|
a hardware-based approach to memory abstraction that uses a starting address (base) and max size (limit)
|
|
What are block special files used to model?
|
disks
|
|
What are character special files used to model?
|
I/O serial devices
|
|
What are disadvantages of best fit for memory management?
|
it is slower to search the whole list for the best fit, and small leftover spaces increase fragmentation
|
|
What are internal and external fragmentation?
|
wasted space within a page is internal, between segments is external
|
|
What are PThreads?
|
a standard POSIX threads package (POSIX Threads) available on many UNIXes
|
|
What are some common attributes in a page table entry?
|
referenced bit (R), modified bit (B), read/write access protection, and present/absent bit
|
|
What are some commonly used JFSs?
|
NTFS, ReiserFS, and ext3
|
|
What are static and dynamic relocation?
|
static relocation remaps all memory addresses at load time; dynamic, at run time using base/limit registers
|
|
What are the advantages of a kernel-space threads package?
|
each process doesn't need to manage its own threads; kernel can block threads within processes, not the whole process; threaded programs are I/O driven anyway so might as well use system calls to manage their threads
|
|
What are the advantages of a user-space threads package?
|
the kernel need not support threads; thread switching is faster; scales better with more threads; can customize scheduling per process
|
|
What are the advantages of memory segmentation over paging?
|
isolates program sections in different address spaces; can distinguish code and data for different protection; can accommodate sections of uneven and changing size; facilitates sharing of code between users
|
|
What are the exec() group of system calls used for?
|
replace the core image of a process (typically a child process) with a new program
|
|
What are the four possible transitions between process states?
|
1. process blocks for input (running -> blocked); 2. scheduler picks another process (running -> ready); 3. scheduler picks this process (ready -> running); 4. input becomes available (blocked -> ready)
|
|
What are the pro and con of multilevel page tables?
|
less memory used due to not storing entire page table, but more time for multiple lookups
|
|
What are the three criteria to solve the critical section problem?
|
mutual exclusion, progress, and bounded waiting
|
|
What are the three process states as seen by the scheduler?
|
running, blocked and ready
|
|
What are the three segments of a process?
|
text (or code), data, and stack
|
|
What are the two components of a virtual address?
|
index into page table (higher bits) and offset within page (remaining bits)
|
|
What are the two kinds of involuntary process termination?
|
fatal error and being killed by another process
|
|
What are the two kinds of voluntary process termination?
|
normal exit and error exit
|
|
What are the two main functions of an operating system?
|
managing system resources and providing application programs with an interface
|
|
What are the two most efficient and practical page replacement algorithms?
|
aging (based on LRU) and WSClock (based on clock and working set)
|
|
What are the two roles of an operating system?
|
extended machine (presents beautiful interface) and resource manager (allows sharing resources)
|
|
What are three categories of scheduling algorithms?
|
batch, interactive, and real time
|
|
What are three essential requirements for long-term storage?
|
large capacity, persistence, and concurrent access
|
|
What are two main ways of implementing a threads package?
|
in user space and in the kernel
|
|
What disadvantage of the NFU algorithm led to the development of the aging algorithm modification?
|
NFU doesn't forget older page references, and so might swap out newer pages for older more referenced pages
|
|
What does a file path specify?
|
the unique location of the file in the file system
|
|
What does a hard link point to?
|
the file itself (its i-node)
|
|
What does a soft, or symbolic, link point to?
|
a filename
|
|
What four areas does an operating system manage?
|
processes, memory, file system, and devices
|
|
What is a boot sector, or boot block?
|
the first sector of a disk, which is used to boot a computer
|
|
What is a cache?
|
fast, temporary storage for frequently used information
|
|
What is a client?
|
a software program or hardware system which receives services from other programs (called servers)
|
|
What is a compiler?
|
a computer program that transforms source code into object code
|
|
What is a cylinder on a hard disk?
|
the vertical stack of all the tracks at a given arm position
|
|
What is a deadlock?
|
a program cannot continue because some processes are waiting on each other indefinitely
|
|
What is a directory?
|
a virtual container of files and other directories
|
|
What is a File Allocation Table (FAT)?
|
stores information in memory about file clusters and their locations
|
|
What is a file extension?
|
suffix to a file name that indicates its contents
|
|
What is a file system?
|
a method of organizing blocks on a storage device into files and directories
|
|
What is a file?
|
a named aggregation of data on a storage device
|
|
What is a hypervisor?
|
a hardware virtualization technique that allows multiple operating systems to run concurrently
|
|
What is a journaling file system (JFS)?
|
keeps track of changes before making them for recovery in case of system crash
|
|
What is a kernel?
|
the central part of an operating system
|
|
What is a linker?
|
a computer program that assembles the object files generated by a compiler into an executable program
|
|
What is a lock?
|
a synchronization mechanism, such as a mutex, that restricts access to a shared resource
|
|
What is a log-structured file system (LFS)?
|
treats file system as circular log and batches pending writes into segments
|
|
What is a mainframe?
|
a large, powerful, multiuser system typically used by a large organization
|
|
What is a memory management unit (MMU)?
|
part of a CPU that translates virtual memory addresses to physical addresses
|
|
What is a microkernel?
|
an OS architecture where only the bare essentials, not including device drivers, runs in kernel mode
|
|
What is a monitor?
|
an object or module that only allows one of its methods to execute at a time
|
|
What is a monolithic kernel?
|
an OS architecture where the entire system, including device drivers, runs in kernel mode
|
|
What is a mutex?
|
an object in a program that serves as a lock, used to negotiate mutual exclusion among threads
|
|
What is a page fault?
|
a trap to the kernel to retrieve a page from disk when it is not in physical memory
|
|
What is a page frame?
|
a unit of physical memory that holds one page
|
|
What is a partition table?
|
describes the partitions, or divisions, of a storage device such as a hard disk
|
|
What is a potential drawback of SJF and SRT scheduling?
|
since shorter processes go first, longer processes can be delayed indefinitely (resource starvation)
|
|
What is a process control block (PCB)?
|
a data structure used by the kernel to manage a process
|
|
What is a process?
|
an instance of executing a program
|
|
What is a quantum, or time slice?
|
the maximum amount of time a process is allowed to run before being preempted
|
|
What is a race condition?
|
a flaw in a system by which the sequence or timing of process events changes the outcome
|
|
What is a real-time operating system (RTOS)?
|
an operating system intended to serve requests within a specific time frame
|
|
What is a register?
|
a location in the CPU used to store a data word for immediate processing
|
|
What is a relative path?
|
a path specified relative to the working directory
|
|
What is a semaphore?
|
a counter of available shared resources used to enforce waiting when resources run out
|
|
What is a server?
|
a software program or hardware system which provides services to other programs (called clients)
|
|
What is a shared library or shared object?
|
a file such as a DLL intended to loaded once at run time and shared between all executables
|
|
What is a signal?
|
an asynchronous notification sent to a process to notify it that an event has occurred
|
|
What is a spinlock?
|
a lock that is checked repeatedly by a thread in a continuous loop (a form of busy waiting)
|
|
What is a status register, or flag register?
|
a collection of flag bits (such as zero, carry, and overflow) that indicate process state
|
|
What is a superuser?
|
a user with complete access to an operating system and its configuration
|
|
What is a swap file, partition, or disk?
|
a file, partition, or disk specially laid out to store memory pages more directly and efficiently
|
|
What is a system call?
|
a procedure call used by programs to request services from the kernel
|
|
What is a test-and-set instruction, for example, TSL?
|
an instruction used to write to a memory location and return its old value as an atomic operation
|
|
What is a thread?
|
a unit of program execution which is lighter than a process and shares more resources
|
|
What is a track on a hard disk?
|
a ring-shaped area of data storage on a platter
|
|
What is a translation lookaside buffer (TLB)?
|
a CPU cache that the MMU uses to improve the speed of virtual address lookups
|
|
What is a trap?
|
an exception generated by the processor
|
|
What is a virtual file system (VFS)?
|
an abstraction layer over concrete file systems that provides uniformity of access
|
|
What is a virtual machine?
|
a software emulation of a computer that runs in an isolated partition of a real computer
|
|
What is a zombie process?
|
a process which has terminated but not yet been removed from the process list
|
|
What is an absolute path?
|
a path specified from the root directory
|
|
What is an active partition?
|
the partition of a hard disk used for booting
|
|
What is an advantage of i-nodes over FAT?
|
scalability, because with i-nodes, only open files use space in memory
|
|
What is an advantage of NFU over LRU algorithms?
|
LRU typically require the use of special hardware for efficient implementation, but NFU can be done in software
|
|
What is an atomic operation?
|
an operation that is guaranteed to complete fully, or not at all
|
|
What is an exception?
|
an interruption in normal processing, especially when caused by an error condition
|
|
What is an i-node, or index node?
|
a data structure that represents a file system object and its block locations on disk
|
|
What is an interrupt handler?
|
a callback subroutine whose execution is triggered by the reception of an interrupt
|
|
What is an interrupt vector?
|
the memory address of an interrupt handler
|
|
What is an inverted page table (IPT)?
|
a partial page table in RAM that uses hashing and page lists to avoid lookup collisions
|
|
What is anticipatory paging, or prepaging?
|
attempting to identify and load needed pages in advance
|
|
What is asynchronous IPC?
|
sender sends message to kernel buffer then continues
|
|
What is batch processing?
|
execution of a series of programs, called “jobs”, without manual intervention
|
|
What is blocking?
|
waiting on a specified condition, for example some I/O activity, to occur
|
|
What is bootstrapping, or booting?
|
the process of initially loading an OS into memory
|
|
What is bounded waiting in the critical section problem?
|
no process should have to wait forever to enter its critical region
|
|
What is busy waiting?
|
actively waiting for an event by executing a loop and repeatedly checking for completion
|
|
What is demand paging?
|
pages are only loaded when called for, not in advance
|
|
What is dynamic-link library (DLL)?
|
Microsoft's implementation of the shared library concept
|
|
What is first-come, first-served (FCFS) scheduling?
|
each process is scheduled to execute in the order they are received
|
|
What is forking?
|
splitting up a process into itself (the parent) and a child process
|
|
What is interprocess communication (IPC)?
|
a set of methods for the exchange of data among multiple threads in one or more processes
|
|
What is kernel mode, or supervisor mode?
|
a mode that grants the kernel full system access, including privileged instructions
|
|
What is locality of reference?
|
the tendency for related storage locations to be more frequently accessed, enabling optimization
|
|
What is meant by "ontogeny recapitulates phylogeny"?
|
embryo development repeats species evolution (each generation repeats the developmental stages of its ancestors)
|
|
What is memory segmentation?
|
deliberate separation of a program into independently numbered and addressed sections for different program parts or shared libraries
|
|
What is mounting?
|
attaching a drive or device to the directory structure to make it available to the operating system
|
|
What is multiprocessing?
|
computation using more than one processor
|
|
What is multiprogramming?
|
running multiple programs concurrently, which can be done with one or more processors
|
|
What is mutual exclusion in the critical section problem?
|
no two processes can be simultaneously inside their critical region
|
|
What is Portable Operating System Interface for UNIX (POSIX)?
|
a family of IEEE standards that define a compatible UNIX system
|
|
What is position-independent code?
|
code such as in a shared library that uses only relative addresses so it can be located anywhere in the virtual address space
|
|
What is preemption?
|
when a scheduling system temporarily interrupts a process without its cooperation
|
|
What is priority scheduling?
|
uses some system to assign priorities to processes and run them in priority order
|
|
What is resource starvation?
|
a condition where a process denied necessary resources is never able to finish
|
|
What is rotational latency for a hard disk?
|
the delay waiting for the rotation of the disk to bring the required sector under the read/write head
|
|
What is round robin scheduling?
|
schedules each process in turn before pushing it to the end of a queue
|
|
What is seek time for a hard disk?
|
the time it takes the head assembly to travel to the required track for reading or writing
|
|
What is shortest job first (SJF) scheduling?
|
the process with the shortest expected total execution time is scheduled to go first
|
|
What is shortest remaining time (SRT) scheduling?
|
like SJF, but preempts currently scheduled process if its remaining time is greater than the total time of a newly arriving process
|
|
What is synchronous IPC?
|
the sender blocks until the receiver is ready
|
|
What is the clock algorithm for page replacement?
|
like second chance, but uses a clock whose hand points to oldest page; if R=1, clear R and advance hand, but if R=0, replace page and advance hand
|
|
What is the degree of multiprogramming?
|
the number of processes in memory at once (n), which produces CPU utilization of 1-p^n, where p is proportion of time spent by one process in blocking for I/O
|
|
What is the difference between swapping and virtual memory?
|
swapping suspends the entire process to disk, but virtual memory can suspend unused parts of a running process
|
|
What is the difference between type 1 and 2 hypervisors?
|
type 1 hypervisors run directly on the hardware, but type 2 hypervisors run on another operating system
|
|
What is the dining philosophers problem?
|
used to illustrate synchronization issues among 5 philosophers seizing left and right forks
|
|
What is the kill() system call used for?
|
send a signal to a process
|
|
What is the least recently used (LRU) algorithm for page replacement?
|
for n pages, use an nxn matrix; when page frame k is referenced, set all bits in row k to 1, then all bits in column k to 0; the row with the lowest sum is LRU and can be replaced
|
|
What is the main advantage of multiprogramming?
|
using more CPU capacity by scheduling ready processes while other processes block for I/O
|
|
What is the memory hierarchy?
|
a series of levels representing tradeoffs between response time and capacity
|
|
What is the not frequently used (NFU) algorithm for page replacement?
|
at each clock tick, add 1 to a page counter for every page that has the R bit set, and remove the page with the lowest counter when needed
|
|
What is the not recently used (NRU) algorithm for page replacement?
|
removes a page at random from the lowest-numbered, non-empty class -R/-M, -R/M, R/-M, and R/M
|
|
What is the Peterson's solution to the critical region problem?
|
uses two variables, interested (do I want the lock?) and turn (whose turn is it?)
|
|
What is the producer-consumer problem, or the bounded buffer problem?
|
a producer and consumer must coordinate the use of a fixed-size buffer with each other
|
|
What is the progress criterion in the critical section problem?
|
no process running outside its critical region may block other processes
|
|
What is the readers-writers problem?
|
the problem of synchronizing both reading and writing to the same shared resource
|
|
What is the root directory?
|
the top level directory in the hierarchy
|
|
What is the second chance algorithm for page replacement?
|
an improvement over FIFO that clears the R bit of the oldest page then puts it at the end of the queue, giving it a "second chance"
|
|
What is the strict alternation solution to the critical region problem?
|
using a shared turn variable to ensure that two processes always swap: A, B, A, B, ...
|
|
What is the waitpid() system call used for?
|
waiting for a child process to terminate
|
|
What is the working set algorithm for page replacement?
|
if R=1, set time of last use; if R=0 and age>limit, remove this page; if R=0 and age<limit, remove oldest page
|
|
What is the working set model?
|
reducing the page fault rate for a process by attempting to identify and load its working set
|
|
What is the working set?
|
the set of pages that a process is currently using
|
|
What is the WSClock algorithm for page replacement?
|
a variant of the clock algorithm that gives improved results by also using working set information
|
|
What is thrashing?
|
excessive paging of virtual memory
|
|
What is throughput?
|
the number of processes that a system can execute in a given period of time
|
|
What is time sharing?
|
a term previously used for concurrent system use among multiple users; now called “multitasking”
|
|
What is turnaround time?
|
the average time that it takes to execute a process
|
|
What is virtual memory?
|
gives each process its own address space by swapping pages out to disk
|
|
What items are shared between threads of a single process?
|
program counter, registers, stack, and state
|
|
What mode do traps, interrupts, and system calls run in?
|
kernel mode
|
|
Which of traps, interrupts, and system calls are requested by the user?
|
system calls are requested by the user, but traps and interrupts are triggered by hardware
|
|
Which of traps, interrupts, and system calls are synchronous?
|
traps and system calls are synchronous (predictable), but interrupts are asynchronous (unpredictable)
|
|
Why are JFSs more commonly used than LFSs?
|
LFS is incompatible with existing file systems
|
|
Why do disk reads always block, but not disk writes?
|
a disk read can't proceed without its data, but a disk write can usually buffer the data and continue
|
|
Why should a programmer care which calls are system calls?
|
because procedure calls in user space don't trap the kernel and so are faster
|
|
Why was the overlay system replaced by virtual memory?
|
each program had to be manually split into modular overlays, a slow and error-prone process, but virtual memory does automatic paging
|
|
What are the formulas for CPU efficiency for various values of q (quantum time), r (average run time before blocking), and s (switch time)?
|
for q > r, CPU efficiency is r/(r + s); for s < q < r, it is q/(q + s); for s = q < r, it is 1/2; for q nearly 0, it approaches 0
|
|
What is wait time?
|
the average time a process spends waiting to be scheduled
|
|
Which common scheduling algorithms are non-preemptive and which are preemptive?
|
non-preemptive = FCFS, SJF; preemptive = SRT, RR; either = priority
|
|
What is a simple way to achieve mutual exclusion on a single-CPU system?
|
disable interrupts and make no system calls or traps to retain control during critical section
|
|
What are goals of scheduling algorithms shared by all systems?
|
fairness (sharing the CPU); policy enforcement; and balance (keeping all parts of system busy)
|
|
What are goals of scheduling algorithms specific to batch systems?
|
throughput (maximize), turnaround time (minimize), and CPU utilization (keep consistently high)
|
|
What are goals of scheduling algorithms specific to interactive systems?
|
response time (respond to users quickly); proportionality (meet expectations)
|
|
What are goals of scheduling algorithms specific to real-time systems?
|
meeting deadlines; predictability (consistency of delivering multimedia)
|
|
What is a disadvantage of monitors?
|
monitors require programming support that is not available in some languages
|
|
What are the four required conditions for deadlock to occur?
|
1. mutual exclusion (each resource allocated to only one process); 2. hold and wait (processes do not release resources while waiting); 3. no preemption (once granted, resources cannot be taken away); 4. circular wait (two or more processes in a chain are waiting on each other)
|
|
When segmentation is combined with paging, what are the parts of the virtual address?
|
segment number, then page number, then offset
|
|
How do you assign and access a shell variable?
|
assign like myvar="This example" or myvar=9, then access like echo $myvar
|
|
What are some special shell variables?
|
PWD (current directory), PATH (program search path), HOME (user home directory), PS1 (main prompt)
|
|
What does the jobs command do?
|
lists all background jobs
|
|
What does the ps command do?
|
list running processes
|
|
How do you suspend or kill a running job?
|
suspend with Ctrl-Z, and kill with Ctrl-C
|
|
What does the -Wall option do for gcc?
|
show all warnings
|
|
How do you specify a library name to gcc?
|
from the filename, which has the pattern libname.a, drop the lib and .a and specify name only
|
|
What is an integrated development environment (IDE)?
|
a software application that provides comprehensive facilities to computer programmers for software development
|
|
What are the advantages of memory-mapped I/O?
|
no need for special instructions and assembly code to access device control registers, and can control user access to devices using ordinary memory allocation mechanisms
|
|
What are the disadvantages of memory-mapped I/O?
|
cache needs to be designed to not cache device control registers, and modern systems with separate buses for memory and I/O require special handling
|
|
What is direct memory access (DMA)?
|
hardware design that allows direct data transfer between memory and devices without keeping the CPU busy
|
|
What are some reasons why DMA might not be used?
|
because CPUs are usually faster and sometimes have no other pending work, and to save money on low-end or embedded hardware
|