Ch 3 Flashcards

1
Q

Process Block

A

Text section: code

Data: global variables

Heap: dynamically allocated variables

Stack: temporary data (function parameters, return addresses, local variables)

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

Process States

A

New. The process is being created.

Running. Instructions are being executed.

Waiting. The process is waiting for some event to occur (such as an I/O completion or reception of a signal).

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
3
Q

PCB

A

contains information associated with each process: process state, PC, CPU registers, scheduling information, accounting information, I/O status information

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

Thread

A

A thread allows a process to perform one task

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

job queue

A

All processes in the system

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

ready queue

A

process in main memory ready and waiting for execution

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

device queue

A

processes waiting for a particular I/O device

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

long term vs short term job scheduler

A

long term scheduler chooses jobs and allocates them into main memrory

short temr scheduler chooses processes ready to execute and allocates them to a CPU (chooses teh degree of multi programing)

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

medium term scheduling

A

swapps process form memory and stores into disk to reduce degree of multiprogramming

it saves the state int PCB

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

Context Switch

A

context represented in the PCB to restore the state of the process when loaded back into memory after swapping

has time overhead since the CPU does no useful work while switching

Time of a context switch is dependent on hardware

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

pid

A

process identifier assigned by either a parent process or the Operating System

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

cascading termination

A

A phenomenon where the children are also terminated when the parent is terminated (actually when the child is terminated before the parent)

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

zombie

A

A process that has terminated, but whose parent has not yet called wait()

Once the parent calls wait(), the process identifier of the zombie process and its entry in the process table are released.

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

orphan

A

when the process’ parent does not call wait and is instead terminated.

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

IPC

A

interprocess communication allows for a cooperative process to exchange information

Either message-passing or memory-sharing

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

shared memory (IPC)

A

In the shared-memory model, a region of memory that is shared by cooperating processes is established. Processes can then exchange information by reading and writing data to the shared region.

17
Q

message passing (IPC)

A

communication takes place by means of messages exchanged between the cooperating processes

18
Q

socket

A

an endpoint for communication

defined by an IP address along with a port number

Concatenation of IP address and port

http - port 80

ftp - 21

19
Q

shared memory systems

A

Producer

Consumer

bounded buffer

unbounded buffer

20
Q

message passing systems

A

direct communication - each process that wants to communicate must explicitly name the recipient or sender of the communication.

(symetric addressing)

send(P, message)—Send a message to process P.

receive(Q, message)—Receive a message from process Q.

(asymetric addressing)

send(P, message)—Send a message to process P.

receive(id, message)—Receive a message from any process. The variable id is set to the name of the process with which communication has taken place.

Indirect Communication - the messages are sent to and received from mailboxes, or ports.

send(A, message)—Send a message to mailbox A.

receive(A, message)—Receive a message from mailbox A.

21
Q

Message Syncronization

A

Blocking (synchronous) - The sending process is blocked until the message is received by the receiving process or by the mailbox. The receiver blocks until a message is available.

Nonblocking (asynchronous) - The sending process sends the message and resumes operation. The receiver retrieves either a valid message or a null.

FROM STUDY GUIDE

Blocking is considered synchronous

▪ Blocking send has the sender block until the message is received

▪ Blocking receive has the receiver block until a message is available ◦ Non-blocking is considered asynchronous

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

▪ Non-blocking receive has the receiver receive a valid message or null

22
Q

ordinary pipes

A

One of the first IPC mechanisms in UNIX. Acts as a conduit allowing two processes to communicate.

One write-only end and one read-only end.

Uniderectional

23
Q

named pipes

A

are bidirectional

24
Q

stub

A

provided to client by an RPC, which hides details that allows communications to take place, it locates port on the servers, marshals the parameters, and transmits/recieves messages to the server

25
Q

coopertive process

A

when processes are dependant of one another

26
Q

Types of processes

A

I/O Bound: spends more time doing I/O than computations, many short CPU bursts ◦ CPU Bound: spends more time doing computations, few very long CPU bursts

27
Q

PID FACTS

A

PID allows for process management ◦ Parents and children can share all/some/none resources ◦ Parents can execute concurrently with children or wait until children terminate

◦ fork() system call creates new process

▪ exec() system call used after a fork to replace the processes’ memory space with a new program

▪ review code examples

28
Q

RPC vs RMI

A

RPC

invokes FUNCTIONS through proxy. allows the remote procedure call among different languages.

RMI

invokes METHODS through proxy. is designed specifically for Java, thus it is easer to use.

29
Q
A
30
Q
A
31
Q
A