COMP6015 - SecOS Flashcards
(86 cards)
What are the 4 ‘roles’ of an Operating System?
Assistant, Broker, Supervisor, Interface.
IABS
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.
- everything in the OS; the hypervisor or lower levels can hide more information about the Computer System.
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 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 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 layers 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 is a Race Condition?
A race condition is where two or more threads attempt to access the same memory location or resource at the same time.
How do we solve the issue of a Race Condition, and what boundaries must be defined in our code to facilitate this.
A Mutex or Semaphore is required to prevent multiple threads from accessing a resource at the same time.
The Mutex or Semaphore should be placed around a Critical Region.
The Critical Region is the area of code where the resource is needed.
The Mutex or Semaphore will cause the program to wait at the Critical Region until it is safe to proceed.
What is the difference between a Mutex and Semaphore?
Mutexes are basic locking objects with two states (locked and unlocked).
Semaphores are non-negative integer counters used when you have multiple identical copies of a resource available and any of them can be used.
What is an ACL in Operating Systems?
An Access Control List (ACL) is a technique of managing permissions in the file system.