Chapter 1 Flashcards
What is OS basic
A large program
What does OS manage
Computer hardware resources, decides between conflicting requests for efficient and fair resource use
What kind of program is OS
Control
What is relationship of OS between user of computer and computer hardware
Intermediary
Why does OS control execution of programs?
To prevent errors and improper use of the computer
What does CPU repeat?
Cycle of fetching and executing low level machine instructions
OS goals for user
Execute user programs and make it easy and convenient
OS goals system/Hardware
Manage resources and use computer hardware efficiently
OS Abstraction
The act of removing unimportant details or attributes of objects in order to construct more general and less complex objects
OS Virtualization
The act of creating the illusion of having one or more objects with more desirable characteristics than the real object.
How does OS use abstraction?
Multiple operations at one level are combined into a single operation at a higher level, making it easier to use
How does OS use virtualization?
Create virtual CPUs, memory, I/O devices
Batch Processing
Method of running software programs(jobs) in batches automatically with no user interaction required
4 Major OS components
- Processes and Threads
- CPU Scheduling
- I/O Management
- Memory Management
Multiprogramming
Technique that keeps several programs active in memory and switches execution among the different programs to maximize the use of the CPU and other resources
Multiprogramming example
When a program enters IO phase then another program can utilize the CPU
Time-sharing (multi-tasking)
Extension of multiprogramming where the CPU switches jobs so frequently that users can interact with each job while it is running
What does time-sharing create
interactive computing
Time-sharing employs concept of
Virtualization by creating illusion of having a separate virtual CPU for each computation
Can abstraction be used without virtualization
Yes
Can virtualization be used without abstraction
No
Can abstraction and virtualization be used together
Yes
Process
Program in execution
Multitasking gives the _ of _ on one cpu
Illusion of parallel processing
The OS creates and deletes
Processes and threads
The OS suspends and resumes
Processes and threads
The OS schedules
Processes and threads
The OS provides mechanisms for 3
Process Synchronization
Interprocess communication
Deadlock Handling
I/O management synchronous
Control returns to the user program only upon I/O completion
Wait loop until next interrupt
I/O management asynchronous
Control returns to user program without waiting for I/O completion
Does this through signal or callback
OS 5 design approaches
Simple, Layered, Microkernels, Modular, Hybrid
Simple Structure
No defined layers or modules, starts small and grows in complexity over time
Monolithic operating system
Design where entire operating system is implemented as a single large program running in a single address space (kernel mode)
Layered approach
The OS is divided into a series of hierarchical layers, each building on the lower layers, with each layer interacting with only the one directly beneath it
Single Layered
Enormous amount of functionality crammed into the kernel, no encapsulation
Full layered approach
The OS is divided into a number of layers, each built on top of lower layers
Layered approach advantage
Layers can be debugged and replaced independently without bothering the other layers above or below
Layered approach cons
Appropriately defining the various layers
More overhead
Microkernels
Reduces the size of the kernel to include only essential OS functions
Microkernels idea
Minimize the kernel by moving as much functionality as possible from the kernel into user space
Microkernel pros
Easier to extend, more portable, and more reliable
Microkernel cons
Performance overhead due to frequent communication between user space and kernel,
Not always realistic, some functions must remain in kernel space
Modular
A kernel design in which the OS is built from separate modules all within kernel
Kernel
The minimal set of functions necessary to manage the system resources safely and efficiently.
Privileged Instruction
Performs critical operations that access I/O devices and the CPU’s status and control registers
Who is allowed to use privileged instructions
Only OS kernel
Kernel Mode
CPU state where both privileged and nonprivileged instructions may be used
User Mode
CPU state where only nonprivileged instructions may be used
Any attempt to use privileged instruction in user mode automatically
transfers control to kernel mode
OS Shell
Command interpreter that accepts and interprets textual commands issued by the user via a keyboard
System Call
A request from an application for an OS service
Supervisor call (kernel call)
privileged instruction that automatically transfers execution control to a well defined location in the OS kernel
Interrupt
An event that diverts the current execution of a program to a predefined location in the kernel in order to respond to an event
Two popular uses of interrupt
Signal to OS completion of IO event
Implement time sharing by periodically switching the PCU among multiple concurrent computations
Trap
Interrupt triggered by currently executing instruction