Operating Systems Flashcards
What is a program?
Compiled code that can run on the OS
What is a task in OS and microcontrollers?
Basic unit of programming which an OS controls. Depending on the OS, a task may be each program or each process within a program
What is a thread?
Basic unit of CPU utilization. At most basic consists of a program counter, stack, set of registers and a thread id.
What is a context switch in OS?
Act of storing the state of a thread or process, so said thread or process can be resumed at a later date.
What is pre-emptive multitasking?
The use of interrupts and a scheduler to determine which process should execute next. It is a common multitasking technique, where the OS allocates different amounts of time for a process based on its priority.
What is cooperative multitasking?
Also non as non-preemptive multitasking at times.the OS provides the appearance of simultaneous execution by rapidly switching between tasks
What is blocking in operating systems?
Blocking refers to processes that are waiting for a specific event or resources to become available. These processes are timeout protected.
Define priority in Operating systems
The level of importance of a task. Multiple tasks can have the same priority.
What is a scheduler in operating systems?
A scheduler is a software that handles task scheduling. i.e. the order in which tasks are exectuted.
Define Timers in Operating Systems
The main task of a timer is to interrupt the CPU after a specific period of time. Used to generate ticks at precise intervals. Must count continuously.
Define Interrupts in Operating Systems
Signals sent to the CPU to stop the current task and to accordingly create an alternate portion of the OS to deal with the signal.
What is an operating system?
Software that manages computer hardware resources
It is used to provide common services for programs,
Many applications cannot run without it.
Describe the system hierarchy
At the top of the hierarchy is the user who only interacts with the application. The application interacts with the OS and user but does not interact with the hardware. The OS interacts with the application and the Hardware. The Hardware only interacts with the OS.
What are the common types of Operating System?
Multi-user
Multi-tasking
Distributed
Embedded
Templated
Real Time
Features of a multi-user operating system
Multiple Users can share the same system, used by time-sharing systems/servers. For each user appears as if they have sole control over the system.
Features of a Multi-tasking Operating System
Allows multiple programs to execute simultaneously
Uses pre-emptive or cooperative multitasking
Has Slotted behaviour
Features of a Distributed Operating System
Allows for management of a group of computers as one
Can spread distributed computations across multiple machines
Features of a Templated Operating System
Single ‘virtual machine’ acts as a guest of the operating system
Used in virtualisation and cloud computing
Features of an Embedded Operating System
Used on embedded computer systems
Can operate with limited resources
Compact and efficiency
Features of a Real-Time Operating System
Specialised scheduling algorithms
Deterministic behaviour
Quick, predictable response to events
What is the kernel?
The lowest level of the operating system
Manages I/O requests from software
Translates them into data processing instructions for the CPU/other components
What is the difference between kernel mode and user mode programs?
Kernel Mode has access to each resource in the operating system
User-mode programs are in turn restricted in their access
Differences betwen Kernel Mode and User Mode drivers
In kernel mode, the lack of restrictions means the driver may overwrite resources used by other programs.
However, with user-mode programs, this cannot happen.
User-mode drivers allow for immediate restarts of the driver when required, not possible with kernel mode drivers
Define the Operating System Shell
This is the user interface for an operating system, it is often graphical and is a task in itself.It interfaces with the kernel.
What are some of the common features of Modern Desktop Operating Systems
Modern Operating Systems are more reliable, this is because ‘unreliable’ interfaces can run in user mode and normally implement preemptive multitasking.
Rare Failures for modern systems are:
Hardware Failure
CPU stuck in device driver
Fatal exception in device driver/kernel
What is virtual memory?
Virtual memory can be defined as a technique that uses main memory as a ‘cache’ for secondary storage.
Or a feature of an OS, which allows the system to compensate for shortages in physical memory by temporarily transferring pages of data from RAM to disk storage.
It allows a program to access memory via a virtual address
What are the benefits of a ‘virtual’ address?
A virtual address can be translated into a physical address and is used to access main memory.
It allows for efficient sharing of memory between programs, although one must keep in mind how this is structured.
It removes the programming burdens of limited memory
What is a page
A page is a contiguous block of virtual memory,
contiguous meaning solid block of data.