The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Hardware > Filesystems, Disks and Memory
.
google unix.com



Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl Hash Harikrishna Shell Programming and Scripting 1 06-02-2008 11:45 PM
Hash in perl Harikrishna Shell Programming and Scripting 1 06-02-2008 04:00 AM
Hash within array, within hash, within array... jsmoriss Shell Programming and Scripting 1 07-10-2006 09:26 PM
Unix message Queue kel UNIX for Advanced & Expert Users 3 07-30-2003 11:12 AM
setup unix workstation to print on NT queue ? phapvn UNIX for Advanced & Expert Users 1 02-07-2002 01:00 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-08-2004
HPCnewbie HPCnewbie is offline
Registered User
  
 

Join Date: Feb 2004
Location: King, NC
Posts: 1
Unix hash queue

How is the hash queue categorized? I am trying to understand the free list vs the hash queue and i'm just not getting it. The book im using is written like you already have a degree in Unix architecture. Maybe someone knows a web site that explains this in laymans terms. A Unix architecture for dummies kinda thing.
  #2 (permalink)  
Old 02-08-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0