Character Device Range Database

A second database is for character devices only. It is used to manage device number range allocation to drivers. A driver can either request a dynamic device number, or it can specify a range that is supposed to be acquired. In the first case, the kernel needs to find a free range, while in the second case, it must be ensured that the desired range does not overlap with any existing region.

Again a hash table is employed to keep track of previously allocated device number ranges, and again the major number is used as hash key. The data structure in question looks as follows:

Continue reading here: Fschardevc

Was this article helpful?

0 0