P2L1: Processes and Process Management Flashcards

1
Q

Describe the states in a lifetime of a process?

A
  • New.&raquo_space; ready
  • Ready. (scheduler dispatch)&raquo_space; running
  • Running.&raquo_space; ready or&raquo_space; terminated or ( I/O or event wait)&raquo_space; waiting
  • Waiting. ( I/O or event wait completion)&raquo_space; ready
  • terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe all the steps which take place for a process to transition form a waiting (blocked) state to a running (executing on the CPU) state.

A

..

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

What is a process

A
  • instance of an executing program
  • State of execution: program counter, stack
  • Part and holding area: data, register state
  • May require special hardware I/O devices

Diff
- apllication is a program on disk or flash memory (static), process is a state of a program executing when exeuting and loaded in memory (active)

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

How are processes represented by OS

A

..

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

How are multiple concurrent processes managed by OS

A

..

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

Elements to describe process state

A

Elements that are used to describe process state:

  • Program counter PC. In what instruction in the binary code (assembly code) it currently is
  • CPU register: Stores the PC, address for data or status info
  • Stack pointer: Location of top of stack
  • process control block: data structure that stores into of PC, registers, scheduling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the pros-and-cons of message-based vs. shared-memory-based IPC.

A

Message
+ OS manages the channel, send/ recv api
- overheads. Copy from address space of P1, to Channel, to P2

Shared memory
+ OS is out of the way, less overhead of OS
- Does not use the OS API, implement code to read and write from this memory

Shared performs better if cost of mapping memory address in processes can be ammotrized between multiple message

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

Role of the CPU Scheduler

A

..

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