Re: thread priorities?
[email protected] (Don Cohen)
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
> As of now - no. There is no way to specify or change threads priorities. > There are several caveats: > 1. We have to unify what priority means across platforms. On Win32 we > have just SetThreadPriority... So far I don't know what exactly all of these things do. But I guess the best that can be done is use what the platform provides and put a short description and a link in the clisp doc. > 2. On Linux in order process to be allowed to change scheduling > policy/priority of thread it needs CAP_SYS_NICE capability > (http://linux.die.net/man/7/capabilities). By default it is available > only to privileged (root) processes. So if you just download/build > clisp and run it as non-root you will not be able to change the > priority. I'd have expected that you start a process with a given priority (and perhaps can change that from outside the process), and then within the process you can set thread priorities up to the process priority. > 3. IMO, generally playing with threads priorities is bad idea. There > are very few cases where it makes sense (e.g. communication with > devices when protocol timing is important). Also note that garbage > collection is "stop-the-world" i.e. all threads are suspended during > GC. Yes, I see that GC is a concern. I'd expect this to run in the process (highest available) priority. What I really wanted to do was start a separate thread to do a long computation and LOWER its priority. What I was observing is that my machine would become unresponsive during occasional data dumps. > I am not against implementing it but i would set the task with low > priority :). I was imagining that it would at least be easy to do. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel