Click to See Complete Forum and Search --> : B Tree to manage large data in Memory


waqarahmad
September 27th, 2002, 04:33 AM
Hi All,

Can B Tree be used to manage large data in memory?

Say I have to load a large file (size greater than available RAM), I want to manage its loading/inloading from RAM myself, instead of depending upon OS's virtual memory management.

So can, in any way, B Tree be used for this purpose. I know other methods, just want to know about technique (if any) using B Tree.

Regards,

Waqar

cup
September 28th, 2002, 03:09 AM
Answer is yes: the B-tree can be used for anything which requires a quick lookup but the OSs VM management may be more efficient. You cannot tell when there is a page fault so trying to work around the OS may be a problem, unless it is an OS that is really dumb (like DOS).

B-trees can be faster than a generic hash table. There are 2 types of B-tree: the B tree and the B+ tree. In fact, the more entries you store per node, the more chance you will have of getting a hit. You can of course use a hash algorithm to speed up the search within a node.

Historic Off topic nonsense: B could stand for Balanced, Bushy, Boeing or Bayer since it was first publicised as a balanced, bushy tree by Bayer of Boeing Corp.