chapter 5 interprocess Flashcards

1
Q

when correct execution depends on the timing of processes or threads running a critical section of code

A

Race condition

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

when a lower priority item is unfairly delayed by higher priority items arriving later (never have chance to get into CPU)

A

Starvation

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

a portion of a program that modifies a shared resources (where it will enter to do operation)

A

critical section

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

the conditions where two or more processes are not able to continue because they are waiting on each other to either release a resource or do something

A

Deadlock

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

Process executing concurrently in OS may be either ___________ or ____________ processes

A

independent or coorperating

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

what is independent process

A
  • If it cannot affect or be affected by the other process executing in the
    system
  • If it does not share data with any other process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is cooperating process

A

 If it can affect or be affected by the other processes executing in the
system
 If it share data with any other process

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

Several reasons for providing an environment that allows process cooperation (why process cooperation)?

A
  • information sharing
  • computation speedup
  • modularity
  • convenience
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

cooperating process require __________ that will allow them to exchange _____ and ______

A

IPC (interprocess communication),
data and
information

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

Two fundamental model of interprocess communication

A
  • shared memory: faster
  • message passing: time-consuming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Other processes that wish to communicate using this ________must attach it to their _________

A

shared-memory segment,
address space

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

The producer process produces ________ that is ________ by a consumer process

A

information
consumed

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

what is unbounded buffer and bounded buffer?

A

unbounded buffer: not practical limit size on buffer
bounded buffer: there is a fixed size of buffer

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

what is Message Passing system?

A

Mechanism for processes to communicate and to synchronize their actions

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

IPC facility provides two operations

A
  • send (message)
  • receive (message)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

If processes P and Q wish to communicate, they need to via message passing systems

A

 Establish a communication link between them
 Exchange message via send/receive

17
Q

if processes wish to communicate via shared memory

A

IPC using shared memory requires communicating the process to establish a region of shared memory

18
Q

Implementation of communication link

A

Physical:
 Shared memory
 Hardware bus
 Network
Logical
 Direct or indirect
 Synchronous or asynchronous
 Automatic or explicit buffering

19
Q

Properties of direct communication link

A

 Link are established automatically
 A link is associated with exactly one pair of communicating processes
 Between each pair there exists exactly one link
 The link may be unidirectional, but is usually bi-directional

20
Q

what is direct communication

A

Processes must name each other explicitly
 send(P, message) – send a message to process P receive(Q, message) – receive a message from process Q

21
Q

what is indirect communication?

A

Messages are directed and received from mailboxes (also referred to as ports)
 Each mailbox has a unique id
 Processes can communicate only if they share a mailbox

22
Q

properties of communication link

A

Properties of the communication link
 Link established only if processes share a common mailbox
 A link may be associated with many processes
 Each pair of processes may share several communication links
 Link may be unidirectional or bi-directional

23
Q

Message passing may be either _______or _________

A

blocking or non-blocking

24
Q

what is synchronous

A

Blocking is considered synchronous
 Blocking send – the sender is blocked until the message is received
 Blocking receive – the receiver is blocked until a message is available

25
Q

what is asynchronous

A

Non-blocking is considered asynchronous
 Non-blocking send – the sender sends the message and continue
 Non-blocking receive – the receiver receives:  A valid message, or
 Null message

26
Q

When both send() and receive() are blocking, we have a _________
between the sender and receiver

A

rendezvous

27
Q

If special care is not taken to correctly coordinate or synchronize access to shared resources, it can cause a number of problems:

A

 Starvation
 Deadlock
 Data Inconsistency
 Shred Buffer Problem

28
Q

A condition can occur when multiple processes or threads compete for access to a shred resource

A

starvation

29
Q

A condition can occur when two processes need multiple shared resources at the same time in order to continue

A

A deadlock

30
Q

When shared resources are modified at the same time by multiple resources, data errors or inconsistencies may occur

A

data inconsistency

31
Q

 Sections of a program that might cause these problems are called __________
 Failure to coordinate access to a critical section is called a _____________

A

critical sections
race condition