Semaphore

Anuz Pratap Singh Tomar chambilkethakur at gmail.com
Wed Feb 22 06:53:12 EST 2012


On Wed, Feb 22, 2012 at 9:48 AM, Kristof Provost <kristof at sigsegv.be> wrote:

> On 2012-02-22 11:01:52 (+0200), Konstantin Zertsekel <zertsekel at gmail.com>
> wrote:
> > On Tue, Feb 21, 2012 at 6:14 PM, Dave Hylands <dhylands at gmail.com>
> wrote:
> > > I'm assuming that the semaphore is one which is held across multiple
> > > calls into the kernel, otherwise you don't have an issue in the first
> > > place, unless there is a bug on the kernel side of things which
> > > actually caused the process to terminate.
> >
> > Ok, but what happens if things go wrong?
> > For example, it driver exists abnormally (segmentation fault or
> something)?
> > Anyway, it seems very strange that the responsibility is of a driver
> alone!
> > There is the *kernel* in the system to take care of abnormal
> > situation, not the exit function of a driver...
> >
> The driver is part of the kernel. If it dies the whole kernel can
> (perhaps even should) die.
>
> There are systems, like Minix, where drivers don't run in kernel mode
> and where a crashing driver won't take the system down.
> There are advantages and disadvantages to that approach.
> See http://en.wikipedia.org/wiki/Microkernel
>
>
I am curious though if userspace gets segmentation fault, which is SIGSEGV,
kernel should be the one sending that to user space. And while sending
SIGSEGV, it must be doing some exit cleanup, wherein it frees all
resources. However unlike memory, i haven't seen exit code which frees lock
as well?

> Kristof
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120222/ad48c8c6/attachment-0001.html 


More information about the Kernelnewbies mailing list