Article View: borland.public.jbuilder.java.language
Article #8579OS differences when running Threads
From: Tim
Date: Sat, 17 Mar 2001 00:16
Date: Sat, 17 Mar 2001 00:16
10 lines
1723 bytes
1723 bytes
I've encountered some peculiar differences between running multithreaded programs under NT 4.0 and running the same programs under Win2K. The first program has a bunch of balls bouncing around in a frame. Under NT, when I've created only one ball, its movement is a little sluggish, but as soon as I add more balls, they all move along just fine. Under 2K, having just one ball isn't slow, but often, as I add balls to the screen, some of them will be moving around smoothly, while others move very jerkily, as though they're only occasionally getting time on the processor. The second program is one that is supposed to demonstrate the possibility of getting a race condition and is taken from the Core Java book. Ten threads are moving money between different accounts, but the total over all accounts should remain the same. Under NT, discrepancies occur immediately. Under 2K, no discrepancies ever occur. Any insight or enlightenment would be appreciated. Tim
Technical Details
Message-ID:
<3ab2acd2$1_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!207.105.83.65Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,e43448a2cc117603,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-16 16:46:20 PST From: "Tim" <talcon@acm.org> Sender: "Tim" <talcon@acm.org> Reply-To: "Tim" <talcon@acm.org> Subject: OS differences when running Threads Newsgroups: borland.public.jbuilder.java.language X-User-Info: 12.43.56.174 12.43.56.174 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ab2acd2$1_1@dnews> Date: 16 Mar 2001 16:16:18 -0800 X-Trace: 16 Mar 2001 16:16:18 -0800, 207.105.83.65 Lines: 11 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!207.105.83.65