Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail From: "Patricia Shanahan" Subject: Re: How can you make idle processors pick up java work? Message-ID: <50181D66.55765.calajapr@time.synchro.net> X-Comment-To: qwertmonkey Newsgroups: comp.lang.java.programmer In-Reply-To: <50181D65.55759.calajapr@time.synchro.net> References: <50181D65.55759.calajapr@time.synchro.net> X-FTN-AREA: COMP.LANG.JAVA.PROGRAMMER X-FTN-MSGID: 1:261/38 bb588d2f X-FTN-REPLY: 1:261/38 5893f981 Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98] Lines: 26 Date: Tue, 31 Jul 2012 18:02:39 GMT NNTP-Posting-Host: 69.21.70.65 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1343757759 69.21.70.65 (Tue, 31 Jul 2012 13:02:39 CDT) NNTP-Posting-Date: Tue, 31 Jul 2012 13:02:39 CDT Organization: tds.net Xref: csiph.com comp.lang.java.programmer:16797 To: qwertmonkey From: Patricia Shanahan On 7/31/2012 12:14 AM, qwertmonkey@syberianoutpost.ru wrote: ... > I don't think this would make sense. All sentences are short and all I > need to do is basically scan them and use look-up tables to do some tinkering > with the code points. The scheduling of threads and constant context switching > will most probably make things slower What context switching? This started out as a question about spare processors sitting idle while there is work to do. Step 1 is to decide whether this workload is CPU bound or I/O bound. I assumed CPU bound because of the initial question about idle processors, but now it sounds as though the processing is trivial so the workload may be I/O bound. If it is I/O bound you may not need more than one thread, but maybe should be looking at using non-blocking I/O to manage your own prefetches. Patricia --- BBBS/Li6 v4.10 Dada-1 * Origin: Prism bbs (1:261/38) --- Synchronet 3.16a-Win32 NewsLink 1.98 Time Warp of the Future BBS - telnet://time.synchro.net:24