Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!uunet!shelby!agate!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.sources.wanted Subject: Re: Modifying a unix process table on the fly Message-ID: <9952@dog.ee.lbl.gov> Date: 15 Feb 91 09:48:01 GMT References: <5962@rtech.Ingres.COM> <118873@uunet.UU.NET> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 16 X-Local-Date: Fri, 15 Feb 91 01:48:01 PST In article <118873@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes: >I have always thought that setting the "Wait Channel" to the address >of the lightning bolt (lbolt) would be a nice way to either >(1) unwedge a process, or (2) crash the system. Actually, chances are it would do nothing. 4BSD (at least, and probably most others now) has a hash table of sleeping processes so that wakeup() can avoid looking at everything. wakeup(chan) computes hash(chan) and runs down only that particular list of sleeping processes. Of course, if the hash for &lbolt were the same as that for the current wait, you would probably get the crash. :-) -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov