Processes Flashcards

1
Q

Process State

A
  • new: The process is being created
  • running: Instructions are being executed
  • waiting: The process is waiting for some event to occur
    (e.g., I/O completion)
  • ready: The process is waiting to be assigned to a processor
  • terminated: The process has finished execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

PCB

A

Process Control Block. Data related to a process. Convienent way to store all relevenat data linked to a prcoess. Includes:
* process state
* Process number
* program counter
* registers
* memory limits
* list of open files

This data is used when interrupting and restarting a process.

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

Job, Ready, Device Queue

A
  • Job Queue: All of the processes in the system.
  • Ready Queue: All of the processes awaiting execution.
  • Device Queue: Processes waiting for I/O

This is basically a linked list of the PCBs

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

Long-term scheduler

A

Selects which process should be brought into the ready queue. Controls the degree of multiprogramming.

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

Short-term scheduler

A

Selects which process should be executed next

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

Context Switch

A

Stopping a running process and running another one instead. Done by saving data into the PCB and loading it to run a process.

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

PID

A

Process Identifier - a unique ID each process in the systems receives upon creation

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

fork()

A

System call to create a new process. After calling this, the new program is basically a copy of the original one in terms of memory.

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

exec()

A

System call used after fork() to replace the process’ memory space with a new program

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

wait()

A

Takes the process out of the ready queue until the child process terminates

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

CoW

A

Copy on Write: When forking a program, the memory isn’t duplicated immediately, instead the relevant pages are only duplicated when one of the processes (child/parent) try to change a certain page. This is done by triggering a page fault and creating a new one for the writing process.

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

IPC-Facility

A

System calls to Send message between processes

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

IPC send() & receive() (Direct & Indirect)

A

Direct:
Sends message directly to named process.
Indirect:
Sends message to a common mailbox.

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

int pipe(piped[2])

A

Creates a directional pipe that can be used for interprocess communication.
pipefd[0] is the read end of the pipe.
piped[1] is the write end of the pipe.
The kernel buffers data written to the read end until it is read.

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

Sockets

A

Endpoint for communication, identified by an IP address and port (TCP/ UDP).

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

RPC

A

Remote Procedure Call.
A protocol for basically making requests to other computers but abstracting everything so that it looks like making a local function call. There is a client stub (proxy) on the server and client that handles all of the packages (marshals) and finds the actual server to call for using a lookup server where servers register themselves.

17
Q

RMI

A

Remote Message Invocation. Basically like RPC, but in Java and for passing objects. This takes care of serialization and desarilization.