Processes Flashcards
What is the CPU-I/O Burst Cycle
Process execution consists of a cycle of CPU execution (CPU executing the program code) and I/O wait (waiting for the result of I/O)
What is a charasteric of a CPU Bound Program
Program that has long CPU burst and short I/O wait
What is the charateristics of a I/O Bound Program
Program that has long I/O wait and short CPU burst
What is the ready queue
Set of all processes residing in main memory that are ready and waiting to execute
What is the I/O queue
Set of all processes waiting for an I/O device. Each device has its own I/O device queue
What does ht eProcess/CPU Scheduler do?
Select which process in ready queue need to be executed next by the CPU
What are the scheduling criteria?
Maximize CPU Utilization, Maximize Throughput, Minimize Turnaround Time, Minimize Waiting Time and Minimize Response time
What is CPU Utilization
Try to keep the CPU as busy as possible; i.e. executing as many processes as possible
What is throughput
The number of processes that are completed per time unit; i.e. complete execution of as many processes as possible
What is turnaround time?
The amount of time used to complete a process. Turnaround time = Execution time + Waiting Time
Waht is waiting time?
The amount of time a process is waiting in the ready queue
What is response time?
The amount of time used to output/display the first result
What is Multilevel queue Scheduling
Partitioning a ready queue into multiple queues. Each queue has its own priority. Foreground processes have higher priority over the background processes
What is IPC?
Inter-Process Communication. It is a communication among all processes
What the the advantages of IPC
Information sharing, Computation Speed-up, Modularity and Convenience
What are the two models of IPC?
Message passing and Shared Model
What is message passing?
Process A sends/receives messages to/from process B through kernel (system calls). This model is only used for exchanging small data because it is slower, but it is more reliable than the shared model
What is the shared memory model?
Both Process A and B write/read data on a shared memory. It is faster and more convenient than the message passing. It is used for exchanging larger amount of data
In shared memory model what is the consumer?
Process that consumes information from the producer
In shared memory model what is the producer?
Process that produces information that is consumed by a consumer process
What is the Queue buffer?
Memory uses to temporarily sharing information between processes. It is based on queue concept (first in-first out). There are 2 types of queue buffer: Unbounded buffer and Bounded buffer
What is an unbounded buffer?
There is no limit on the size of the buffer. Producer can keep producing data and place it on the buffer even when there’s no consumer. This is rarely used! Message passing model is used to inform the consumer when the queue is empty
What is a bounded buffer?
The buffer has a fixed size. When the buffer is full, the producer cannot place a new data to the buffer. The producer must wait until the queue is not full anymore. Message passing model is used to inform the producer when the queue is full, and to inform the consumer when the queue is empty
What is buffer overflow?
When a producer tries to place a new data to the bounded buffer which is already full
What are the scheduling algorithms?
First-Come, First-Served Scheduling Shortest-Job-First Scheduling Priority Scheduling Higher priority process always runs first Round-robin Scheduling All take turn based on time Equal portions of time slices in circular order Multilevel Queue Scheduling Multilevel Feedback-Queue Scheduling