[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Re: An alternative thread system?
From: |
Ivan Raikov |
Subject: |
Re: [Chicken-users] Re: An alternative thread system? |
Date: |
Tue, 12 Aug 2008 12:13:51 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Guys, I am glad to see that old flame wars never die ;-) Pipes used
to be slow back in the day, around the time when forking and context
switching was slow. Nowadays, modern kernels rely extensively on
zero-copy techniques, and I am pretty sure that Linux has had
zero-copy pipes since at least the 2.4 series. Passing data between
threads may be as simple as an assignment, but it almost never is. In
practice, you always end up having some complicated synchronization
protocol. Why not let the OS handle that for you?
-Ivan
Aleksej Saushev <address@hidden> writes:
>
> Most overhead originates not from fork, it comes from copying and IPC.
> Passing data between threads may be as simple, as assignment. Note:
> no context switch involved. Passing data between processes is almost
> always two context switches, synchronization in kernel, and copying
> passed data at least twice, unless you use some very system-specific
> hack. Sometimes you can avoid redundant copying by mmaping common file,
> which still brings you to shared-memory and all the stuff connected.
> There's the price of your prejudices in terms of performace lost.
>
> If you work within properly choosen framework, you may care very little
> about what you are running actually, a thread or a process on another
> machine. Having one subroutine, that merely passes the pointer to locals
> and communicate over network to remote, is easy enough, if you don't
> pass linked structures.
- [Chicken-users] Re: An alternative thread system?, (continued)
- [Chicken-users] Re: An alternative thread system?, Aleksej Saushev, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Elf, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, john, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Aleksej Saushev, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Elf, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Shawn Rutledge, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Elf, 2008/08/11
- [Chicken-users] Re: An alternative thread system?, Aleksej Saushev, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Elf, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Shawn Rutledge, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?,
Ivan Raikov <=
- Re: [Chicken-users] Re: An alternative thread system?, Alaric Snell-Pym, 2008/08/12
- Re: [Chicken-users] Re: An alternative thread system?, Aleksej Saushev, 2008/08/13
- Re: [Chicken-users] Re: An alternative thread system?, Alaric Snell-Pym, 2008/08/13
- Re: [Chicken-users] Re: An alternative thread system?, Ivan Raikov, 2008/08/13
- Re: [Chicken-users] Re: An alternative thread system?, Aleksej Saushev, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, John Cowan, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Elf, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, Alaric Snell-Pym, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, F. Wittenberger, 2008/08/11
- Re: [Chicken-users] Re: An alternative thread system?, F. Wittenberger, 2008/08/11