Multithreading the KDC server

Sam Hartman hartmans at MIT.EDU
Tue Mar 22 22:33:19 EST 2005

If I were trying to do an initial implementation of a multi-threaded
KDC I'd start with one big request mutex.  The idea is that the KDC
should only be processing one request at a time.

Then provide a yield function to save away the state associated with
the current request, unlock the mutex.  You'd also want a reacquire

In the e-directory lookup code, you would:

* save the information you need to do the lookup
* yield the current request
* do the lookup
* reacquire the request so you can respond to it.

Then you would modify the main loop to start several threads.

In practice, at most one thread would be in the main part of the KDC.
Other threads could be idle, doing database lookups or waiting to get
back into the main section.

Over successive versions we could create more regions where finer
grain locks are available.

More information about the krbdev mailing list