DragonFly BSD
DragonFly kernel List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: serializing token

From: Eirik Nygaard <eirikn@xxxxxxxxxxxx>
Date: Sun, 25 Apr 2004 13:36:21 +0200

On Sat, Apr 24, 2004 at 11:17:45PM -0700, Matthew Dillon wrote:
>     Another solution is to make the code in question lockless.. with no
>     locking requirements at all.  This is accomplished by guarenteeing that
>     all potential conflicts occur on the same cpu.  
>     For example, Jeff's work on the TCP stack is moving all protocol processing
>     for a particulr PCB to a particular cpu.  Since only one cpu is working
>     on a particular PCB, the protocol code can access that PCB without
>     acquiring any locks, mutexes, or tokens of any sort.

What I don't understand is how you it can be garanteed that the PCB will
stay consistant under the entire execution of the thread that accesses it,
wouldn't it be possible for another thread to do some magic on it while
the other thread is blocking or doing some other magic?
I have not yet read the code in question, but if you have some pointers on
where to start reading it I might get a better grasp of what happens and

Eirik Nygaard
eirikn@xxxxxxxxxxxx    Never let a computer know you're in a hurry.

Attachment: pgp00006.pgp
Description: PGP signature

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]