Operating System Flashcards
What is an operating system?
• a program or set of programs that manages the operations of the computer for the user.
What functions does the operating system provide?
- Memory management
- Interrupt service routines
- Processor scheduling
- Backing store management
- management of all input and output
How does the operating system handle memory management?
- Programs and their data need to be loaded into RAM
- Operating system must manage the allocation of RAM to the different programs
- There may not be sufficient RAM for all desired processes to be completely loaded into RAM at once, so the allocation and management of space is controlled by the operating operating system.
What are pages?
- Memory is divided into fixed size chunks called pages.
* Each page has an address.
What happens to a process loaded into RAM?
It is allocated sufficient pages.
What does a page table do?
Maps between the logical memory locations and the physical memory locations.
What is segmentation?
- Logical division of address space into varying length segments which depend on the program structure.
- It is possible to load only part of a program into memory initially.
What happens to the hard disk for virtual memory to become available?
An area of the hard disk that is designated as virtual memory.
What is disk thrashing?
- if many processes are running and the computer has insufficient RAM, lots of time is spent swapping pages in and out of virtual memory.
- Repeatedly swapping pages can noticeably slow down the computer, this is disk thrashing.
What is an interrupt?
A signal from a software program, hardware device or internal clock to the CPU.
What happens when an interrupt is detected?
- The processor stops fetching instructions and instead pushes the current contents of its registers onto a stack.
- Suspends execution of the running programs, or process and disables all interrupts of a lower priority.
- Then it puts the values of the program counter and of each register onto the system stack.
What is the purpose of an interrupt?
- Interrupts are triggered regularly by a timer.
- This is to indicate that it is the turn of the next process to have processor time.
- It is because the processor is able to be interrupted, that multi tasking can take place.
what processes the interrupt?
Interrupt service routine.
What is interrupt priority?
- Interrupts have different priorities, and can be processed in order of priority.
- Interrupts can be interrupted if the new interrupt is of a higher priority.
What happens if a higher priority interrupt occurs while an interrupt is being processed?
The original interrupt’s registers will also be pushed into the stack