serializing token

Eirik Nygaard eirikn at kerneled.com
Sun Apr 25 04:41:19 PDT 2004


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
why.

-- 
Eirik Nygaard
eirikn at xxxxxxxxxxxx    Never let a computer know you're in a hurry.
Attachment:
pgp00006.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00006.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20040425/db807a60/attachment-0020.obj>


More information about the Kernel mailing list