4. The Abstraction: The process Flashcards

1
Q

How does OS virtualize CPU? How is this technique called?

A

By running one process, then another, then another and so forth. This is called time-sharing of the CPU.

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

What makes decision on which process to run next?

A

Scheduling policy

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

What is an opposite of time-sharing?

A

Space-sharing.

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

What is a process? What are its parts?

A

An abstraction provided by an OS of a running program. Its parts are address space, registers, I/O information

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

What are the common registers used by process?

A

General purpose registers, program counter (or instruction pointer), stack pointer (used to store and remove data) and associated frame pointer (used to find where specific function starts in stack)

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

What is minimally expected from Process API?

A

Create, Destroy, Wait, Status, Miscellaneous Control functions.

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

How is process created?

A

OS loads program’s code and any static data into memory in address space of a process, memory is allocated for stack and heap; and I/O descriptors are set up. Then main() of program is started.

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

Which data structure does OS use to track state of the processes? What is a data structure with information about single process?

A

Process list. Process Control Block (sometimes called process descriptor)

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

Why it might be a good idea to run a process that issued an I/O immediately after I/O finishes?

A

Because it might issue another I/O operation and other processes will run while the first process is again blocked with I/O.

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