Chapter 3 - Processes Flashcards

1
Q

What does a process contain?

A

1) Program Counter
2) Stack
3) Data Section

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

What are the four aspects of a process?

A

1) Text Section
2) Stack
3) Data section
4) Heap

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

What is in the text section of a process?

A

Program code itself

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

What is in a process’s stack?

A

Temporary data such as function parameters, return addresses, and local variables

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

What is in a process’ data section?

A

Global variables

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

What is in a process’ heap?

A

Memory dynamically allocated during run-time

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

What is in the Process Control Block?

A

Information associated with each process

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

What information does the PCB contain on each process? (6 total)

A

process state, PC, CPU registers, scheduling information, accounting information, and I/O status information

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

What are the two types of processes and what do they mean?

A

I/O Bound: spends more time doing I/O (many short CPU bursts)
CPU Bound: spends more time doing computations (few long CPU bursts)

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

What does a context switch do?

A

When the CPU switches to another process, it saves the state of the old and loads the saved state of the new (from PCB)

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

What is the timing of a context switch depend on?

A

Hardware

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

How are child processes created?

A

When a parent process uses the fork() system call

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

What does the PID do?

A

Allow for process management

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

True or False: Parents and children can share all/some/none resources

A

True

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

True/False: Parents always wait until children terminate to execute

A

False

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

How do you create a new process?

A

With the fork() call

17
Q

What does the exec() system call do?

A

Used after a fork() to replace the processes’ memory space with a new program

18
Q

What is interprocess communication?

A

Needed by cooperating processes to share memory or pass messages

19
Q

What are the types of message passing?

A

Blocking or non-blocking, aka synchronous or asynchronous

20
Q

What does blocking message passing mean?

A

Blocking Send/Receive has the sender/receiver block until the message is sent/recieved

21
Q

What does non-blocking message send mean?

A

Non-blocking send has the sender send the message and continue

22
Q

What does non-blocking receive mean?

A

The receiver receives a valid message or null