Block and inode cache

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Block and inode cache

Post by Jeko »

I'm implementing block and inode cache for my virtual file system.

I have some questions:
How can I choose which files I must cache?
How can I handle block and inode cache? With a linked list? Or with a hash table? (In the second case, how can I handle it?)

Can you give me some advices?
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post by Ready4Dis »

Well, this is more or less a bump, I haven't gotten to caching yet, I simply load them as required, and dump them when not required. I plan on re-writing parts of my code later on to include some cacheing and change around the order that things are performed (for example, I have ONE generic search for file in directory function, so the list must be populated with all entries on entry to the directory, and can be dumped when the directory is exited), I am going to re-implement this so you can search a directory and open/close files without having to read in the entire thing and store a list for the whole directory, with some caching possible in the future. Mostly listening in for any ideas though, if you come up with any, please share.
z180
Member
Member
Posts: 32
Joined: Tue Mar 04, 2008 12:32 pm

Post by z180 »

I read the Netbsd and sunos documents about the unified buffer cache.
Windows use a caching that is much different from my os and is implemented in the captive project.Also another caching uses dragonflybsd.
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

I think you do some tradeoffs between the most used files and the recently used files so you know how many and which files to cache
Post Reply