Scalability is a double edged sword...
Posted Jul 19, 2002 17:29 UTC (Fri) by
davecb (subscriber, #1574)
In reply to:
Scalability is a double edged sword... by iabervon
Parent article:
Scalability is a double edged sword...
As iabervon said, fine-grained locking doesn't mean holding more locks,
but rather holding a different lock from what
different code might hold[...] it's better for small SMP
Taking small, well-crafted locks in applications reduces
locking bottlenecks as well as the likelyhood of deadlock,
however the number of processors, 1 as well as 1000.
The arguement is weaker in a kernel on a uniprocessor, but
can still be made when the locks are being held by the OS as
a surrogate for the application.
Of course, you can tak this too far, and end up with 5 locks
where one really should do, but then one gets the deadlock
you deserve (;-)).
this means that an effort to get the grain as small as
possible, but no smaller, would be appropriate in any
of the uniprocessor kernel, the general multiprocessor kernel,
or Larry McVoy's cluster-of-small-SMP kernek.
--dave
(
Log in to post comments)