2006-01-14 21:34:49

by Jan Engelhardt

[permalink] [raw]
Subject: state terminology

Hi,


If this example kernel functions is called, it will generate an oops, kill
the current process, and subsequent tries to call it will hang the process
trying to do so.

static struct semaphore x;
void f(void) {
int *p = NULL;
down(&x);
*p++;
up(&x);
}

Is there a specific term (other than "hang") associated with this
situation? It's not a "dead-lock", because there is no other process
(anymore) which could potentially up the semaphore.


Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
| jengelh's site, http://jengelh.hopto.org/


2006-01-15 09:59:04

by Ingo Oeser

[permalink] [raw]
Subject: Re: state terminology

Hi Jan,

On Saturday 14 January 2006 22:34, you wrote:
> Is there a specific term (other than "hang") associated with this
> situation? It's not a "dead-lock", because there is no other process
> (anymore) which could potentially up the semaphore.

This is a simple "resource leak" (or "semaphore leak" in this case).

Explanation follows:

The resource semaphore is not usable by anyone anymore
and is still around.

Its pretty much the same as a memory leak. There is no one, who
could free the memory anymore.

The reasons for the resource not being usable anymore is
not significant for a resource leak.

Also insignificant is the fact that the amount of semaphores
are just limited by available memory. If you repeat starting threads
doing the semaphore leak game from your example, you'll run out
of memory and thus out of semaphores. This is another sign of leakage.

Do the above explanations sound ok?


Regards

Ingo Oeser


Attachments:
(No filename) (938.00 B)
(No filename) (189.00 B)
Download all attachments

2006-01-15 20:00:31

by Paul Dickson

[permalink] [raw]
Subject: Re: state terminology

On Sun, 15 Jan 2006 10:58:48 +0100, Ingo Oeser wrote:

> Hi Jan,
>
> On Saturday 14 January 2006 22:34, you wrote:
> > Is there a specific term (other than "hang") associated with this
> > situation? It's not a "dead-lock", because there is no other process
> > (anymore) which could potentially up the semaphore.
>
> This is a simple "resource leak" (or "semaphore leak" in this case).
>
> Explanation follows:
>
> The resource semaphore is not usable by anyone anymore
> and is still around.
>
> Its pretty much the same as a memory leak. There is no one, who
> could free the memory anymore.
>
> The reasons for the resource not being usable anymore is
> not significant for a resource leak.
>
> Also insignificant is the fact that the amount of semaphores
> are just limited by available memory. If you repeat starting threads
> doing the semaphore leak game from your example, you'll run out
> of memory and thus out of semaphores. This is another sign of leakage.
>
> Do the above explanations sound ok?

But it's the functionality rather than the resource that's being lost.
So I wouldn't consider it to be a leak.

How about "locked-out" or "lock-out"? It's akin to a locked room, with
the keys left inside.

-Paul

2006-01-15 20:55:57

by Jan Engelhardt

[permalink] [raw]
Subject: Re: state terminology


>> > Is there a specific term (other than "hang") associated with this
>> > situation? It's not a "dead-lock", because there is no other process
>> > (anymore) which could potentially up the semaphore.
>>
>> This is a simple "resource leak" (or "semaphore leak" in this case).
>>
>How about "locked-out" or "lock-out"? It's akin to a locked room, with
>the keys left inside.

Yeah, comes closer. I also thought about cul-de-sac. (Which does not allow to
proceed further, but let's some waiting process abort.)


Jan Engelhardt
--