Opened 13 years ago

Closed 10 years ago

#398 closed defect (fixed)

Improve the hash table implementation

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: major Milestone: 0.7.0
Component: helenos/kernel/generic Version: mainline
Keywords: gsoc12 Cc:
Blocker for: Depends on:
See also:

Description (last modified by Jakub Jermář)

Improve the kernel's (and possibly also the uspace's) implementation of the generic hash table.

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.
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.
Possible mentors
HelenOS Core Team, Jakub Jermar

Change History (5)

comment:1 by Jakub Jermář, 12 years ago

Keywords: gsoc12 added

comment:2 by Jakub Jermář, 12 years ago

Description: modified (diff)

comment:3 by Jakub Jermář, 12 years ago

Description: modified (diff)

comment:4 by Jakub Jermář, 10 years ago


comment:5 by Jakub Jermář, 10 years ago

Resolution: fixed
Status: newclosed

Fix merged in mainline,2297.

Note: See TracTickets for help on using tickets.