IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New You can't get rid of the time checks unless you want to
rewrite the concurrency model.

This guy is spawning threads, and telling them to do something after a certain amount of time has passed. So he spins, and checks to see if a enough time has passed. He wastes CPU cycles for the spin logic, plus the repeated system calls.

In the old days we called this a "busy wait". My mentor wanted to smack the shit out of me after he saw I coded one.

THIS IS A MULTI-USER MULTI-TASKING SYSTEM, DAMMIT. Other people want to use those cycles you are chewing through. Find another way!

It depends on how long each process needs to wait for which signalling mechanism he needs to use (alarm, microsecond sleeps, semaphore or pipe read wake-ups, etc (there's lots)).

So talk to the coder.
New Re: You can't get rid of the time checks unless you want to
I haven't used a futex before, but I used mutexes a lot. The point of them was for the thread to relinquish the processor until a or one of a number of events occurred, when it could pick up in the proper place and carry out its task. The whole point was to make the cycles available to other threads or processes. If you gave the mutex a time, it was so the mutex wouldn't hang forever. The timer wasn't exact but it would give you an event shortly after the specified time. futexes must be seriously different.
New Thanks, that helps.
I'm going to have to read it a couple more times to completely absorb it, but that does help. Thanks again.
New It appears that they deserve it.
They are apparently trying to avoid using system resources for some reason and rolling their own "lightweight" mutexes. They appear to be useless outside the process that generates them. I usually used mutexes to sync up operations in separate process and IPC functions. I would never have looked that futexes. Looks like reinventing an inferior wheel.
As they used to say on Laugh In, "very interesting... but stupid"
New Anything by Ulrich Drepper, makes my head hurt.
A lot of people don't like him. He is sort of like the OpenBSD guy in that respect.
New Mutexes of any sort are tricky.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New the coder doesnt have a clue
I guess I will be forced to chew thru the code sigh
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 55 years. meep
New It might be buried in a library he's using.
Thus why he has no idea.

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
     appeal to the java gods - (boxley) - (12)
         futex = fast userspace mutex. - (static)
         You can't get rid of the time checks unless you want to - (crazy) - (9)
             Re: You can't get rid of the time checks unless you want to - (hnick) - (6)
                 Futexes are tricky - (crazy) - (5)
                     Thanks, that helps. - (hnick) - (2)
                         Cursed as well - (crazy) - (1)
                             It appears that they deserve it. - (hnick)
                     Anything by Ulrich Drepper, makes my head hurt. - (folkert)
                     Mutexes of any sort are tricky. -NT - (static)
             the coder doesnt have a clue - (boxley) - (1)
                 It might be buried in a library he's using. - (static)
         potential partial solution - (boxley)

They can feed a fine Minze?
54 ms