lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091202002424.1e430662@lxorguk.ukuu.org.uk>
Date:	Wed, 2 Dec 2009 00:24:24 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Maxim Levitsky <maximlevitsky@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: General kernel question about waiting for events

> In that case, wrapped in different packages, it always ends with
> following loop:
> 
> while( event == false )
> schedule();

No. If it were to do that then real time processes could spin eating the
CPU forever.

There is a difference between rescheduling and sleeping for an event.
Sleeping for an event (ie on a waitqueue) means that you will not be
woken until the wait queue is woken (or certain other things like signals
if interruptible). Rescheduling gives the CPU to someone else if anyone
wants it.

In short the different task states that are set are the important bit to
look at to understand this further.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ