Only $35.99/year

Terms in this set (62)

There are five phases or states of the process life cycle
When the job is accepted by the system, it is in the start state and placed in the main queue
The process is not yet loaded into main memory, so it isn't an executable process at this point
The process control block (PCB) is created in this state/phase
When the process is ready to run, the Job Scheduler uses some predefined policy to move it from the start state to the ready state
Processes in this state wait for the CPU
This is the state where availability of memory is checked
The jobs that are being processed are now moved from the ready state into the running state by the Process Scheduler using a predefined algorithm
In a single processor system, only one process can be run at a time, which implies that only one process will be in the running state at a time
The process may be moved from the running state back to the ready state due to timeout or some other interrupt occurring
When the process cannot continue further, the Process Scheduler moves the process from the running state to the wait state
This may be because the process needs to wait for some specific resource allocation or completion of some I/O operation
When the requested resources are allocated or the I/O operation is completed, the Process scheduler moves the process from the wait state into the ready state
Finally, the Process Scheduler moves the process from the running state to the terminate state if the process has successfully completed its operation, if the process exceeds its time limit (timer), or some error occurs in the process, causing the OS to terminate the process prematurely
The producer-consumer problem is a scenario in which a producer produces items and puts them in storage while the consumer takes items from the same storage. It is used to explain cooperative processes and data sharing between the two
In the scenario with zero buffer capacity, the producer must wait for the consumer to take each item from the storage before putting a new item in storage.
Zero buffer capacity is most dependent on the consumer since the producer must halt production of items to put in storage. The producer must communicate explicitly with the consumer in this scenario.
In the scenario with bounded buffer capacity, there is a finite number of items that the producer can put in storage before the storage is filled up
Once this happens, the producer must wait for the consumer to take an item from the storage, like in zero buffer capacity. However, unlike zero buffer capacity, the producer in bounded buffer capacity does not need to wait for the consumer to take each item and can instead put multiple items in storage, until the storage is completely filled.
In the scenario with unbounded buffer capacity, there is (seemingly) no limit on the number of items that the producer can put in storage before the storage is filled up
In this scenario, the producer can constantly put items into storage with no restrictions on the number of items that can be stored at a time.
In all three of these scenarios, the consumer will need to wait for the producer if there are no items in storage, just like how the producer may need to wait for the consumer to take items out of storage in bounded and zero buffer capacity scenarios. In IPC, "storage" can refer to either shared memory or message passing, depending on the context.
A quick example is the message queues in Assignment01 had a bounded buffer capacity, set by the kernel, which was 10.