Re: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Attilio Rao
2008/4/21, Murty, Ravi <[EMAIL PROTECTED]>: > Hello, > > > > When a thread cannot get a mutex (default mutex) and needs to be > blocked, is it really put to sleep? From looking at the code it appears > that it is inhibited (TD_SET_LOCK) but isn't really put to sleep. > > > > 1. Why isn't i

Re: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Julian Elischer
Murty, Ravi wrote: That's actually what I was trying to get to. If I look at vm_daemon(), it checks to see if every thread of the process is running, on the runq or sleeping. If any threads fails the condition - and I can think of the case where a thread is blocked waiting for a lock - it is not

Re: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Attilio Rao
2008/4/21, Murty, Ravi <[EMAIL PROTECTED]>: > Hello, > > > > When a thread cannot get a mutex (default mutex) and needs to be > blocked, is it really put to sleep? From looking at the code it appears > that it is inhibited (TD_SET_LOCK) but isn't really put to sleep. > >From a scheduler perspec

RE: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Murty, Ravi
That's actually what I was trying to get to. If I look at vm_daemon(), it checks to see if every thread of the process is running, on the runq or sleeping. If any threads fails the condition - and I can think of the case where a thread is blocked waiting for a lock - it is not a target to be swapp

Re: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Julian Elischer
Murty, Ravi wrote: Fundamentally it seems that they both come down to inhibiting the thread and putting them on some queue before calling mi_switch(). But when a thread is woken up from a sleep, setrunnable is called and it checks to see if the process is swapped out. No such check is made when a

RE: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Murty, Ravi
Fundamentally it seems that they both come down to inhibiting the thread and putting them on some queue before calling mi_switch(). But when a thread is woken up from a sleep, setrunnable is called and it checks to see if the process is swapped out. No such check is made when a thread is waiting fo

Re: Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Julian Elischer
Murty, Ravi wrote: Hello, When a thread cannot get a mutex (default mutex) and needs to be blocked, is it really put to sleep? From looking at the code it appears that it is inhibited (TD_SET_LOCK) but isn't really put to sleep. it really has two answers. 1/ sleep has a lot of historical

Do you really "sleep" when blocked on a mutex?

2008-04-21 Thread Murty, Ravi
Hello, When a thread cannot get a mutex (default mutex) and needs to be blocked, is it really put to sleep? From looking at the code it appears that it is inhibited (TD_SET_LOCK) but isn't really put to sleep. 1. Why isn't it put to sleep - why can't it be treated the same? 2. The

Re: thread and ksegrp priorities

2008-04-21 Thread Julian Elischer
Murty, Ravi wrote: Hello All, I am working on the 6.2 FreeBSD code base and has a couple of simple questions. The thread structure defines two priority fields "td_base_pri" and "td_priority" while a ksegrp defines "kg_user_pri" and "kg_pri_class". 1. Since a ksegrp can have multip

thread and ksegrp priorities

2008-04-21 Thread Murty, Ravi
Hello All, I am working on the 6.2 FreeBSD code base and has a couple of simple questions. The thread structure defines two priority fields "td_base_pri" and "td_priority" while a ksegrp defines "kg_user_pri" and "kg_pri_class". 1. Since a ksegrp can have multiple "process scope" thre

Re: Yarrow's Counter

2008-04-21 Thread RW
On Mon, 21 Apr 2008 14:48:30 +0400 Eygene Ryabinkin <[EMAIL PROTECTED]> wrote: > Good day. > > Sun, Apr 20, 2008 at 06:31:35PM +0100, RW wrote: > > > this modification seems not to help anything, > > > > It possibly doesn't help with an attack against Yarrow itself, but > > it means that 512 bi

Re: symbol table

2008-04-21 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Erik Trulsson <[EMAIL PROTECTED]> writes: : On Sun, Apr 20, 2008 at 11:24:32PM -0600, M. Warner Losh wrote: : > In message: <[EMAIL PROTECTED]> : > Erik Trulsson <[EMAIL PROTECTED]> writes: : > : On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily

Re: Yarrow's Counter

2008-04-21 Thread Eygene Ryabinkin
Good day. Sun, Apr 20, 2008 at 06:31:35PM +0100, RW wrote: > > this modification seems not to help anything, > > It possibly doesn't help with an attack against Yarrow itself, but it > means that 512 bits of entropy, rather than 256 bits, can be read-out > from /dev/random. The only source of e

Re: symbol table

2008-04-21 Thread Erik Trulsson
On Sun, Apr 20, 2008 at 11:24:32PM -0600, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > Erik Trulsson <[EMAIL PROTECTED]> writes: > : On Sun, Apr 20, 2008 at 12:02:09PM +0300, emily becker wrote: > : > Hi, > : > > : > I have a question about symbol table. > : > One of the s