Chapter 5 Flashcards

1
Q

What are the multiple parts to a process

A
  • The program code
  • Current activity including program counter and process registers
  • Stack containing temporary data
  • Data section containing global variables
  • Heap containing memory dynamically allocated during run time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When does a program become a process?

A

When the exe file is loaded into memory

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

What are the states associated with program execution?

A
  • New
  • Running
  • Waiting
  • Ready
  • Terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a process?

A

A program in execution

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

What is a Short term Scheduler?

A

It selects which process should be executed next and allocates CPU. It is invoked frequently

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

What is a Long Term Scheduler?

A

it selects which processes should be brought into the ready queue. It is invoked infrequently.
- It controls the degree of multiprogramming

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

Processes can be described as either:

A
  • I/0 bound process: Spends more time doing I/0 than computations. Many short CPU bursts
  • CPU bound process: Spends more time doing computations. Few very long CPU bursts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IOS provides:

A
  • Single foreground processes ( Controlled via user interface)
  • Multiple background processes ( in memory, running but not on display, and with limits.

Android uses both of the above

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

List the resource sharing options

A
  • Parent and children share all resources
  • Children share subset of parent’s resources
  • Share no resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List the execution options

A
  • Parent and children execute concurrently

- Parent wait until children terminate

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

list unix process examples

A
  • fork() system call creates new process

- exec() 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
12
Q

Process Termination

Process executes last statement and then asks the operating system to delete it using the exit() system call

A
  • returns status data from child to prevent (via wait())

- Process’ resources are deallocated by the os

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

Parent may terminate the execution of children processes using the abort() system call. What are the reasons for doing so?

A
  • Child has exceed the allocated resources
  • Task assigned to the child is no longer required
  • The parent is exiting and the operating system does not allow a child to continue if the parent terminates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Cascading termination?

A
  • All children, grandchildren etc. are terminated

- The termination is initiated by the OS

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

What happens if a parent is terminated without invoking wait()?

A

The process becomes an orphan

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

Chrome is multiprocess with 3 different types

A
  • Browser process manages user interface, disk and network I/O
  • Render process renders web pages
  • Plug in process for each type of plug in
17
Q

What are the reasons for cooperating process?

A
  • Info sharing
  • Computation speed up
  • Modularity
  • Convenience
18
Q

What are the two models of IPC?

A
  • Shared Memory

- Message Passing

19
Q

Describe the difference between Independent and Cooperating processes

A
  • Independent process cannot affect or be affected by the execution of another process
  • Cooperating process can affect of be affected by the execution of another process
20
Q

What is the producer consumer problem?

A

Paradigm for cooperating processes, producer produces info that is consumer by a consumer process

  • Unbounded buffer places no practical limit on the size of the buffer
  • Bounded buffer assumes there is a fixed buffer size
21
Q

what do two processes need to do in order to communicate?

A
  • Establish a communication link between them

- Exchange messages via send/receieve

22
Q

Implementation of communication link

A

Physical: Logical:

  • Shared memory - Direct or Indirect
  • Hardware bus - Synch or Asynch
  • Network - Auto or Explicit buffering
23
Q

What is indirect communication?

A
  • Messages are directed and received from mailboxes
  • Each mailbox has a unique ID
  • Processes can communicate only if they share a mailbox
24
Q

Message Passing is considered to be either blocking or nonblocking. Describe Blocking

A
  • blocking is considered synchrounous
  • Blocking Send: the sender is blocked until message recieved
  • Blocking Recieve: The reciever is blocked until message is available
25
Q

Message Passing is considered to be either blocking or nonblocking. Describe non- blocking

A
  • Non Blocking is Asynchronous
  • Non blocking send: the sender sends the message to continue
  • Non blocking recieve: the receiver receives either a valid or null message
26
Q

What happens if both send and recieved are blocking

A
  • Its called a rendezvous
27
Q

How is buffering Implemented

A
  • In one of three ways
  • Zero capacity: No messages are queued on a link. sender must wait for receiver
  • Bounded Capacity: finite length of n messages. sender must wait if link full
  • Unbounded Capacity: Infinite length sender never waits
28
Q

What is a socket?

A
  • an endpoint for communication

- special IP address 127.0.0.1 (loopback) to refer to system on which process is running

29
Q

What are the different types of sockets?

A
  • Connection oriented (TCP)
  • Connectionless (UDP)
  • Multicast Socket class - data can be sent to multiple recipients
30
Q

What’s a STUB

A

STUB: Client side proxy for the actual procedure on the server

  • Client side stub locates the server and marshals the parameters
  • The server side stub receives this message, unpacks the marshalled parametres and performs the procedure on the server
31
Q

What is a pipe?

A
  • Act as a conduit allowing two processes to communicate
  • Ordinary Pipes: Cant be accessed from outside the process that crated it. A parent process creates a pipe and uses it to communicate with a child process that created it. Unidirectional
  • Named pipes: can be accessed without a parent child relationship. Bidirectional