Unix Programming - Role of process priority in locking mechanism

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > December 2004 > Role of process priority in locking mechanism





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Role of process priority in locking mechanism
Mona

2004-12-22, 7:47 am

Can anyone explain me, role played by spls in kernel locks ?

Casper H.S. Dik

2004-12-22, 7:47 am

"Mona" <indian.monalisa@gmail.com> writes:

>Can anyone explain me, role played by spls in kernel locks ?


This depends very much on the specific kernel you are playing with.

In traditional Unix kernel, the spl*() function are used to lock
out interrupts and some other activities while manipulating certain
data structures. In those systems, spl*() functions as a primitive
locking scheme.

If you take a modern, multi-threaded kernel, like Solaris, you'll
find that you can no longer manipulate interrupt masks inside drivers;
rather, the system does it all for you. With each driver mutex
Solaris associates a "cookie" which describes the interrupt properties
of the driver. The interrupt handler can then safely obtain the lock
and lower level code can also safely obtain the lock as the kernel
will magically prevent interrupts from occuring while the lock is held.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com