1838576 Members
4156 Online
110128 Solutions
New Discussion

kernel param ??

 
SOLVED
Go to solution
jerry1
Super Advisor

kernel param ??

Does anyone know what a "alpha semaphore" is?



4 REPLIES 4
John Kittel
Trusted Contributor

Re: kernel param ??

try google, and/or posing this question to the linux forum. On google I came up with a bunch of hits for Linux alpha semaphore.

- John
Hemanth Gurunath Basrur
Honored Contributor
Solution

Re: kernel param ??

Hello Jerry,

Refer to the foll. link.

http://h71000.www7.hp.com/wizard/wiz_7955.html

HTH.

Regards,
Hemanth
Bruno Ganino
Honored Contributor

Re: kernel param ??

Jerry, this is the explanation of semaphore.
Semaphores are routines that ensure orderly access to regions of code. Like spinlocks, semaphores guard kernel data structures by controlling access to regions of code associated with a set of data structures. Unlike spinlocks, semaphores require the waiting thread to relinquish the CPU while awaiting the lock. Semaphores are implemented using a swtch() to allow another thread to run.
Semaphores serve two functions mutual exclusion and synchronization.

Mutual-exclusion semaphores protect data and are further classified by their degree of restrictiveness. Provide mutually exclusive access to regions of code that are associated with a set of data structures.

In a mutual-exclusion semaphore, a processor attempting to acquire a semaphore already held by another processor puts its current thread of control to sleep and switches to another. It is assumed that the expected time duration the thread will wait while the lock is busy will be much greater than the overhead of a process switch.

The kernel makes available two types of mutual-exclusion semaphores: ALPHA and BETA.

ALPHA semaphores, which must be released when a thread of control sleeps.

The alpha semaphore cannot be held during sleep because it is used to protect data structures that must be consistent at the time of context switch. This applies, for example, to the fields in structures that describe the process state of a thread of control.

A broadly encompassing alpha semaphore, called an empire semaphore, protects a collection of data structures.


Beta semaphores, which a thread of control may hold while sleeping.

A beta semaphore can be held while sleeping because the protected data structures need not be consistent at the time of context switch. An example of this is the page frame lock during a page fault. The resource must remain locked during the resolution of the fault but the thread yields the processor while its page is brought in from memory.

HTH
Bruno


Torino (Turin) +2H
John Kittel
Trusted Contributor

Re: kernel param ??

Sorry for the misdirection...

- John