[ck] Re: Threading issues? [firstname.lastname@example.org: ck
Digest, Vol 3, Issue 16]
ovek at arcticnet.no
Mon Aug 30 01:52:04 CDT 2004
man, 30.08.2004 kl. 02.50 skrev michael at cherryblossom.homelinux.com:
> As I recall, most apps fall under two catagories (basically): a) those
> who don't bother with priority (they use the default one, mostly toward
> lesser end users and general audiences) and b) those who allow the user
> to change this via a menu or command line option (advanced apps only or
> advanced feature only).
and c) those who rely on priorities and set some threads to high
priority without asking the user (mainly games)
> > Only root can do this under Linux.
> Maybe I sound naive, but would it be possible to get the highest
> priority supported by the user (root or otherwise) without going to
> root; getting as close to real-time as possible?
It's not. Linux only allows non-root processes to reduce its priority,
not increase it, even for non-real-time priorities. Windows, however,
allows it for non-real-time priorities.
> > > > and how wine treats that scheduling (which I also don't).
> > I don't see how that's relevant. Wine doesn't schedule threads, the
> > Linux kernel does.
> He didn't say wine scheduled the threads. He said how wine *treats*
> that scheduling. Which makes sense. You have to figure out how to sync
> all the threads in an app, and then compare how to sync the different
> apps to emulate the scheduling -- if you don't, then you end up with
> desynced threads, garbling video, audio, keyboard handling, processing,
You're talking about synchronization mechanisms, not about scheduling.
But now that you've mentioned it, I've been wondering for a while if
Windows-model threading could be simulated by the wineserver by having
it SIGSTOP-suspend low-priority threads when any high-priority threads
are running, then SIGCONT-resume them whenever the high-priority threads
gets into blocking waits? Should be doable in wineserver, but would it
be a good idea?
More information about the wine-devel