Chapter 3 Flashcards

(51 cards)

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
steps of context switch
- kernel saves context of old process in its PCB | - loads saved context of new process scheduled to run
26
what is a pid
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
when a process creates a new process, what are the 2 possibilities for execution that exist
1. parent continues to execute concurrently with its children 2. parent waits until some or all of its children have terminated
28
what are the 2 address-space possibilities for new processes
1. child process is the duplicate of the parent process | 2. children program has new program loaded into it
29
what are some reasons why a parent may terminate the execution of one of its children
- 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
define zombie process
a process that has terminated but whose parent has not yet called wait(), this is a brief moment of time
31
define orphans
parent did not invoke wait() and instead terminated
32
define independent process
cannot affect or be affected by the other processes executing in the system
33
define dependent process
CAN affect or be affected by the other processes executing in the system
34
define information sharing
concurrent access to "shared files"
35
define computation speedup
multiple processing core so subtasks can run in parallel
36
define modularity
system function separately or threads
37
define convenience
compiling in parallel
38
define interprocess communication
IPC, required by cooperating process to exchange data and information
39
what are 2 fundamental modes of interprocess communication
1. message passing | 2. shared memory
40
define shared memory
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
what are the two types of buffers
1. unbounded buffer : no practical limit | 2. bounded buffer : fixed buffer size
42
define message-passing systems
- 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
what are some communicating link methods
- direct/indirect communication - synchronous/asynchronous communication - automatic/explicit buffering
44
what is the naming purpose
in direct communication, each process that wants to communicate must explicitly name the recipient or sender of the communication
45
what are some communication link properties
- link is automatic between every pair - link with exactly 2 processes - one link between each pair of processes
46
what are some indirect communication properties
- 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
define blocking send
sending process is blocked until message is received by the receiving process or by the mailbox
48
define nonblocking send
sending process sends the message and resumes operation
49
define blocking receive
receiver blocks until a message is available
50
define nonblocking receive
receiver retrieves either a valid message or a null
51
what are three way to implement buffering
1. zero capacity : queue length 0 2. bounded capacity: finite queue length 3. unbounded capacity : "infinite" queue length