Posts

Process States and Transitions

List containing complete set of process states: 1. The process is executing in user mode. 2. The process is executing in kernel mode. 3. The process is not executing but is ready to run as soon as the kernel schedules it. 4. The process is sleeping and resides in main memory . 5. The process is ready to run , but swapper (process 0) must swap the process into main memory before the kernel can schedule it to execute. 6. The process is sleeping, and the swapper has swapped the process to secondary storage to make room for other processes in main memory. 7. The process is returning from the kernel to user mode ,but the kernel preemprts it and does a context switch to schedule another process.The distinction between this state and state 3 (ready to run) will be brought out shortly. 8. The process is newly created and is in a transition state ; the process exists, but it is not ready to run , nor is it sleeping . This state  is the start for all processes except process 0. 9. ...

Buffer

Definition :- The kernel could read and write directly to and from the disk for all file system accesses,but system response time and throughput would be poor because of the slow disk transfer rate . The kernel therefore attempts to minimize frequency of disk access by keeping a pool  of internal data buffers,called the buffer cache which contains the data in recently used disk blocks. A buffer contains two parts: a memory array that contains data from the disk and a buffer header that identifies the buffer. The status of buffer is a combination of the following conditions: 1. The buffer is  currently locked. 2. The buffer contains valid data  3. The kernel must write the buffer contents to disk before reassigning the buffer this condition is known as "delayed-write" 4. The kernel is currently reading or writing the contents of the buffer to disk. 5. A process is currently waiting for the buffer to become free Structure of the buffer pool: The kernel cache...