Chapter 4 Flashcards
(40 cards)
Distinguish between hard real-time OS and soft real-time OS. Define jitter.
In hard real-time late completion of a task is inacceptable (i.e. nuclear reactor).
In soft real-time occasional late completion of a task is acceptable as long as the application generally meets the deadline. (i.e. office printer)
Variability of the time to complete an application task.
Distinguish between server, desktop and general purpose operating systems.
Maximizes throughput (efficiency) and focuses on recoverability to failures and scalability.
Rapid startup, rapid user response times and energy efficiency.
General purpose aims to combine both to adapt to different applications.
Explain round robin process scheduling algorithm.
All processes are advanced within a period of time. Each process runs for a short period (time quantum) before yielding CPU to the next process. Some time wasted by switching.
What is the period of time each process runs for called?
Time Quantum
What are the three different types of process?
Interactive: Requires quick response time.
Normal: Performs business-related computations and needs to maximize the usage of computer resources.
Housekeeping: Usually runs when there is nothing else to do.
What is the disadvantage of basic round robin scheduling?
It doesn’t take into account the different kinds of task at all.
Explain preemptive scheduling with priority queues (naive).
Priority assigned to each process. When picking next process:
1. Always pick the runnable process with the highest priority.
2. If two or more runnable processes with equal priority are available schedule them using round robin.
Processes are arranged into queues based on their priorities, with different time quantum for each as appropriate.
What is the problem with preemptive scheduling with priority queues (naive).
If some high-priority process is always runnable, lower priority processes never get a chance to run. This is called starvation.
Explain MFQS.
Multilevel Feedback Queue Scheduling.
- If P(A) > P(B). A runs.
- If P(A) = P(B), A & B run in RR using time quantum of given queue.
- When job enters system, place at highest P.
- Once a job uses up time allotment reduce its priority.
5 After some time period S, move all the jobs in the system to the topmost queue.
What is the downside of MFQS?
Has many parameters time quantum at different levels, how often to reset priorities, how to rebalance priorities. These are all set by admin called “voodoo constants” and are complex to understand or alter in an attempt to improve efficiency.
Explain Linux completely fair scheduling nice value.
nice values range from -20 to 19. The lower the nice value - the higher the priority. The higher the nice value - the lower the priority.
Explain Linux completely fair scheduling virtual runtime.
Virtual runtime of a process is the total amount of CPU time it has received so far.
Explain Linux completely fair scheduling.
When choosing the next process to run always choose the runnable process with the minimal virtual runtime. Stores virtual runtime in RB tree for efficiency (leftmost node minimum). When a new process is started, its inserted at this leftmost node to give it the highest priority. Nice value of process affects how much virtual runtime it accumulates. So a lower nice value leads to less accumulation and increases priority.
Define BIOS.
Basic Input Output System.
Initial program stored in ROM
Loads OS kernel
Provides run time services for OS.
Performs POST (Power-on self test).
Performs required hardware initialization.
What does UART stand for?
Universal Asynchronous Receiver/Transmitter
Where is OS kernel (supervisor) in QEMU system?
Executable file loaded into RAM
What is booting?
Refers to computer startup and involves:
1. Loading OS kernel into memory
2. Initializing computer hardware adapters and peripherals
3. Starting background application programs
4. Starting interactive shell
What is the typical boot loading stages in linux?
Bios Bootloader Program runs in ROM -> loads from data storage ->
Operating System Bootloader runs in RAM -> loads from data storage
-> Operating System Kernel runs in RAM -> launches from file system -> init file runs -> starts all other programs (e.g. shell and daemon processes)
What is the access control matrix?
Rows represent Users, columns objects, and data the operations the corresponding user has permission to perform on the corresponding object.
What do access control mechanisms do?
Only allow users with the appropriate permissions to perform appropriate actions.
How are user groups set? Why key information is used by access control mechanisms that is stored in User account?
On a multi-user computer system, users are split into several groups based on their job function. Data sharing between groups should be limited.
User identifier (UID)
Group identifier (GID)
What is superuser?
- Special user account called root
- Has privileges above all other accounts
- Can change ownership and permissions
- Has full access to all files
- Can kill any process
What is sudo group?
The superuser access is too dangerous for interactive login, but users part of the sudo group can access its privileges.
How are file permissions specified?
For file owner (match UID), for group of owner (match GID) and for all other users
drwxrwxrw
first letter is file type (d=directory, -=ordinary file, l=link, b=block device etc.)
r = permission to read contents
x = permission to execute/search
w = permission to modify
- = No permission