4 ms·
N can't be 1 because you can't fit the entire set of locks into memory, that's stated in the problem specification. The alternatives have a much higher locking
by DanWaterworth 15y ago
N can't be 1 because you can't fit the entire set of locks into memory, that's stated in the problem specification.
The alternatives have a much higher locking overhead/contention rate than this approach.
- mayoff 15y agoOf course you can set N to 1. That's not the same as making the hash table size equal to the number of resources.
- DanWaterworth 15y agoOk, I see what you mean.