COMP6015 - SecOS Flashcards
What are the 4 ‘roles’ of an Operating System?
Assistant, Broker, Supervisor, Interface.
ASBI
What does the OS do as an Assistant?
Provides common functions that can be reused across different programs.
What does the OS do as a Broker?
Shares resources (memory, disk space, network, CPU usage) between processes.
What does the OS do as a Supervisor?
Detects messages from processes such as interrupts and logging.
What are the 5 types of Computer?
Mainframe, ‘Miniframe’, Personal Computer, Mobile, Network Server.
What is the name of the system at the heart of the OS?
What does it have access to?
The Kernel.
Everything; hardware, memory, processes, etc.
What are the advantages and disadvantages of using a Microkernel?
Advantage: Kernel code is dangerous, so keeping it minimal reduces the risk of system crashes.
Disadvantages: Lots of functionality that has been moved out of the Kernel will need to be filtered through into one system, which can have a negative impact on performance.
What is a Modular Kernel?
Modular Kernel is an architecture where every component of the OS can be placed inside or outside of the Kernel.
This is done by Linux, but requires recompilation, so it’s only possible where the source code is available.
What does Intel call their privilege layers and how many are there?
4 or 7.
Standard:
- Ring 0 (Kernel),
- Ring 1 (Hardware I/O Drivers; e.g. video or audio),
- Ring 2 (System Functionality; e.g. file system access),
- Ring 3 (Application).
Detailed (conceptual; not represented by bits):
- Rings 0, 1, 2, and 3.
- Ring -1 (Hypervisor)
- Ring -2 (SMM - System Management Mode)
- Ring -3 (ME - Management Engine)
What is the difference between a Process and a Program?
The program is the instructions on disk.
The process is the instance of the program running, which also includes active memory allocation and a program counter.
What is the difference between Multiprocessing, Multiprogramming, Multithreading, and Multitasking?
Multiprocessing - Parallel execution of processes across multiple CPUs or cores.
Multiprogramming - Multiple programs loaded into memory and executed by a single CPU or core by switching between them.
Multithreading - Concurrent execution of multiple threads in the same process.
Multitasking - An umbrella term for any scenario for parallel or concurrent (time-sharing) execution of processes or tasks.
What is the difference between a Program, a Process, a Thread, and a Task?
Program - A program is a file containing a set of instructions.
Process - A process is an instance of a program with its own system resources such as allocated memory and a program counter.
Thread - A thread is a unit of execution within a process. A process can have one or more threads that run concurrently, and these threads share system resources such as memory.
Task - Umbrella term for either a process or a thread.
What are the states in a 2 state process model?
Not Running and Running.
What are the states in a 3 state process model?
Blocked, Ready, Running.
What are the states in a 5 state process model?
New, Blocked, Ready, Running, Exit.
What are the process states in Windows?
Running, Ready, Standby, Transition, Waiting, Terminated.
Standby - Marked to be scheduled.
Transition - Waiting only for memory paging and scheduling.
Waiting - Waiting for a syncronisation event.
Terminated - Done and can be cleaned up.
What are the process states in Linux?
Running, Runnable, Interruptable, Uninterruptable, Stopped, Terminated, Zombie.
Runnable - In Queue
Interruptable - Waiting for a synchronisation event.
Uninterruptable - Waiting for DMA or I/O.
Stopped - Marked to not execute, but can be revived.
Terminated - Done and can be cleaned up.
Zombie - Done but waiting for its parent process to collect its data.
What 4 things does a process consist of?
- Program.
- User Data.
- Stack.
- PCB (Process Control Block)
- Process ID and IDs of any children.
- State Information.
- Control Information
- Scheduling.
- ICP Information.
What are the two types of Interrupt handling responsible for?
First Level Interrupt Handling (FLIH)
- Save process information.
- E.g. Registers are saved to the Process Control Block (PCB).
Second Level Interrupt Handling (SLIH)
- Control is transferred
What is Thread Pooling?
Rather than having Processes create their own threads dynamically when needed, each Process is given a pool of some amount of threads that it can make free use of.
What are some examples of CPU Scheduling Algorithms
First Come First Served (FCFS)
Shortest Job First
Priority Scheduling
Round Robin
What are some of the metrics used to measure the effectiveness of Scheduling algorithms?
Average Turnaround Time - time from start to all tasks completed / number of processes
Average Waiting Time - average(time between process availability and process completed)
What Scheduling algorithm does Windows use?
Round Robin with 32 priority levels.
Levels >16 are real time.
UI windows have their quantum time tripled when in focus.
Windows 8 and higher adjust the frequency of clock interrupts based on system activity to save power.
What Scheduling algorithm does Linux use?
Completely Fair Scheduler (CFS).
Each thread chooses its own scheduling policy and priority.
Previously it used an O(1) Scheduler, and before that it used a simple Round Robin system.