Re: OS / hardware support for Semphores
- From: Jean-David Beyer <jeandavid8@xxxxxxxxxxx>
- Date: Mon, 04 Sep 2006 10:07:47 GMT
Divick wrote:
Hi, I have question related to semapores / lock. Does the OS / hardwareThink about what a semaphore (or lock) has to do.
need to provide some support for Semaphores / locks? Why is it necessary?
Why can't it be implemented without the support of OS/ hardware?
It must be at a higher level of abstraction than a process because it must
be shared by multiple processes. Thus the implementation cannot be as low as
a process. So it must be implemented at the OS or hardware level.
Now part of the implementation might be done at the level of individual
processes, but not much -- because operations on semaphores (or locks) must
be indivisible and process switching can occur anytime between the
individual instructions of a processor (assuming the processor is not
hyperthreaded or multi-core) and that the machine has only a single
processor. If the machine is multi-processor, multi-threaded, or
multi-cored, then there is no evading the need for hardware support in some
form or other.
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 05:55:01 up 1 day, 8:44, 3 users, load average: 4.33, 4.23, 4.13
.
- Follow-Ups:
- Re: OS / hardware support for Semphores
- From: Divick
- Re: OS / hardware support for Semphores
- References:
- OS / hardware support for Semphores
- From: Divick
- OS / hardware support for Semphores
- Prev by Date: Re: Image Conversion html->jpg
- Next by Date: Re: Image Conversion html->jpg
- Previous by thread: Re: OS / hardware support for Semphores
- Next by thread: Re: OS / hardware support for Semphores
- Index(es):
Relevant Pages
|
|