Processes Flashcards

1
Q

What does a multiprogramming system, from a high level context, do?

A

In the space of a second, the CPU is able to switch and work on multiple different things.

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

What word is used to describe the apparent appearance of parallelism? What does it describe?

A

Pseudo-parallelism.

It describes the appearance of actual parallelism whereby multiple processes are being handled by multiple CPUs

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

What is a process? What three things does it contain?

A

An executing program.

Contains registers, program counter and variables.

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

What’s the difference between a process and a program?

A

Cooking.
A recipe, a set of instructions, is a program.

The process are the activities which feed into (eyyy) the recipe.

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

Give an analogy for a process switch for baking

A
Cook's son comes into kitchen with bee sting. 
Cook bookmarks recipe page. 
Cook sorts out son. 
Cook gets back to recipe page. 
Cook continues cooking.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What four things cause a process to be created?

A

System initilsation
Execution of a process creation system call by a running process
A user request to create a new process
Initiation of a batch job

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

What are daemons?

A

Processes that ‘stay in the background’.

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

Give examples of daemon processes

A

Accepting incoming email.

Accepting incoming requests for a website.

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

What is system initilisation processes?

A

The first processes when starting a computer.

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

Give an example of when a process might be created by another process?

A

Large amount of data being collected through a network.
Setting up a process that takes the data and places it in a shared buffer.
Setting up another process and having that work upon the data.

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

How might you make a process created by another process run faster?

A

On a multiprocessor system, running a process that is independent of but related to (in a holistic sense) the first process on another CPU could make the program run faster.

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

Give an example of an interactive system process being created?

A

User typing a command or clicking an icon.

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

Give four examples of how processes terminate

A

Normal exit
Error exit
Fatal error
Killed by another process

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

Which two process termination examples are voluntary

A

Normal exit

Error exit

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

Which two process termination examples are involuntary

A

Fatal error

Killed by another process

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

In most cases, what happens when a process finishes?

A

The compiler executes a system call to the operating system to say ‘hey, I’m done’.

17
Q

Give an examle of an error exit

A

Attempting to compile a file that doesn’t exist. It’ll just erorr exit.

18
Q

Give an example of a fatal error in terms of processes

A

Dividing by zero in the code.

Attempting to access memory that either doesn’t exist or is privildged.

19
Q

UNIX can do something unique in terms of fatal errors. What?

A

Able to handle exceptions and create signals rather than fully terminate the process.

20
Q

What happens when a kill process happens?

A

A process issues a system call for another process to be killed. It would need adequate permissions to do this.

21
Q

What is the kill process called in Windows and UNIX?

A
Unix = kill
Windows = TerminateProcess
22
Q

Give two reasons why a process might block?

A

Process cannot logically continue (waiting for input).

It is conceptually ready, but CPU has decided to allocate time to another process.

23
Q

What are the three states a process can be in?

A

Running
Blocked
Ready

24
Q

Describe ‘running’ in terms of processes

A

The process is actually being seen to by the CPU

25
Q

Describe ‘blocked’ in terms of processes

A

The process is held up from getting access to the CPU It is in state where it will not be seen to. It needs to move from the blocked state before it will be handled by the CPU

26
Q

Describe ‘ready’ in terms of processes

A

The process is in a state of readiness, able to be seen by the CPU but not yet being handled by it.

27
Q

What table is used to implement processes?

A

Process table

28
Q

What information is included in a process table entry

A
Process' state
Program counter
Stack pointer
Memory allocation
its files
its scheduling informaion

essentially, everything that is needed to make the process run if the CPU moved it from blocked to ready to running, or ready to running

29
Q

What can cause process switch?

A
Clock interrupt
I/O interrupt
Memory fault
Trap
Supervisor / system call
30
Q

What happens in a process switch?

A
  1. Contents of process saved
  2. Process blocks updated
  3. Process moved into appropriate queue (blocked/ready)
  4. Run scheduler to select new process
  5. Update process block
  6. Run next process