1.2.1 Flashcards

The need for, function and purpose of operating systems including (27 cards)

1
Q

Memory Management

A

Computers often need more memory than is available and so must efficiently manage the available memory and share it between programs.

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

Paging

A
  • Memory is broken down into equal sized parts called pages.
  • Pages are swapped between main and virtual memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Segmentation

A
  • Memory is split up into segments.
  • Segments can vary in size.
  • These segments represent the logical flow and structure of a program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Virtual Memory

A
  • Part of the hard drive can be used as RAM.
  • Access is slower than RAM.
  • Paging is used to move sections which are not in active use into virtual memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Interrupts

A
  • A signal generated by hardware or software to tell the processor it needs attention.
  • Have different priorities.
  • Stored with a priority queue in an interrupt register.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Interrupt Service Routine (ISR)

A
  • At the end of the fetch, decode, execute cycle the interrupt register is checked.
  • If there is an interrupt with a higher priority than the current task:
    - The contents of the registers are transferred into a stack .
    - The appropriate (ISR) is loaded into RAM.
    - A flag is set, noting that the ISR has begun.
    - The flag is reset when the ISR has finished.
    - This process repeats until no more interrupts exist.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Round robin

A

Each process is allocated a certain time-slice of CPU time (5ms in the example right) .

If the process is still running when the time slice expires it is swapped out and added to the back of the queue.

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

Round robin pros and cons

A

Pros
- Avoids process starvation.

Cons
- Can be inefficient if the processor is allocated to a process that
is waiting for input or output eg printer to print.
- Overhead in swapping
- Performance depends heavily on the size of the time quantum
selected. If the quantum is very large (infinite), RR is the same
as FCFS.

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

First come first served (FIFO)

A

Processes are allocated processor resources in the order in which they are requested.

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

First come first served (FIFO) pros and cons

A

Pros
- Easy to implement with a FIFO queue
- No swapping in and out so no overhead

Cons
- A more important process might have to wait for a less
important one to finish which could crash the system.
- Quick jobs may have to wait for a long job to complete.
- A long process could monopolise the CPU.
- Average waiting time may be long. The average waiting time
under a FCFS policy is generally not minimal, and may vary
substantially if the process burst times vary greatly.

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

Multi-level feedback queues

A
  • Has a number of queues each assigned a different priority level.
  • All processes start in top priority queue (FIFO). Processes on a higher priority queue run first.
  • If a process uses up its time allotment, its priority is reduced and it will be moved to a lower-priority queue.
  • Using this feedback, processes move between queues.

-To prevent processor starvation, after a set interval, all processes are promoted.

  • A MLFQ is the most common general CPU-scheduling algorithm as well as being the most complex.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Multi-level feedback queues advantages and disadvantages

A

Advantages
- A process that waits too long in a lower priority queue may be moved to a higher priority queue.
- No prior knowledge of the job is needed
- Fair and makes progress for long-running CPU-intensive workloads. - For this reason, many systems including Windows operating systems use a form of MLFQ as their base scheduler.

Disadvantages
- Moving the process around queue produces more CPU overhead.
- How many queues should there be? How big should the time slice be per queue?
-How often should priority be boosted in order to avoid starvation?

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

Shortest job first

A

-Process with the estimated shortest execution time takes priority over all others in the system.

-Execution time is evaluated when previous process completes (no pauses)

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

Shortest job first pros and cons

A

Pros
-SJF is optimal in that it gives the minimum average waiting time for a given set of processes

Cons
-Problem is there is no way of knowing in advance exactly how long a job will take (guestimates are used).

-Possible that longer jobs never get executed if shorter jobs keep coming in.

-If two jobs take the same time, FCFS is used to determine what goes next.

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

Shortest remaining time

A

Process with the shortest remaining time takes priority.
This needs to be evaluated constantly at the end of each time slice often causing pauses as new processes are added.
It can also mean that longer jobs are never executed.

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

Distributed operating system

A
  • Runs across several devices
  • Spreads task load across multiple computers
17
Q

Embedded system

A

-Built to perform a specific small task
- Built for a specific device and hardware
- Limited functionality
- Less resource intensive

18
Q

Multi tasking

A

-Allows multiple tasks to be completed simultaneously

  • Uses time slicing to switch between applications
19
Q

Multi user

A
  • Several users can use a single computer
  • A scheduling algorithm allocates processor time between jobs
20
Q

Real time

A
  • Performs tasks within a guaranteed time frame
  • Used in time critical systems.
21
Q

BIOS

A
  • Basic Input Output System.
  • Runs when a computer first turns on.

-Runs tests then loads the main OS into memory.

  • Power On Self Test (POST) makes sure all hardware is connected and functional
  • Tests the CPU, Memory and external devices.
22
Q

Device drivers

A
  • Code which allows the OS to interact with hardware
  • Specific to the OS and architecture type
23
Q

Operating systems

A

User Interface - to provide an interface between the user and computer (ie, CLI, GUI)

File Management - enables files and directories to be moved, copied, deleted and renamed.

Device Management - manages the system hardware using device drivers

Network management - sharing resources of a remote computer such as files or printers.

Utilities eg Disk defraggers, anti-virus, disk cleaner, system monitor, backups, compression

CPU) Scheduling (process management) allows multiple processes to run in turn using a scheduling algorithm.

Interrupts - runs the relevant Interrupt Service Routine

Memory Management - store the programs and data in use by the system, safely and efficiently

Security eg user access rights, user authentication, file permissions.

24
Q

What is virtualisation?

A

Virtualisation refers to the act of creating a virtual (not physically existing as such but appearing so through the software) version of something, including virtual machines for running other operating systems, virtual machines to execute intermediate code and virtual storage.

25
What is a virtual machine?
Virtualisation refers to the act of creating a virtual (not physically existing as such but appearing so through the software) version of something, including virtual machines for running other operating systems, virtual machines to execute intermediate code and virtual storage.
26
Virtualisation pros
-Provides access to programs no longer supported in newer operating systems. -Allows the host computer to run an OS without having to buy another computer. -Can be installed and up and running very quickly. -Can test apps built for different platforms. -Can use one OS like Linux for web surfing as less viruses and Windows, which is better, for everything else. -Can use one large server for many different separate businesses eg web hosting, each choosing what resources they need.
27
Virtualisation cons
-May require substantial processing power and memory. -Sharing resources so can degrade the performance of the virtual and real machine. -May not provide the full functionality of using on its own hardware. -Need antivirus for VM.