Hi guys,

During week 9:

1) I had a look at the current single threaded uspace
hash table and I extended it so it can now resize
automatically [1]. It resizes in a way that protects
against bad hashes.

2) I got rid of another hash table implementation in
uspace/*/adt/hash_set and switched its only user
nic_addr_db to hash_table.

3) Coded lookup and delete for the concurrent hash table
(CHT). (not in the repo for obvious reasons: insert not
implemented ;-))

4) Figured how to use only 2 lower-order bits in CHT
instead of 3.


Details:
(1) required a slight change of the interface, so
many files were affected by the commit.

(1) I did not know how to thoroughly test the change,
so I copied ~15000 files back and forth from fatfs
to tmpfs. I also ran the user tester tests a couple
of times.

(1) The single-threaded hash table now uses table sizes
that are (mostly) prime to protect against suboptimal
hashes. Its minimum size is 89 buckets. If someone
wanted to create many small hash tables and the minimum
table size would waste too much memory, I can switch
the table from computing its new size to looking it up
in a static table of primes. That would allow the table
to have a size less than 89.

Adam

[1] http://bazaar.launchpad.net/~adam-hraska+lp/helenos/rcu/revision/1560
[2] http://bazaar.launchpad.net/~adam-hraska+lp/helenos/rcu/revision/1561

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to