Operativsystem Flashcards
What is the maximum number of processes that can be in Ready state for a computer system with n CPU:s?
The maximum number is independent of the amount of CPU:s.
What is the purpose of an Operating System?
To control execution of application programs, and to act as an interface between applications and the computer hardware.
What are the three qualities pertaining to the duties of an Operating System?
Convenience - Usability for the human
Efficiency - Optimal resource utilization
Ability to evolve - Updates, basically
What is a process?
A program in execution. Or, a unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources.
What is an interrupt?
Activity suspension. A program status (counter, registers) is saved for further use, and a separate handling routine for the interrupt is executed. Errors can occur in this process.
What are the benefits of an Operating system as opposed to writing applications directly for the underlying hardware?
- Multithreading
- User Interfaces
- Abstraction of hardware
- Future proofing, either through unobstructed updates or abstracting the underlying hardware making it more easily changed
Describe a Page, a Page Table and the process of paging.
FUCK
What is the purpose of a scheduler in the core of an OS?
The scheduler assigns processor-time between different processes and threads that are run.
What is Thrashing?
When a computers virtual memory resources are overused, a constant state of paging and page faults can occur. This inhitibs most application-level process and causes the performance of the computer to degrade, or even collapse.
Within the context of Replacement Policies for the main memory, describe the Optimal Policy.
The optimal policy selects the page for which the time to the next reference is the longest for replacement.
Within the context of Replacement Policies for the main memory, describe Least Recently Used (LRU)
We replace the page that has not been referenced for the longest time.
Within the context of Replacement Policies for the main memory, describe First In, First Out (FIFO)
The page that has been in memory the longest is replaced first.
Within the context of Replacement Policies for the main memory, describe the Clock-policy
Every page has an additional bit called a use bit. When a page is loaded into memory, the use bit is set to 1. When a page is referenced, the use bit is set to 1. However, during the search for replacement, each use bit set to 1 is changed to 0.
When it’s time to replace a page,the first page encountered with a use bit set to 0 is replaced.
Within the context of Uni-processor scheduling, what constitutes long-term scheduling?
Which programs are admitted to the system for processing. Long-term scheduling controls the degree of multiprogramming.
Within the context of Uni-processor scheduling, what constitutes medium-term scheduling?
Medium-term scheduling is part of ‘the swapping function’ and manages the degree of multiprogramming.