| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sun Oct 26, 2008 2:45 pm Post subject: RANT: There is no way for interprocedural multithread safe m |
|
|
I love windows it's so much better and well thought out then this unix
garbage.
Todays lesson was to implement a system with two processes, where one
process contains untrusted and maybe buggy user code that can crash at
any time (in one of its thread). This was why i moved this code into a
separate process.
Now i pass data via a queue implemented as shared memory. And of couse
i need a mutex for this. No problem on windows, there we have a named
interprocess mutex. Even old MacOS and MacOSX has a named mutex. But
on Unix/Posix it sucks. It doesn't seem that there is a way to create
a mutex to sync access to shared memory.
If i only had a single thread in the process i could use semaphores
either posix or SysV IPC ones. But they all share the same problem. If
the process crashs while it holds the mutex locked it's not released.
No problem on single threaded apps, there i could keep the lock time
span short enough to avoid a crash but with multithreading it is not
possible. The other threads can crash at any time.
I hate it.
When do the Unix sucker learn that the MS Core API is so much better
then Unix.
Yes this is a rant, i don't want to hear a solution like design it
otherways - i know how to do it and i'm working on it right now. But
this sucks, it sucks big times. But i'm 100% sure the next freetard is
on the way to tell me that unix is so much better.
So the only question left is who sucks more:
A fucking freetard with a keyboard and without a clue what he is
implementing or a cute and dumb political
female retard from Alaska. This will not be the only time i will vote
against the VPILF. |
|
| |
|
Back to top |
Joe Pfeiffer Guest
|
Posted: Sun Oct 26, 2008 8:58 pm Post subject: Re: RANT: There is no way for interprocedural multithread sa |
|
|
scholz.lothar@gmail.com writes:
| Quote: | I love windows it's so much better and well thought out then this unix
garbage.
|
I know, I shouldn't feed trolls. All the same, it's really funny to
see somebody spend this much more energy on a rant than to simply read
the man page. |
|
| |
|
Back to top |
Chris Ahlstrom Guest
|
Posted: Mon Oct 27, 2008 9:09 pm Post subject: Re: RANT: There is no way for interprocedural multithread sa |
|
|
After takin' a swig o' grog, Joe Pfeiffer belched out
this bit o' wisdom:
| Quote: | scholz.lothar@gmail.com writes:
I love windows it's so much better and well thought out then this unix
garbage.
I know, I shouldn't feed trolls. All the same, it's really funny to
see somebody spend this much more energy on a rant than to simply read
the man page.
|
Heh. Looks like Lothar will be flunking yet another class.
--
"Catch a wave and you're sitting on top of the world."
-- The Beach Boys |
|
| |
|
Back to top |
David Schwartz Guest
|
Posted: Tue Oct 28, 2008 1:15 am Post subject: Re: RANT: There is no way for interprocedural multithread sa |
|
|
On Oct 26, 7:45 am, scholz.lot...@gmail.com wrote:
| Quote: | I love windows it's so much better and well thought out then this unix
garbage.
|
Really?
| Quote: | Todays lesson was to implement a system with two processes, where one
process contains untrusted and maybe buggy user code that can crash at
any time (in one of its thread). This was why i moved this code into a
separate process.
|
If it can crash at any time, it can also scribble over the shared
memory without holding the mutex.
| Quote: | Now i pass data via a queue implemented as shared memory. And of couse
i need a mutex for this. No problem on windows, there we have a named
interprocess mutex. Even old MacOS and MacOSX has a named mutex. But
on Unix/Posix it sucks. It doesn't seem that there is a way to create
a mutex to sync access to shared memory.
|
What happens if the untrusted process *hangs* while holding the named
mutex? Or are you suggesting there's some problem scenario that can
cause crashed but not hangs? What if the untrusted process, as it
crashes, scribbles over the shared memory?
| Quote: | If i only had a single thread in the process i could use semaphores
either posix or SysV IPC ones. But they all share the same problem. If
the process crashs while it holds the mutex locked it's not released.
|
Which is good. If it was released, you'd have no way to know that
you're about to operate on potentially-mangled data.
| Quote: | I hate it.
When do the Unix sucker learn that the MS Core API is so much better
then Unix.
|
Actually, neither platform provides a simple solution to your stated
problem because your stated problem is not simple. You just are
willing to ignore the serious problems with the easy solution on
Windows.
There are a lot of good solutions to your problem, but a named mutex
is only a small part of one possible such solution.
DS
PS: Sorry for feeding the trolls. |
|
| |
|
Back to top |
|