Module 2 Flashcards
A _______ is a program in execution.
Process
True or False.
A program is an active entity while a process is a passive entity.
False
(a program is a PASSIVE entity while a process is an ACTIVE entity)
True or False.
A computer system consists of a collection of processes.
True
True or False.
User processes execute system code. Operating system processes execute user code.
False
(OPERATING SYSTEM processes execute SYSTEM code, USER processes execute USER code)
True or False.
Several processes within different programs are considered separate execution sequences.
False
(several processes within THE SAME program)
True or False.
All processes can execute concurrently with the CPU multiplexing among them (time sharing).
True
A ________ is a cycle of CPU execution (CPU burst) and I/O wait (I/O burst) that alternates between these two states.
Process
True or False.
Process execution begins with an I/O burst then a CPU burst and so on.
False
(begins with a CPU BURST then an I/O BURST)
The last CPU burst will end with a ___________ to terminate execution.
System Request
_______- are written and becomes a process when executed/loaded into memory.
Programs
A process can be divided into four sections. What are these sections?
(SHT Damn)
- Stack
- Heap
- Text
- Data
This section contains the temporary data such as function parameters, return address and local variables.
Stack
This section is dynamically allocated memory to a process during its run time.
Heap
(dynamically allocated memory)
This section includes the current activity represented by the value of Program Counter and the contents of the processor’s registers.
Text
This section contains the the code.
Text
This section contains the global and static variables.
Data
True or False.
As a process executes, it changes states.
True
In this state, the process is being created.
New
In this state, the process is waiting for the OS to assign a processor to it.
Ready
In this state, the process has finished execution.
Terminated
Each process is represented in the operating system by a ________________.
Process Control Block (PCB)
In this state, the process is waiting for some event to occur (such as an I/O completion).
Waiting
In this state, the CPU is executing its instructions.
Running
This is also known as a task control block.
Process Control Block (PCB)
It is the repository of information of a process.
Process Control Block (PCB)
What are the parts of the process control block?
- Process State
- Program Counter
- CPU Registers
- CPU Scheduling Information
- Memory Management Information
- Accounting Information
- I/O Status Information
This part of the process control block indicates the address of the next instruction to be executed.
Program Counter
This part of the process control block include accumulators, index registers, stack pointers, and general-purpose registers, plus any condition-code information.
CPU Registers
This part of the process control block process priority, pointers to scheduling queues, and scheduling parameters.
CPU Scheduling Information
This part of the process control block along with the program counter, must be saved when an interrupt occurs to allow the process to continue.
CPU Registers
This part of the process control block contains information on limits registers or page tables.
Memory Management Information
This part of the process control block contains the amount of CPU and real time used, time limits, account numbers, job or process numbers.
Accounting Information
This part of the process control block contains the I/O requests, I/O devices allocated, a list of open files.
I/O Status Information
True or False.
The processes in the system cannot execute concurrently or multitasked on a CPU.
False
(CAN execute concurrently)
A process may create new processes via create process system call during execution. The creating process is the __________ whereas the new processes are the ______________.
Parent Process / Children or Sub-process
True or False.
The sub-process may obtain resources directly from the OS or use a subset of the resources of the parent process (Inheritance).
True
True or False.
Restricting a child process to a subset of the parent’s resources prevents any process from overloading the system by creating too many processes.
True
True or False.
When a process creates a new process, either:
The parent continues to execute concurrently by itself.
The parent waits until all its children have terminated.
False
(continues to execute concurrently WITH ITS CHILDREN)
A process terminates when it finishes its last statement and asks the operating system to delete it using the _____________.
Exit System Call
True or False.
A parent may terminate the execution of one of its children when:
1. The child has exceeded its usage of some resources it has been allocated.
2. The task assigned to the child is no longer required.
3. The parent is exiting, and the OS terminates the all its children.
True
True or False.
The concurrent processes may be independent processes or cooperating processes.
True
A process is ________- if it cannot affect or be affected by other processes or does not share any data.
Independent
An independent process is ________, meaning the result of the execution depends solely on the input state.
Deterministic
An independent process is ________ meaning the result of the execution will always be the same for the same input.
Reproducible
True or False.
An independent process’ execution cannot be stopped and restarted without causing ill effects.
False
(CAN BE stopped and restarted without causing ill effects)
A process is _________ if it can affect or be affected by other processes or share data.
Cooperating
True or False.
The results of a cooperating process’ execution cannot be predicted in advance, since it depends on relative execution sequence.
True
True or False.
The results of a cooperating process’ execution is nondeterministic since it will not always be the same for the same input.
True
True or False.
Concurrent execution of cooperating process must have processes communicate and synchronize their actions.
True
The objective of multiprogramming is to have some process running at all times, to ________.
Maximize CPU utilization
True or False.
Multiprogramming also decreases throughput, which is the amount of work the system accomplishes in a given time interval.
False
(multiprogramming also INCREASES throughput)
The idea of multiprogramming is if one process is in the waiting state, then another process which is in the ready state goes to the _______.
Running state
A _______ consists of all processes that enters a system.
Job Queue
A _______ consists of processes residing in the memory ready and waiting to execute.
Ready Queue
(waiting to execute)
A process migrates between various scheduling queues and the OS must select processes with an appropriate _______.
Scheduler
__________ selects processes from the secondary storage and loads them into memory for execution.
Long-term Scheduler
The long-term scheduler is also known as the “_______”.
Job Scheduler
True or False.
The long-term scheduler executes much more frequently.
False
(the long-term scheduler executes much LESS frequently)
True or False.
There may be minutes between the creation of new processes in the system when using a long-term scheduler.
True
True or False.
The long-term scheduler controls the degree of multiprogramming – the number of processes in memory.
True
True or False.
The long-term scheduler can take less time to select a process for execution.
False
(the long-term scheduler can take MORE time to select a process for execution)
_______ selects process from the ready queue, and allocates the CPU to one of them.
Short-term scheduler
The short-term scheduler is also known as the “_______”.
CPU Scheduler
True or False.
The short-term scheduler must select a new process more frequently.
True
True or False.
A process may execute for a few seconds before waiting for an I/O request.
False
(ONLY A FEW MILLISECONDS)
True or False.
The short-term scheduler must be very fast.
True
____________ removes (swaps out) certain processes from memory to lessen the degree of multiprogramming when thrashing occurs.
Medium-term scheduler
True or False.
In a medium-term scheduler the process can be reintroduced into memory and its execution can be continued where it left off, this scheme is called cycling.
False
(this scheme is called SWAPPING)
This refers to the CPU being switched from one process to another.
Context Switch
True or False.
Context-switch time is pure overhead, because the system does no useful work while switching and should therefore be minimized.
True
Whenever the _______ becomes idle, the OS or CPU scheduler must select a process in the ready queue for execution.
CPU
True or False.
CPU scheduling decisions may take place under three circumstances.
False
(may take place under FOUR circumstances)
Preemptive or Non-preemptive?
Switches from running state to waiting state.
Non-Preemptive
Preemptive or Non-preemptive?
Switches from running state to ready state.
Preemptive
Preemptive or Non-preemptive?
Switches from waiting state to ready state.
Preemptive
Preemptive or Non-preemptive?
When a process terminates.
Non-Preemptive
In __________ scheduling, the process keeps the CPU until it terminates or switches states. No process is interrupted until it is completed.
Non-preemptive
In ____________ works by dividing time slots of CPU to a given process. The time slot given might be able to complete the process or not be able to. This scheduling is used when the process switch to ready state.
Preemptive scheduling
___________ measures how busy is the CPU. CPU utilization may range from 0 to 100 percent.
CPU Utilization
__________ is the amount of work or jobs completed in a unit of time.
Throughput
____________- measures how long it takes to execute a process. It is the interval from the time of submission to the time of completion.
Turnaround Time
____________ is the time a job waits for resource allocation. It is the total amount of time a process spends waiting in the ready queue.
Waiting Time
____________ is the time from the submission of a request to the first response. It is not the time that it takes to output that response.
Response Time
True or False.
A good CPU scheduling algorithm maximizes CPU utilization and throughput and minimizes turnaround time, waiting time and response time.
True
True or False.
It may be better to maximize the minimum response time.
False
(MINIMIZE the MAXIMUM response time)
True or False.
For interactive systems (time-sharing systems), minimizing the variance in the response time is less important than averaging response time.
False
(minimizing the variance in the response time is MORE important than averaging response time)
True or False.
A reasonable and predictable response may be more desirable than a variable response time.
True