16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Buffer Cache<br />

The kernel places <strong>the</strong> buffer at <strong>the</strong> end of <strong>the</strong> free list, unless an I/O error occurred or is marked old, in which case it places <strong>the</strong> buffer at <strong>the</strong> beginning of <strong>the</strong> free list.<br />

The kernel raises <strong>the</strong> processor execution level to prevent disk interrupts while manipulating <strong>the</strong> free list, <strong>the</strong>reby preventing corruption of <strong>the</strong> buffer pointers.<br />

Figure 67. Second<br />

Scenario for Buffer<br />

Allocation<br />

When <strong>the</strong><br />

asynchronous write<br />

completes, <strong>the</strong><br />

kernel releases <strong>the</strong><br />

buffer and places it<br />

at <strong>the</strong> head of <strong>the</strong><br />

free list.<br />

Figure 68. Third<br />

Scenario for Buffer<br />

Allocation<br />

183

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!