Timers using hash tables

  • Thread starter Ananda Jayeshwara (Arut Selvan)
  • Start date
A

Ananda Jayeshwara (Arut Selvan)

Hello,

I want to implement timers for wireless clients (10 k +).
Their entries need to be aged out from the hash table for which timers
need to be maintained.

Since it is not feasible to update the timers for all of them, I need
an efficient way of aging out entries for the wireless clients.

The mac address of client is used to hash an index to hash table where
client records are maintained.

Thanks,
Jayeshwra
 
C

CBFalconer

Ananda Jayeshwara (Arut Selvan) said:
I want to implement timers for wireless clients (10 k +). Their
entries need to be aged out from the hash table for which timers
need to be maintained.

Since it is not feasible to update the timers for all of them, I
need an efficient way of aging out entries for the wireless
clients.

The mac address of client is used to hash an index to hash table
where client records are maintained.

I assume "aging out" means timing out. In this case you need to
keep a list of timers, in order of time left before timing out.
Then, on a timer tick, check the topmost item. If it has timed
out, remove it from the list, act on it, and repeat. If it has not
timed out, you are done, just exit.

Note that this even handles missed time-outs - they are just
delayed to the next clock tick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top