id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,field_blocks,field_dependson,field_seealso 398,Improve the hash table implementation,Jakub Jermář,Jakub Jermář,"Improve the kernel's (and possibly also the uspace's) implementation of the generic hash table. Details:: The current HelenOS hash table implementation is very simple. It uses a predefined number of buckets and chaining of items. It is used in many places including the global page hash table, IRQ handling, generic range allocator, inter-process communication, device drivers, file systems and networking. Unlike the current implementation, the new hash table should scale with the number of hashed items, i.e. the hash table should be able to grow/shrink as items are added to or removed from it. Implementation details of how this is achieved are not that important, with the following remarks: - the way the hash table is used should remain the same, i.e. use buckets with linked lists - number of links needed for an item to be hashed should remain 1, even though internally, there could be more instances of the hash table (e.g. for the old size and the new size) - the hash table needs to remain usable for the implementation of the global page hash table - insert should not break lockless find operation of page table mappings Integrating the new hash table with the current code shall be considered an integral part of the solution of this project. What Gains and Benefits will this bring?:: This will basically move us from using a poor-man's hash table implementation to using an advanced data structure with constant-time lookup operation. Given the key role of the hash table in various HelenOS subsystems, the benefit of realizing this project will be quite significant. Difficulty:: Medium to difficult. The solution needs to be able to work in the delicate environment of various kernel subsystems, especially with respect to synchronization. Required skills:: A successful applicant will have good skills of programming in the C language and will be familiar with advanced data structures. He or she will also need to be able to asses the synchronization needs of various hash table uses throughout the system. Documentation:: * [browser:/mainline/kernel/generic/src/adt/hash_table.c Current hash table implementation] * [http://en.wikipedia.org/wiki/Hash_table Hash table article on Wikipedia] Possible mentors:: HelenOS Core Team, Jakub Jermar",defect,closed,major,0.7.0,helenos/kernel/generic,mainline,fixed,gsoc12,,,,