Week 1 Flashcards
Operating System
Software that acts as intermediary layer between a user and computer hardware
How does OS control programs
Controls execution of user programs (CPU) and I/O Operation (disk drive)
OS Kernel
Available to run at any time, stored in high memory, Used to boot program
How does OS do resource allocation
Partitions RAM and provides uniform interface for hardware
Explain early program systems
Batch mainframe system (hidden figures). Had a pool of jobs that were run sequentially. Minimal hardware and OS requirements.
Multiprogram Systems
More than one program could occupy memory at the same time. Required more security and OS intervention.
Hard-Real time
Hard limits that will make a system fail. I.e. Car engine not starting
Soft-Real time
Missed deadline will make the system utility decrease. E.g. Video lag
Interrupts
Hardware signal used to suspend execution of current running program. The program is suspended and CPU control is transferred to interrupt routine that is stored in the interrupt dispatch table.
How does CPU determine interrupt source?
Polling or vectored interrupts
Essential interrupt idea
THEY CAN OCCUR AT ANY TIME
Trap
Signal generated by software similar to an interrupt. Requests a service from OS by the program. E.g. Error from division by zero. Accessed through the trap dispatch table
How is kernel mode implemented
Bit in status register, 0 for not 1 for kernel mode
User mode
Used for executing programs
Kernel mode
Accessing hardware and CPU resources with privileged instructions. Processing traps and system requests.
Example of switching between kernel mode
- Program runs
- Interrupt signal
- Program switches to kernel mode and OS memory
- Program location is saved on the stack stored in OS memory
- Interrupt routine is found and executed
- Return statement for interrupt is called which includes code that returns the status bit back to user
Memory Base register
Points to beginning of allocated memory
Memory limit register
Points to end of allocated memory
What happens when you try to access outside of allocated program memory
Trap is thrown
Cooperative Multitasking
Program calling the yield function if it knows it’ll be occupied. E.g. numerical calculations
Program timers
Timers with allocated time that, when exceeded, throws an interrupt to yield the CPU from the current running program. Also used to update current date and time.
Main OS activities
Create and destroy processes and their resources. Suspend and resume processes. Synchronize data sharing.
I/O management
Hide devices behind drivers. Contains buffers, interfaces, and cache for devices
Types of queues
Read queues, I/O queues