Operating Systems Flashcards

0
Q

What is a process tree?

A

Processors can create other processes.

  • The creator is the parent process
  • The created is the child process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What is a process?

A

A process is an instance of a program that is being executed (loaded into memory and is running)

Includes:

  • The current values of the program counter, registers and variable.
  • Its instruction code and current data inputs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a thread? and what does it do?

A

A thread is a mini-process; it is a process within a process
It can be created an destroyed easily

Example: Word processor

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

What are sync problems?

When we allow multiple processes to share resources and communicate, problems arise

A

Deadlocks - a situation where two or more processors are each waiting for resources held by others

Starvation - a process never gets access to a required resource

Race Conditions - two or more processors competing for a share resource
- the result varies according to the order of process execution

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

What is the scheduling concept?

A

The O.S needs to make a choice

  • There are different factors that affect the choice
  • There are different algorithms to make the selection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is context switch?

A

When the processor switches to another process, the system must save the state of the old process and load the saved state for the new process.

  • The time spent doing this is overhead
  • The system does no useful work while switching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a scheduling class?

A

Non preemptive: a running process may only move to the blocked state by choosing to do so itself

Preemptive: a running process may move itself to the blocked state or may be moved there automatically by the operating system as a result of a clock interrupt

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

Performance Measures:

A

Average response time: an average of the time taken for all the processes in an example process queue to start

Average turnaround time: an average of the time taken for all the processes in an example process queue to finish

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

First come first served

A

The process scheduler starts the processes in the order that they entered the queue - the first process to enter the queue is run first: it continues to run until it has finished
- the next process is run until it finishes

Once a process starts it does not get interrupted by the operating systems and continues until it finishes

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

What is ‘Shortest Job First’?

A

The processes are started in order of length, starting with the shortest

It’s nonpreemptive

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

What is ‘Round Robin’?

A

Go in order - abcabcabcabababaaaaa

Until run out of quanta

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

What is a ‘Modified Round Robin’?

A

Same as round robin except if its has a number you do the number of each process.

A+2

E.g usually abcabcabc
MRR: aabcaabc

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

Priority Queues

A

Ran in priority order e.g. A = 1 B = 2 C= 3

Abc

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