Chapter 3 Flashcards

1
Q

Define a process

A

a program in execution, unit of work in a modern time-sharing system, sometimes known as text section, represents current activity with program counter, contents of processor’s registers, includes process stack, a data section, may include a heap, and performs single thread of execution

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

A system consists of a collection of process and different codes are associated to different thing. what is OS and user associated with?

A

system code and user code

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

what does the batch system execute

A

jobs

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

what does a time-sharing system execute

A

user programs or tasks

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

when does a program become a process

A

when an executable file is loaded into memory

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

name a couple of states of a process

A

new, running, waiting, ready, terminated

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

what is PCB

A

process control block

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

define program counter

A

address of next instruction to be executed

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

define cpu registers

A

different type of registers, when an interrupt occurs the status info is saved

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

define cpu-scheduling information

A

process priority pointers to scheduling queues

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

define memory management information

A

value of base, limit registers, page tables, etc.

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

define accounting information

A

amount of CPU information and real-time used, time limits account numbers, etc

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

define I/O status information

A

list of I/O devices allowed to process, etc.

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

describe single thread in 5 words

A

one task at a time

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

define multiprogramming objective

A

some process running at all times, to maximize cpu utilization

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

define time-sharing objective

A

switch cpu among processes so frequently that users can interact with each program while it is running

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

define process scheduler

A

selects available process for program execution on the cpu

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

define batch system and process

A

more processes are submitted that can be executed immediately, then spooled to a mass-storage device, where they are kept for later execution. then long-term scheduler selects processes from this pool and loads into memory for execution. short-term scheduler selects from among processes that are ready to execute and allocates cpu to one of them

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

what is the difference between job and cpu scheduler

A

frequency of execution

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

define short-term scheduler

A

cpu scheduler, more frequent, fast, selects from ready state and allocated cpu to one of them

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

define long-term scheduler

A

job scheduler, less frequent, slow, controls degree of multiprogramming, makes careful selection, selects and loads to memory

22
Q

define medium-term scheduler

A

sometimes removes process from memory and reduces degree of multiprogramming

23
Q

define swapping

A

process is swapped out and later in by medium-term scheduler

24
Q

define context-switch

A

switching cpu to another process requires performing a state save of current process and a state restore of a different process, pure overhead

25
Q

steps of context switch

A
  • kernel saves context of old process in its PCB

- loads saved context of new process scheduled to run

26
Q

what is a pid

A

process identifier, integer number, unique value for each process in the system and can be used as an index to access various attributes of a process within kernel

27
Q

when a process creates a new process, what are the 2 possibilities for execution that exist

A
  1. parent continues to execute concurrently with its children
  2. parent waits until some or all of its children have terminated
28
Q

what are the 2 address-space possibilities for new processes

A
  1. child process is the duplicate of the parent process

2. children program has new program loaded into it

29
Q

what are some reasons why a parent may terminate the execution of one of its children

A
  • child has exceeded usage of allocated resources
  • task assigned to child is no longer required
  • parent is exiting and child cannot exist while parent is gone
30
Q

define zombie process

A

a process that has terminated but whose parent has not yet called wait(), this is a brief moment of time

31
Q

define orphans

A

parent did not invoke wait() and instead terminated

32
Q

define independent process

A

cannot affect or be affected by the other processes executing in the system

33
Q

define dependent process

A

CAN affect or be affected by the other processes executing in the system

34
Q

define information sharing

A

concurrent access to “shared files”

35
Q

define computation speedup

A

multiple processing core so subtasks can run in parallel

36
Q

define modularity

A

system function separately or threads

37
Q

define convenience

A

compiling in parallel

38
Q

define interprocess communication

A

IPC, required by cooperating process to exchange data and information

39
Q

what are 2 fundamental modes of interprocess communication

A
  1. message passing

2. shared memory

40
Q

define shared memory

A

shared memory regions resides in the address space of the process creating the shared-memory segment, 2+ processes agree to remove the restriction of one process not being able to access another’s info

41
Q

what are the two types of buffers

A
  1. unbounded buffer : no practical limit

2. bounded buffer : fixed buffer size

42
Q

define message-passing systems

A
  • allows processes to communicate and to synchronize their actions without sharing the same address space
  • useful where processing may reside on different computers connected by a network
43
Q

what are some communicating link methods

A
  • direct/indirect communication
  • synchronous/asynchronous communication
  • automatic/explicit buffering
44
Q

what is the naming purpose

A

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

45
Q

what are some communication link properties

A
  • link is automatic between every pair
  • link with exactly 2 processes
  • one link between each pair of processes
46
Q

what are some indirect communication properties

A
  • link between a pair of processes only if both members of the pair have a shared mailbox
  • link with 2+ processes
  • between each pair of communicating processes, a number of different links may exist, with each link corresponding to one mailbox
47
Q

define blocking send

A

sending process is blocked until message is received by the receiving process or by the mailbox

48
Q

define nonblocking send

A

sending process sends the message and resumes operation

49
Q

define blocking receive

A

receiver blocks until a message is available

50
Q

define nonblocking receive

A

receiver retrieves either a valid message or a null

51
Q

what are three way to implement buffering

A
  1. zero capacity : queue length 0
  2. bounded capacity: finite queue length
  3. unbounded capacity : “infinite” queue length