1.2.1 Operating Systems Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Purpose of operating system and features (6)

A

Allows the user to interact with hardware through applications - provides interface between user and computer hardware.
- Essential for managing hardware
- Systems Software

Provides:
- User interface (CLI and GUI)
- Peripheral management (input/output devices with drivers) (manages connected hardware)
- Provides utility software (backup, encryption etc)
- Provides security (firewall and managing usernames and passwords)
- Memory management (paging, segmentation and virtual memory)
- File Management (moving, editing, deleting and folders)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Kernel

A

Heart of the Operating system - looks after most low level hardware operations - Applications use kernel to operate computer hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Types of operating systems (5)

A

Multi-tasking
● Runs multiple programs at the same time
- By co-coordinating and allocating time slices to each program then switching quickly between programs.

Multi-user - used in schools
● Allows multiple users to access operating system at the same time.
- Manages passwords and access levels
- Risk of starvation if scheduling algorithm not used

Real Time - used in safety critical systems to respond instantly to changes.
● Gives response in a guaranteed very fast time frame
- Uninterrupted

Distributed
● Allows multiple computers to work together on a single task.
- Combines processing power - work on diff parts simultaneously (Parallel processing)

Embedded
● Has a dedicated/limited function and efficiently carries out dedicated function
- Specific to the hardware and built into another device
● Is read-only / cannot be changed as stored in ROM as fixed instructions that don’t need to be changed.
- Instructions often coded in low level languages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Memory Management

A

Memory Management :
- Allocation and deallocation of memory to programs.
- Protects data from each other for security - doesn’t let programs access memory reserved for other programs.
- Ensures RAM is used efficiently and not wasted.
- Multi - tasking - Efficient Memory Management allows multiple programs to be run at once and more smoothly.

Involves :
- Paging
- Segmentation
- Use of virtual memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Paging

A

Splitting up memory is needed to store data in memory when there is not enough continuous main memory space available - can fit around programs without moving them around.

Paging : Physical divisions of memory into Fixed sizes.
- Allows for the use of virtual memory - transferred as pages
- Paging more effective because any free memory space can be used to swap data in and out
- Doesn’t take into account how programs are split - may separate in looping condition - inefficient as better to keep that data together in memory
- Paging causes internal fragmentation whereas (not all fixed size block allocated is used up so some memory is wasted)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Virtual memory

A

Virtual memory : designated part of secondary storage

  • Virtual memory used when RAM is almost full to enable applications to continue to run - more programs can run than RAM available allows.
  • Programs not currently in use transferred as pages to virtual memory to free up space for other programs
  • Must be transferred back to RAM to be run - slower - excess results in disc thrashing (pages swapped too frequently between RAM and virtual memory)
  • Secondary storage cheaper than RAM - useful
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Interrupt process

A

Complete current FDE cycle

Check priority of incoming interrupt

If not higher then continue current program instructions

Else if its higher priority than current task

As ISR Halts / Suspends current process the contents of registers are pushed onto a stack in memory.

Relevant ISR loaded, by loading relevant value into PC that points to ISR

Interrupts can be interrupted / Suspended by higher priority interrupts

When ISR is complete, the previous state is returned through popping from the stack and loading values back into the registers to resume previous process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Interrupts / ISR

A

Interrupts are the signals that devices and applications use to indicate to the processor that they need attention - have a higher priority so stops current task.
E.g. turning computer off or inputs (can be software or hardware)

Interrupt service routine is a special function that handles a particular interrupt type
- Each interrupt has a corresponding routine that should be concise and efficient.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Scheduling

A

Scheduling : controls how processors time is allocated (allocates time slices to programs)
- Ensures all programs receive fair amount of processing time
- Ensures CPU time is managed effectively and reduce wait times
- Prevents processes from failing to run
- Processes as many jobs as possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Scheduling algorithms (RR, FCFS, MLFQ)

A

Round Robin : Processor time divided equally between all tasks
- Processes get time slice - once time up process suspends until next allocation of processor time,
- uses queue - new processes added to back of queue and once time slice runs out processes are moved to back of queue.
- allows for multitasking where switch between active and background processes.
Advantages: Tasks receive processor time without long wait
Disadvantages: Doesn’t work well with programs that require long amounts of time - inefficiently split up.

First come, First served : Processes run to completion in order processor receives requests to run - uses queue
Advantages: Simplest to implement
Disadvantages: Can be long wait time for short processes delayed by long ones

Multi-level Feedback Queue: Uses multiple queues that are ordered based on priority
- Tasks are moved between queues
- Processor processes from highest priority queue first.
Advantages: Higher priority processes processed first
Disadvantages: Harder to implement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Scheduling algorithms (SJF, SRTF)

A

Shortest Job First : Uses queue that orders tasks from shortest time to complete to longest time (non-preemptive)
Advantages: Minimizes wait time and many processes executed quickly.
Disadvantages: Risk of starvation (when a process does not receive enough processor time to execute to completion) of longer programs if short jobs keep getting added

Shortest Remaining Time First : Uses queue that orders tasks from shortest time left to complete to longest - if task with less time left comes in it will take priority over current task. (preemptive version of SJF)
Advantages: Minimizes wait time
Disadvantages: Risk of starvation of longer programs if short jobs keep getting added

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Drivers

A

Driver : Program that allows the operating system to communicate with hardware providing an interface between device and operating system.
- Allows OS to Control and interact with devices
- Uses low level language.
e.g. Printer Drivers

All peripherals use drivers that’re specific to computer’s architecture and are updated regularly for fast communication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

BIOS

A

Basic input output system : First program run when computer switched on stored in ROM
- Runs POST which checks all hardware is connected and working properly
- Runs Bootstrap that loads OS from hard disc to main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Virtual Machine - Emulating OS

A

Virtual Machine : Software implementation of a computer - can imitate other computer systems to test programs on different OS from one machine.

  • More processing power required - have to run own OS and VM

+ saves time and money to purchase other hardware to test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Virtual Machines - Translate Intermediate code

A

Virtual machines can be used to translate intermediate code on device

Intermediate code : code that is independent of the processor architecture and halfway between object and source code

+ saves time to code and makes code more portable
- need VM on device to translate (Java virtual machine) and code takes longer to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Segmentation

A

Splitting up memory is needed to store data in memory when there is not enough continuous main memory space available - can fit around programs without moving them around.

Segmentation : Logical divisions of memory into variable sized segments based on contents.
- Keeps programs together as complete sections so more efficient memory access.
- With segments, lots of space will sit unused until a segment the right size is available so ineffective when swapping memory in and out.
- Segmentation causes external fragmentation (small gaps or fragments of unused memory scattered throughout memory - total available free memory is enough but not contiguous so cannot be used).

17
Q

Preemptive and non-preemptive

A

Pre-emptive- where programs can be interrupted once started (time limited slots)

Non pre-emptive - where program cannot be interrupted once started (unlimited time slots)