|
Unix Internals really isn't a subject for a layman. You can write an overview, but then you would not mention a structure like a hash queue. Typically books like that assume that the reader is a very experienced C programmer. I don't know any good unix internals sites.
A little context would help here. I'm guessing that you have a rather old unix internals book and that you're referring to the buffer cache.
Let's say that a program wants to read the first few bytes of /etc/hosts. The kernel will need the first block of that file in a buffer. First it needs to figure out which block that is... let's say that it is block 6923 of filesystem number 1. Maybe that block is currently in core. So the kernel looks for 1:6923. And it looks in the hash queues.
But let's say it didn't find it. So it needs a free block. It will take the oldest block off the free list and read the data. After the data arrives in the block, the kernel can copy some of it to program. That finishes the read system call. So it puts the block at the end of the free list.
Now the block is in a hash queue and the free list.
If another program wants that block, it will succeed when it looks in the right hash queue. It will take the block off the free list, use it, and put it back at the end of the free list.
But if it doesn't get used again, it will drift towars the top of the free list and eventually it gets used for something else.
|