Chapter 3 Flashcards
Define a process
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
A system consists of a collection of process and different codes are associated to different thing. what is OS and user associated with?
system code and user code
what does the batch system execute
jobs
what does a time-sharing system execute
user programs or tasks
when does a program become a process
when an executable file is loaded into memory
name a couple of states of a process
new, running, waiting, ready, terminated
what is PCB
process control block
define program counter
address of next instruction to be executed
define cpu registers
different type of registers, when an interrupt occurs the status info is saved
define cpu-scheduling information
process priority pointers to scheduling queues
define memory management information
value of base, limit registers, page tables, etc.
define accounting information
amount of CPU information and real-time used, time limits account numbers, etc
define I/O status information
list of I/O devices allowed to process, etc.
describe single thread in 5 words
one task at a time
define multiprogramming objective
some process running at all times, to maximize cpu utilization
define time-sharing objective
switch cpu among processes so frequently that users can interact with each program while it is running
define process scheduler
selects available process for program execution on the cpu
define batch system and process
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
what is the difference between job and cpu scheduler
frequency of execution
define short-term scheduler
cpu scheduler, more frequent, fast, selects from ready state and allocated cpu to one of them
define long-term scheduler
job scheduler, less frequent, slow, controls degree of multiprogramming, makes careful selection, selects and loads to memory
define medium-term scheduler
sometimes removes process from memory and reduces degree of multiprogramming
define swapping
process is swapped out and later in by medium-term scheduler
define context-switch
switching cpu to another process requires performing a state save of current process and a state restore of a different process, pure overhead
steps of context switch
- kernel saves context of old process in its PCB
- loads saved context of new process scheduled to run
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
when a process creates a new process, what are the 2 possibilities for execution that exist
- parent continues to execute concurrently with its children
- parent waits until some or all of its children have terminated
what are the 2 address-space possibilities for new processes
- child process is the duplicate of the parent process
2. children program has new program loaded into it
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
define zombie process
a process that has terminated but whose parent has not yet called wait(), this is a brief moment of time
define orphans
parent did not invoke wait() and instead terminated
define independent process
cannot affect or be affected by the other processes executing in the system
define dependent process
CAN affect or be affected by the other processes executing in the system
define information sharing
concurrent access to “shared files”
define computation speedup
multiple processing core so subtasks can run in parallel
define modularity
system function separately or threads
define convenience
compiling in parallel
define interprocess communication
IPC, required by cooperating process to exchange data and information
what are 2 fundamental modes of interprocess communication
- message passing
2. shared memory
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
what are the two types of buffers
- unbounded buffer : no practical limit
2. bounded buffer : fixed buffer size
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
what are some communicating link methods
- direct/indirect communication
- synchronous/asynchronous communication
- automatic/explicit buffering
what is the naming purpose
in direct communication, each process that wants to communicate must explicitly name the recipient or sender of the communication
what are some communication link properties
- link is automatic between every pair
- link with exactly 2 processes
- one link between each pair of processes
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
define blocking send
sending process is blocked until message is received by the receiving process or by the mailbox
define nonblocking send
sending process sends the message and resumes operation
define blocking receive
receiver blocks until a message is available
define nonblocking receive
receiver retrieves either a valid message or a null
what are three way to implement buffering
- zero capacity : queue length 0
- bounded capacity: finite queue length
- unbounded capacity : “infinite” queue length