Operating System Flashcards
operating system services function
provides functions that are helpful to the user
user interface
command-line, GUI, batch
what is a Operating System
A program that acts as an intermediary between the user and the computer
functions of operating system
resource allocator
control program
goals of operating system
Execute programs and solve problems more easily
Make the computer system convenient for the user
Use computer hardware efficiently
Components of computer system
- Hardware
- Operating system
- Application program
- User
Computer-System Operation
I/O devices and the CPU can execute concurrently
Each device controller is in charge of a certain device type
Each device has a local buffer
CPU moves data from/to main memory to/from local buffer
functions of interrupt
- Interrupt transfers control to the interrupt service routine through the interrupt vector
- Interrupt architecture saves the address of the interrupted instruction
Direct Memory Access Structure
Used for high-speed I/O devices able to transmit information at close to memory speeds
Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention
Only one interrupt is generated per block, rather than the one interrupt per byte
Interrupt handling
- The operating system preserves the state of the CPU by storing registers and the program counter
- Separate segments of code determine what action should be taken for each type of interrupt
why is the O/S called a resource allocator
o Manages all resources
o Decides between conflicting requests for efficient and fair resource use
why is O/S known to control programs?
o Controls execution of programs to prevent errors and improper use of the computer
o Management of the operation and control of I/O devices
Storage Structure
- Main memory (large storage media that the CPU can access directly)
- Secondary memory (acts as extension of main memory that provides large non-volatile storage capacity)
- Magnetic disk (rigid metal covered with magnetic recording material)
Storage-Device Hierarchy
register > Cache > Main memory > Electronic disk > Magnetic disk > Optical disk > Magnetic tapes
Advantages of Multiprocessor systems
Increased throughput
Economy of scale
Increase reliability
Timesharing (multitasking)
logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing
Types of Multiprocessor System
- Asymmetric multiprocessing - Each processor performs a task
- Symmetric multiprocessing - Each processor performs all task
Types of Cluster System
- Asymmetric clustering - has one machine in hot-standby mode
- Symmetric clustering - has multiple nodes running applications and monitoring each other
activities of process management
Creating and deleting user and system processes
Suspending and resuming processes
Providing mechanisms for process synchronization
Providing mechanisms for process communication
Providing mechanisms for deadlock handling
memory management activities
- Keeping track of which parts of memory are currently being used and by whom
- Deciding which part of processes and data to move into and out of memory
- Allocating and deallocating memory space as needed
Storage management activities
- Creating and deleting files and directories
- Primitives to manipulate files and dirs
- Mapping files onto secondary storage
- Backup files onto stable storage media
List the services provided by an O/S
- Program execution - The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally
- I/O operations - A running program may require I/O, which may involve a file or an I/O device
- File-system manipulation - programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.
- Communication - Processes may exchange information, on the same computer or between computers over a network
- Error detection - OS needs to be constantly aware of possible errors
- Resource allocation - When multiple users or multiple jobs running concurrently, resources must be allocated to each of them
- Accounting - To keep track of which users use how much and what kinds of computer resources, either for billing purposes or for statistical record keeping.
- Protection and security - Protection involves ensuring that all access to system resources is controlled. Security of the system from outsiders requires user authentication, and extends to defending external I/O devices from invalid access attempts
Describe The Functions of Command Line Interface
- allows direct command entry
- Primarily fetches a command from user and executes it
GUI
- Usually mouse, keyboard, and monitor
- Icons represent files, programs, actions, etc
- Various mouse buttons over objects in the interface cause various actions