Lecture 1 - OS Introduction Flashcards
Is there an agreed upon definition of OS?
No.
Everything a vendor ships when you order an operating system”
How would you define kernel in layman terms?
“The one program running at all times on the computer”
System program
A program that ships with the operating system, but isn’t part of the kernel
Application program
All programs not associated with operating system
Two drivers of OS evolution
Cost of Computers
Cost of People
3 Major OS functions
- Control access and provide interfaces
* To the OS and devices attached to the system
* Provide interfaces for human-machine and machine-machine transactions - Manage resources
* Mediate resource usage among different tasks
* Implement policies - Provide abstractions
* Hide the peculiarities of the hardware.
* Example: device independent I/O
Bus
Common memory access pathway for all device controllers and CPUs.
Can I/O devices and CPU execute concurrently?
Yes
3 characteristics of device controllers
- In charge of a particular device type
- Has local buffer
- each type has a operating system device driver to manage it
Relationship between CPU and device controller local buffer
CPU moves data from/to main memory to/from local buffers
Who causes an interrupt? Who does it inform?
Device controller
CPU
Interrupt vector
Contains the addresses of all service routines
Who does the interrupt transfer control to?
Interrupt service routine
Who saves the address of interrupt instruction?
The interrupt architecture implementation
Trap or Exception
Software-generated interrupt caused either by an error or a user request
Who’s interrupt driven?
the OS kernel
How does the OS preserve the state of CPU?
by storing registers and the program counter
Who does the CPU transfer control to after receiving interrupt?
Interrupt handler
How does Synchronous I/O work?
After I/O starts, control returns to user program only upon I/O completion (Synchronous)
- > Wait instruction idles the CPU until the next interrupt
- > Wait loop (contention for memory access)
- > At most one I/O request is outstanding at a time, no simultaneous I/O processing
How does Asynchronous I/O work?
After I/O starts, control returns to user program without waiting for I/O completion (Asynchronous)
- > System call –request to the OS to allow user to wait for I/O completion
- > Device-status table contains entry for each I/O device indicating its type, address, and state
- > OS indexes into I/O device table to determine device status and to modify table entry to include interrupt
System call
Request for operating system service
Device-status table
Contains entry for each I/O device indicating its type, address, and state
Main Memory definition.
And 3 properties
Only large storage media that the CPU can access directly
- Random access
- Typically volatile
- Typically random-access memory in the form of Dynamic Random-access Memory (DRAM)
Secondary Storage
2 types
Eextension of main memory that provides large nonvolatile storage capacity
- Hard Disk Drives (HDD) –rigid metal or glass platters covered with magnetic recording material
- Non-volatile memory (NVM) devices–faster than hard disks, nonvolatile
3 Storage system hierarchy heuristics
Speed
Cost
Volatility
Caching
Copying information into faster storage system; main memory can be viewed as a cache for secondary storage
Device Driver
Provides uniform interface between controller and kernel.
One for each device controller to manage I/O