Past Questions Flashcards

1
Q

What is an OS?

A

Program that manages different aspects of the operation of a machine (processes, data storage, I/O, networks, UI, security/ protection). It is the intermediary between the user and the hardware. Controls system resources, decides their allocation. Always running on a machine in operation.

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

What is a process?

A

A program in execution. It is an active entity. Each execution of a program is treated as a separate process.

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

What is a batch OS?

A

Execute jobs in sequence. Programs were prepared as jobs and submitted to the operator. Operators grouped jobs together and submitted batches to the machine. Very non-interactive system.

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

What is spooling?

A

Simultaneous peripheral operations on line. Pipeline of jobs for peripheral devices. Need a secondary storage medium (disk)

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

What is a multi-programmed batch system?

A

Several jobs are held in main memory. Instead of CPU being idle while a it waits (for a job that is waiting for I/O), OS switches to another job, keeping track of where it left the old job of course.

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

What is a multitasking/time sharing system?

A

Aka multitasking system. Multiple users able to use the same system at the same time. Effectively shares the CPU. When several interactive programs are multi-programmed and CPU switches fast between them, it behaves/appears as though they are running independently.

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

What is a kernel?

A

Restricted space, core of OS. The part that is always running, is in charge and is allowed to interact with hardware.

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

What is a system call?

A

Service request to OS kernel eg “open file”, “write to screen”. Also a function, hence can return values (eg child processes).

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

What is a process control block?

A

Process control block, the record in the OS of the process. Contains info on – PID – pointer – state – PC – register contents – memory management info – I/O status info – accounting info

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

What is a parent process?

A

Process that created a new process via copying itself

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

What is a child process?

A

A new process that is initially a copy of it’s parent.

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

What is a zombie process?

A

A child process that terminates when its parent process isn’t waiting for it. Nothing to receive its exit status means it stays in process table. Also caused by kill().

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

What is a thread?

A

Like a smaller part of a process. It just has PC, register set and stack space. All other PCB info is shared with other threads belonging to the same process. Allows more complex data sharing. Threads can create children/be blocked. Have state too.

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

What is a kernel-level thread?

A

Implemented via system calls. Kernel can “see” these ones. But switching between threads is a lot slower.

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

What are the data race condition?

A

Situation where several processes access/manipulate the same data concurrently, and the outcome depends on the particular order. It is a problem of unrestrictedly running on the same data. Can still occur in systems that aren’t multiprocessing.

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

What is a deadlock?

A

A set of processes is in a deadlocked state if every process is waiting for an event that can only be caused by one of the processes in that set. Every process is waiting and no progress is made. Has 4 necessary conditions.

17
Q

What is mutual exclusion?

A

At least one of the held resources is non-shareable. Can only be used by one process at a time.

18
Q

What is hold and wait?

A

There must be at least one process holding a resource and waiting for another resource.

19
Q

What is no preemption?

A

The resource cannot be freed preemptively, only by the process that’s holding it

20
Q

What is circular wait?

A

The last process in line Pn is waiting upon the first process in line P1. So that the “line” is circular..