Operating System Overview (Quiz 1)
Virtual Memory
- A facility that allows programs to address memory from a logical point of view, without regard to the amount of main memory physically available - Conceived to meet the requirement of having multiple user jobs reside in main memory concurrently
Temporary Fault
- A fault that is not present all the time for all operating conditions - Can be classified as... > Transient - a fault that occurs only once > Intermittent - a fault that occurs at multiple, unpredictable times
Permanent Fault
- A fault that, after it occurs, is always present - The fault persists until the faulty component is replaced or repaired
Paging
- Allows processes to be comprised of a number of fixed-size blocks, called ____ - Program references a word by means of a virtual address, consisting of a page number and an offset within the ____ - Each ____ of a process may be located anywhere in main memory - provides a dynamic mapping between the virtual address used in the program and a real address (or physical address) in main memory
Components of a Process
- An executable program - The associated data needed by the program (variables, work space, buffers, etc.) - The execution context (or "process state") of the program
Time-Sharing Systems
- Can be used to handle multiple interactive jobs - Processor time is shared among multiple users - Multiple users simultaneously access the system through terminals, with the OS interleaving the execution of each user program in a short burst or quantum of computation
Resource allocation policies must consider:
- Efficiency - Fairness - Differential responsiveness
Temporal redundancy
- Involves repeating a function or operation when an error is detected - Is effective with temporary faults but not useful for permanent faults
Desirable Hardware Features
- Memory protection - Timer - Privileged instructions - Interrupts
Monitor Point of View
- Monitor controls the sequence of events - Resident Monitor is software always in memory - Monitor reads in job and gives control - Job returns control to monitor
Kernel Mode
- Monitor executes in kernel mode - Privileged instructions may be executed - Protected areas of memory may be accessed
Multiprogramming
- Must be enough memory to hold the OS and one user program - When one job needs to wait for I/O, the processor can switch to the other job, which is likely not waiting for I/O - Multitasking
The OS has five principal storage management responsibilities:
- Process isolation - Automatic allocation and management - Support of modular programming - Protection and access control - Long-term storage
Techniques that support fault tolerance
- Process isolation - Concurrency controls - Virtual machines - Checkpoints and rollbacks
Processor Point of View
- Processor executes instruction from the memory containing the monitor - Executes the instructions in the user program until it encounters an ending or error condition
Reliability
- R(t) - Defined as the probability of its correct operation up to time t given that the system was operating correctly at time t=o
Loadable Modules (part of a Modular Structure)
- Relatively independent blocks - An object file whose code can be linked to and unlinked from the kernel at runtime - Executed in kernel mode on behalf of the current process - Have two important characteristics: > Dynamic linking > Stackable modules
Process Management
- The entire state of the process at any instant is contained in its context - New features can be designed and incorporated into the OS by expanding the context to include any new information needed to support the feature
User Mode
- User program executes in user mode - Certain areas of memory are protected from user access - Certain instructions may not be executed
Fault Tolerance
- the ability of a system or component to continue normal operation despite the presence of hardware or software faults - Intended to increase the reliability of a system
Computer system can be divided into four components:
-Hardware -Operating system -Application programs -Users
Serial Processing (Earliest Computers)
-No operating system -Computers ran from a console with display lights, toggle switches, some form of input device, and a printer -Users have access to the computer in "series"
Operating System Services
-Program development -Program execution -Access I/O devices -Controlled access to files -System access -Error detection and response -Accounting
Privileged instructions
Can only be executed by the monitor
Simple Batch Systems
Early computers were very expensive (important to maximize processor utilization) Monitor: - User no longer has direct access to processor - Job is submitted to computer operator who batches them together and places them on an input device - Program branches back to the monitor when finished
Interrupts
Gives OS more flexibility in controlling user programs
Multiprogrammed Batch Systems
I/O devices are slow compared to processor. Even with automatic job sequencing. Processor is often idle
Spatial (physical) redundancy
Involves the use of multiple components that either perform the same function simultaneously or are configured so that one component is available as a backup in case of the failure of another component
Principle objective; Source of directives to OS (Batch Multiprogramming)
Maximize processor use; Job control language commands provided with the job
Principle objective; Source of directives to OS (Time Sharing)
Minimize response time; Commands entered at the terminal
Timer
Prevents a job from monopolizing the system
"Control is returned to the monitor"
Processor is fetching and executing instructions from the monitor program
"Control is passed to a job"
Processor is fetching and executing instructions in a user program
Information redundancy
Provides fault tolerance by replicating or coding data in such a way that bit errors can be both detected and corrected
Serial Processing (Problems):
Schedule: - hardcopy sign-up sheet to reserve computer time - Time allocations could run short or long, resulting in wasted computer time Setup time: - Considerable amount of time was spent on setting up the program to run
Evolution of Operating Systems
Serial Processing --> Simple Batch Systems --> Multiprogrammed Batch Systems--> Time Sharing Systems
Job Control Language (JCL)
Special type of programming language used to provide instructions to the monitor What compiler to use What data to use
Uniprogramming
The processor spends a certain amount of time executing, until it reaches an I/O instruction; it must then wait until that I/O instruction concludes before proceeding
Memory protection
While the user program is executing, it must not alter the memory area containing the monitor
Mean time to repair (MTTR)
the average time it takes to repair or replace a faulty element
Availability
the fraction of time the system is available to service users' requests A = MTTF/(MTTF + MTTR)
Mean time to failure (MTTF)
the length of time that a system is expected to last until it fails. --> lifetime of a product or device.