Chapter 3 Flashcards

1
Q

what are the memory sections of a process?

A

text (the executable), data (variables), heap, stack

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

what distinguishes a process from a program?

A

a process is an active entity with a program counter

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

what is a process control block?

A

contains pieces of information associated with a process, like process state, program counter, process number, registers, memory limits, and list of open files

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

what does the process scheduler do?

A

selects a process that is in the ready queue and executes whatever it has to do on a cpu core

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

what challenge does context switching create?

A

the need to save the current context of a running process so that it can be restore that context once it’s done

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

what is the difference between a process id and a program counter?

A

the process id is an id given to the process, the program counter is a register that contains the next instruction address

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

what is the most common way that memory is shared in IPC shared memory models

A

unbounded and bounded buffers, for bounded buffers circular buffers are often used

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

why are circular buffers useful?

A

because it’s very to determine if the buffer is full/empty or how full it is

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

describe the two types of process communications (regarding naming)

A

direct and indirect communication

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

what advantage does indirect communication have and how does it work?

A

indirect communication uses mailboxes or channels to receive messages so that the calling process does not need to know the process id

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

how do mailboxes solve direct naming problems?

A

provides a layer of abstraction where multiple receivers can listen on the same mailbox. also mailboxes are less likely to change their address as compared to processes

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

what are the two communication models in client-server systems?

A

sockets and RPCs (remote procedure calls)

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

how is a socket designated?

A

as an ip address with the port number

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

can clients share sockets on the server?

A

no, each client receives a unique socket

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

what are RPCs?

A

they allow systems to execute remote processes as if they are local

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

what are the four states of a process?

A

ready, running, waiting and terminated

17
Q

what is the process control block (PCB)?

A

is the kernel data structure that represents a process in an operating system

18
Q

what do fork() and CreateProcess() do?

A

on linux and windows respectively these are used to create processes

19
Q

what do Pipes do?

A

provide a conduit for IPC

20
Q

what are the two types of pipes? and what do they do

A

ordinary and named. Ordinary is for parent child and named are more general