Unit 2 Processes Flashcards

1
Q

What is a process?

A

A process is a program under execution.

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

What is meant by platform?

A

A particular combination of hardware and operating system.

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

What is the difference between source code and a process?

A

Source code is the static code, an abstraction of the task that needs to be carried out. A process is the dynamic execution of that code, interacting with the underlying platform.

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

What are the key requirements of an operating system?

A

To maximise the use of resources.
To mediate the sharing of resources.
To keep the system responsive to all users.

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

What is the difference between cooperative and preemptive multitasking?

A

Cooperative - writing a programme in such a way that it allows other programs to run. Not so common.
Preemptive - when the operating system requires one process to give up access to resources to allow another process to run ( as long as it is safe to do so.

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

What is the role of the Runtime Environment

A

Load and execute the program, organise its storage and how it interacts with software libraries and hardware, as well as removal from memory when it has done

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

What are registers

A

Fastest parts of memory. Have a data width of 32 or 64 bit. Used by the CPU to hold an instruction plus the data it works on during a fetch-execute cycle.

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

What is held in the RAM?

A

This is the main storage for processes and their data.

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

What is Disk Storage?

A

This is the virtual memory . It is persistent.

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

What are the functions of the CPU?

A
  1. Read and write binary from and to memory.
  2. Perform arithmetical calculations on those numbers.
  3. To determine what instructions come next, this may be based on a condition.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the Fetch-Excecute Cycle.

A

The program counter tracks which instruction is needed next from a list of instructions held in memory.
Fetch - get the next instruction and place it in an ‘instruction register’.
Execute - the instruction to completin without interruption using register for storage. The program counter is then updated.

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

What factors influence the speed of the CPU?

A
  1. The data width of the bus.
  2. The size of the data the CPU can operate on.
  3. CPU clock speed.
  4. Speed and size of various parts of memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the system bus do ?

A

It allows the CPU to communicate with memory and with devices through their respective device controllers.

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

Name the three software interfaces that link a user program to a device controller.

A
  1. The interface between code and runtime environment (library calls).
  2. Between runtime environment and OS (system calls)
  3. Between OS and device controllers (device calls)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the point of a device driver?

A

The device driver resides in the OS, it translates high level requests from the OS into lower level requests to the device controller.

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

What is the purpose of a device controller?

A

The device controller is independent from the CPU , it has its own registers, memory and simple processes to enable it to ‘speak’ to the device it controls.

17
Q

What is an interrupt?

A

An interrupt is a means for a device or software to signal to the processor that something of interest (an event) has happened.

18
Q

What happens in the CPU when an interrupt is received?

A

On receipt of an interrupt the CPU can halt the code being processed. If the interrupt is of high enough priority the CPU performs a context switch. It executes the next necessary routine then performs another context switch and returns to the original process.

19
Q

What is polling?

A

Polling is the act of checking to see if an event has occurred or a device or process is ready. Also known as busy-waiting.

20
Q

What happens in the CPU if a user program attempts to execute a privileged instruction via a system call?

A

A supervisor call interrupt is generated. A context switch takes place to put the CPU into supervisor mode and execute the interrupt handler. At this point the interrupt handler may decide to execute the code or not. Subsequently the processor returns to user mode via another context switch.