Chapter 3 - Processes Flashcards

1
Q

What is a process?

A

A process is program in execution, and the status of the current activity of a process is represented by the program counter, as well as other registers.

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

How is the layout of a process in memory represented?

A

The layout of a process in memory is represented by four different sections:
1. text
2. data
3. heap
4. stack

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

What are the four general states of a process?

A
  1. ready
  2. running
  3. waiting
  4. terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a process control block (PCB)?

A

A process control block (PCB) is the kernel data structure that represents a process in an operating system.

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

What is the role of the process scheduler?

A

The role of the process scheduler is to select an available process to run on a CPU.

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

When does an operating system perform a context switch?

A

An operating system performs a context switch when it switches from running one process to running another.

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

What are the fork() and CreateProcess() system calls used for?

A

The fork() and CreateProcess() system calls are used to create processes on UNIX and Windows systems, respectively.

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

What happens when shared memory is used for communication between processes?

A

When shared memory is used for communication between processes, two (or more) processes share the same region of memory. POSIX provides an API for shared memory.

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

How can two processes communicate?

A

Two processes may communicate by exchanging messages with one another using message passing. The Mach operating system uses message passing as its primary form of interprocess communication. Windows provides a form of message passing as well.

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

What does a pipe provide?

A

A pipe provides a conduit for two processes to communacte.

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

What are the forms of pipes?

A

There are two forms of pipes, ordinary and named. Ordinary pipes are designed for communication between processes that have a parent-child relationship. Named pipes are more general and allow several processes to communicate.

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

What are the two common forms of client-server communcation?

A

Two common forms of client-server communication are sockets and remote procedure calls (RPCs). Sockets allow two processes on different machines to communicate over a network. RPCs abstract the concept of function (procedure) calls in such a way that a function can be invoked on another process that may reside on a separate computer.

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

What does the Android operating system use as a form of interprocess communication?

A

The Android operating system uses RPCs as a form of interprocess communication using its binder framework.

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