SLR 4 - OPERATING SYSTEMS Flashcards

1
Q

What is a software?

A

a program that runs on a computer

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

What are the 2 main types of software?

A
  • operating systems
  • application software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an operating system?

A

a collection of programs that manages the hardware and software of a computer system including sharing the computer’s time, memory, hardware and other resources

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

What are the functions of an operating system?

A
  • file management
  • input/output management
  • resource allocation
  • process management
  • networking management
  • user management
  • user interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is paging?

A
  • partitioning memory into fixed sized physical divisions called pages
  • processes in memory will be assigned an appropriate number of pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the 3 features of pages?

A
  • fixed sizes
  • made to fit sections of memory
  • physical divisions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is segmentation?

A
  • partitioning memory into variable sized logical divisions called segments
  • a large program can be executed by consecutively running its segments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 3 features of segments?

A
  • different sizes
  • complete sections of programs
  • logical divisions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the similarities between paging and segmentation?

A
  • both allow programs to run despite insufficient memory
  • both pages and segments are stored on disk and transferred to memory when needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the differences between paging and segmentation?

A
  • pages are fixed sizes whereas segments are different sizes
  • pages are physical divisions whereas segments are logical divisions
  • pages are made to fit sections of memory whereas segments are complete sections of programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is virtual memory?

A

an allocated area of secondary storage where pages of inactive jobs are swapped into to free up enough RAM for the current job

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

What are the different types of OS?

A
  • distributed
  • multi-tasking
  • multi-user
  • embedded
  • real-time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a distributed OS?

A

a distributed OS is spread over multiple computer servers on a network, acting as a single system to parallel process a job

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

What uses a distributed OS?

A

online shopping sites

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

What is a multi-tasking OS?

A
  • an OS capable of running many tasks simultaneously
  • each active program is scheduled to receive a tiny time slice in quick rotation, giving the impression that they are operating at the same time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a multi-user OS?

A
  • OS consisting of one mainframe computer with multiple terminals that allow multiple users to access the computer’s resources
  • each user is given a time slice of the mainframe processor
  • computer will manage user’s various permissions and access rights when they log on
  • server OS software will handle the requests of multiple people using diff computers on a network at the same time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is an embedded OS?

A
  • specialised OS with limited resources and functionality, built in to control a single machine
  • tend to run on dedicated hardware so they run with max efficiency using low-powered processors and very little memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a real-time OS?

A
  • an OS that generates responses within a guaranteed time frame
  • plenty of redundancy built in so they can handle sudden increases in input
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Give 2 examples of uses of a real-time OS?

A
  • self-driving cars
  • hospital monitoring machines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a device driver?

A
  • a program supplied with a peripheral device that allows the OS to control and communicate with the device
  • translates OS instructions into a series of instructions that a specific piece of hardware can understand
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a virtual machine?

A

a program that has the same functionality as a physical computer

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

What are the uses of virtual machines?

A
  • running alternative operating systems
  • supporting incompatible software
  • creating a test system
  • running multiple servers
23
Q

What is the adv of using a virtual machine to create a development environment for programmers to test programs on different operating systems?

A

it saves both the time and money of having to purchase multiple devices solely for
testing

24
Q

What is a disadv of virtual machines?

A

running intermediate code in a virtual machine can also be considerably slower compared to running low-level code on the device it was designed for

25
Q

What is intermediate code?

A
  • Intermediate code is a low-level representation of a program that is between the high-level source code and the machine code, often used in compilers.
  • Code partly translated between high-level and machine language
    produced by a compiler
26
Q

Why is intermediate code used in compilers?

A

It allows for easier translation of code between different architectures and optimizations, providing a platform-independent representation before final machine code generation.

27
Q

What is an example of a language that uses intermediate code?

A

Java uses bytecode as intermediate code, which is then interpreted or compiled into machine code by the Java Virtual Machine (JVM).

28
Q

What is bytecode?

A

Bytecode is a form of intermediate code used by some programming languages like Java, which is executed by a virtual machine (e.g., JVM).

29
Q

What is the role of a virtual machine in executing intermediate code?

A

A virtual machine interprets or compiles the intermediate code into machine code for the host system to execute, ensuring platform independence.

30
Q

How does intermediate code improve portability?

A

Intermediate code can be executed on any platform with the appropriate virtual machine, making the program portable across different hardware systems.

31
Q

How is intermediate code different from machine code?

A

Intermediate code is not specific to any one hardware platform, while machine code is tailored to a particular architecture and is ready for execution by the hardware.

32
Q

What is the purpose of the Just-In-Time (JIT) compiler in relation to intermediate code?

A

The JIT compiler converts intermediate code (e.g., Java bytecode) into machine code at runtime, optimizing execution for the specific hardware.

33
Q

What are the advantages of using intermediate code?

A

Advantages include portability, easier debugging, and the ability to optimize the code before generating machine code.

34
Q

What is an example of an interpreter using intermediate code?

A

The Python interpreter converts Python source code into intermediate bytecode, which is then executed by the Python virtual machine.

35
Q

What is an interrupt?

A

A signal from hardware, software or the clock to alert the CPU. If the interrupt is a
higher priority than the current task, the current routine pauses and resumes after the
interrupt is executed

36
Q

What is the interrupt service routine (ISR)?

A
  • a program with a set of instructions that need to be fetched, decoded and executed to carry out the operations of the interrupt
  • if an interrupt is a higher priority than the current task, register contents are temporarily transferred onto the system stack at the end of the current FDE cycle and the interrupt is handled
37
Q

What are some types of interrupts and examples?

A
  • hardware (power supply failure, power reset button pressed, power down command)
  • user (moving the mouse, clicking an icon, keyboard presses)
  • software (illegal instruction encountered, arithmetic overflow, new log-on request)
  • input/output devices (buffer nearly empty, signal completion of data transfer to/from a device, printer ink supply notification)
38
Q

What is the Basic Input Output System (BIOS)

A
  • a program that initialises and tests whether system hardware is functional and then loads the operating system from the hard disk into RAM
    when the computer is turned on
  • responsible for loading the OS when the computer first turns on
  • 1st checks that all hardware is connected and working using power on self test (POST)
  • bootstrap used to load OS kernel into memory
  • OS can then take over and boot up the rest of the system
39
Q

Where are initial start up instructions stored?

40
Q

Where are BIOS settings stored and why?

A
  • stored on flash memory
  • so they can be changed and are also retained when power is switched off
41
Q

What is the role of the scheduler in an operating system?

A

The scheduler manages the execution of processes, deciding which process should run next, to optimize CPU utilization and ensure system performance.

42
Q

What is non-preemptive scheduling?

A

Non-preemptive scheduling does not interrupt a running process. Once a process starts executing, it runs to completion or until it voluntarily relinquishes control of the CPU.

43
Q

What is preemptive scheduling?

A

Preemptive scheduling allows the operating system to interrupt a running process and switch to another process, typically to ensure fairness or give higher-priority processes more CPU time.

44
Q

What is the First-Come, First-Served (FCFS) scheduling algorithm?

A

FCFS is a non-preemptive scheduling algorithm where processes are executed in the order they arrive in the ready queue, without preemption.

45
Q

What is a disadvantage of First-Come, First-Served (FCFS) scheduling?

A

FCFS can lead to the ‘convoy effect,’ where short processes are delayed behind longer ones, causing high average waiting times.

46
Q

What is Shortest Job First (SJF) scheduling?

A

SJF is a non-preemptive algorithm that schedules processes based on the shortest estimated burst time. The process with the shortest burst time is executed first.

47
Q

What is the disadvantage of Shortest Job First (SJF) scheduling?

A

SJF can cause starvation of longer processes, as shorter processes may continuously arrive and be executed first.

48
Q

What is Round Robin (RR) scheduling?

A

RR is a preemptive scheduling algorithm that allocates a fixed time slice (quantum) to each process. When the time slice expires, the process is moved to the back of the ready queue.

49
Q

What is the main advantage of Round Robin (RR) scheduling?

A

RR ensures fair CPU time distribution among processes, making it ideal for time-sharing systems.

50
Q

What is Priority Scheduling?

A

Priority scheduling assigns a priority to each process, with the process having the highest priority executed first. It can be preemptive or non-preemptive.

51
Q

What is Multilevel Queue Scheduling?

A

Multilevel Queue Scheduling divides processes into multiple queues based on priority or type (e.g., interactive, batch). Each queue may have its own scheduling algorithm.

52
Q

What is Multilevel Feedback Queue Scheduling?

A

Multilevel Feedback Queue Scheduling allows processes to move between different priority queues based on their behavior and execution history, offering dynamic adjustments.

53
Q

How does Multilevel Queue Scheduling differ from Multilevel Feedback Queue Scheduling?

A

In Multilevel Queue Scheduling, processes are statically assigned to queues based on their type, while Multilevel Feedback Queue Scheduling allows dynamic movement between queues depending on process behavior.

54
Q

Describe the process of process blocking?

A
  • process 1 enters the running state
  • it required data from the hard disk while running
  • hard disk is slow compared to the CPU so process 1 is blocked until input request has been serviced
  • process 2 can enter the running state
  • while process 2 is running, process 1 receives the data it needs
  • it then generates an interrupt to let the scheduler know it can rejoin the ready queue