* state terminology
@ 2006-01-14 21:34 Jan Engelhardt
2006-01-15 9:58 ` Ingo Oeser
0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2006-01-14 21:34 UTC (permalink / raw)
To: Linux Kernel Mailing List
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/
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: state terminology
2006-01-14 21:34 state terminology Jan Engelhardt
@ 2006-01-15 9:58 ` Ingo Oeser
2006-01-15 20:00 ` Paul Dickson
0 siblings, 1 reply; 4+ messages in thread
From: Ingo Oeser @ 2006-01-15 9:58 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: state terminology
2006-01-15 9:58 ` Ingo Oeser
@ 2006-01-15 20:00 ` Paul Dickson
2006-01-15 20:55 ` Jan Engelhardt
0 siblings, 1 reply; 4+ messages in thread
From: Paul Dickson @ 2006-01-15 20:00 UTC (permalink / raw)
To: Ingo Oeser; +Cc: jengelh, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: state terminology
2006-01-15 20:00 ` Paul Dickson
@ 2006-01-15 20:55 ` Jan Engelhardt
0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2006-01-15 20:55 UTC (permalink / raw)
To: Paul Dickson; +Cc: Ingo Oeser, linux-kernel
>> > 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
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-15 20:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-14 21:34 state terminology Jan Engelhardt
2006-01-15 9:58 ` Ingo Oeser
2006-01-15 20:00 ` Paul Dickson
2006-01-15 20:55 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox