Chapter 1 Flashcards
What is an Operating System?
A program that acts as an intermediary between a user of a computer and the computer hardware.
Goals of Operating System?
- Execute user programs and make solving user problems easier
- Make the computer system convenient to use
- Use the computer hardware in an efficient manner
4 Components of Computer System
Hardware
Operating System
Application Programs
Users
Operating System Definition
OS is a resource allocator
OS is a control program
What is Resource Allocator?
Manages all resources
Decides between conflicting requests for efficient and fair resource use
What is a control program?
Controls execution of programs to prevent errors and improper use of the computer
What is Bootstrap Program?
Bootstrap program is loaded at power-up or reboot
- Typically stored in ROM or EPROM, generally known as firmware
- Initializes all aspects of system
- Loads operating system kernel and start execution
Computer System Organization
Computer-System operation
- One r more CPUs, device controllers connect through common bus providing access to shared memory
- Concurrent execution of CPUs and devices competing for memory cycles
Operating System Structure
- Multiprogramming
- Timesharing
What is Multiprogramming?
Also known as Batch System needed for effiency
- Single user cannot keep CPU and I/O devices busy at all times
- A subset of total jobs in system is kept in memory
- One job selected and run via job scheduling
- When it has to wait, OS switches to another job
What is Timesharing?
Known as Multitasking is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating, interactive computing
Timesharing attributes?
- Response time should be less than 1 second
- Each user has at least one program executing in memory (process)
- If several jobs ready to run at the same time (CPU scheduling)
- If processes don’t fit in memory, swapping moves them in and out to run.
- Virtual memory allows execution of processes not completely in memory.
Operating-System Operations
Interrupt Driven (hardware and software)
Software Interrupt (exception or trap)
Dual-mode
Increasingly CPUs support multi-mode operations
What is Dual-mode?
Dual-mode operation allows OS to protect itself and other system components
- User mode and Kernel Mode
- Mode bit provided by hardware
Transition from User to Kernel Mode
Timer to prevent infinite loop / process hogging resources
- Timer is set to interrupt the computer after some time period
- Keep a counter that is decremented by the physical clock.
- Operating system set the counter
- When the counter zero generate an interrupt
- Set up before scheduling process to regain control or terminate program that exceeds allotted time.