From: "Lada 'Ray' Lostak" <ray@unreal64.net>
To: linux-assembly@vger.kernel.org
Subject: Re: Threads, timing
Date: Mon, 7 Oct 2002 20:05:55 +0200 [thread overview]
Message-ID: <003e01c26e2c$2e732670$0d01a8c0@utopia> (raw)
Hi !
Thank you for reply :o)
>information in the man pages, eg: man ipc, man semctl, man semget, man
semop.
From what I gather, the sysv ipc functions aren't exactly as fast at thread
>syncronization as a windows implementation, but that is being fixed in the
>2.5.x kernels using the new futex kernel call.
One of reasons, why we decided to implement own sync is fact, that stc sync
objects in all OS we want to support are 'same but different' if you
understand what I mean. Next thing was missing some really often used sync
objects - such as 'multiple readers single writer' (which can be implemented
using standards ones, but it is not fast as it can be). And last point -
some OS (like windoze) switch to kernel every time, sync object is called.
So, it is expensive.... Now sync objects are stable and I have to verify, it
can be ported without problem. If not, resedign it a bit. And test again
(you can imagine, how bad you can test this kind of code - it takes ages :)
We also implement message queue - agian becasue it was impossible to create
'portable' queue, which have same features and behaviour). And for sync, we
uses some sync object (event/mutex mainly).
For me is enogh from system 'simple sync' - like semaphore. I looked around
semget and similar - I didn't know, that it is done throw 'ipc'... I was
searching some kernel call :o) My bad. Now I found 'ipc' directory with
sem.c - it was something what I was searching for :o) I need simple sync
object, which comes from kernel - to minimize loosing speed and races (would
be nice to have function like lock_kernel() in right3 sometimes :o)
I see it allows wait for multiple semaphores as atomic operation (it is good
:) You kick me right way, thank you !
What is 'futex' in new kernel ? In 2.4.x I found only 'reserved for futex'
but not real code/man.
Anyone have experimence with speed - ipc versus signals ? I guess IPC will
be faster, but mow many ? 2x ? 10x ? 100 ? 'similar' ?
Best regards,
Lada 'Ray' Lostak
Unreal64 Develop group
http://www.unreal64.net
--------------------------------------------------------------------------
In the 1960s you needed the power of two C64s to get a rocket
to the moon. Now you need a machine which is a vast number
of times more powerful just to run the most popular GUI.
next reply other threads:[~2002-10-07 18:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-07 18:05 Lada 'Ray' Lostak [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-10-07 7:07 Threads, timing Lada 'Ray' Lostak
2002-10-07 16:28 ` Jason Borden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003e01c26e2c$2e732670$0d01a8c0@utopia' \
--to=ray@unreal64.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox