Date: 26 Feb 1998 13:43:31 -0600 From: stephen farrell <stephen@farrell.org> To: "Alfred Perlstein" <perlsta@cs.sunyit.edu> Cc: <hackers@FreeBSD.ORG> Subject: Re: so how goes java? Message-ID: <87u39mrw2k.fsf@phaedrus.uchicago.edu> In-Reply-To: "Alfred Perlstein"'s message of "Wed, 25 Feb 1998 19:05:04 -0500" References: <02f901bd424a$33dd5bc0$0600a8c0@win95.local.sunyit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
"Alfred Perlstein" <perlsta@cs.sunyit.edu> writes: > >> >They are not pre-emptive. > >> > >> (figures since until recently the SUN version was also co-operative) > >> one of my first things (besides fixing this problem) is to look into > native > >> threads, co-operative multitasking is an oxymoron. > >> i also plan on having several snapshots of 3.0 compiled versions of the > >> port. i'll inform the porting team when my NDA is all set and good. > > > >Do not confuse call conversion threading with Yield-based threading. > > > >Though call conversion threading is non-preemptive, one thread will > >not be blocked simply because another thread has made a blocking > >call. This is the point of call conversion. > > > >Kernel threading buys you SMP scalability (assuming there is ever > >code changes checked in to ensure thread-CPU affinity), and a much > >higher context switch overhead. > > ummm I think you just caused my brain to hemorrhage... :) > but let me try to rephrase that just to make sure i understand. > > if we have 2 threads busy looping, for instance just printing "i'm thread A" > and "i'm thread B", whichever thread starts first will not allow the other > thread to execute, correct? > > however if one thread tries to do a disk access or something that could > possibly block like a socket operation, the other thread will be allowed to > start executing? > > ok, so what do I need to do to get a situation where the threads would > alternate printing "i'm thread A" and "i'm thread B" when they are just busy > looping? I'm assuming you're still talking about java... if so, then the o'reilly java threads book covers many of these issues rather effectively... setting up a high-priority scheduler thread, as nate suggested, is covered in there. in fact, you might find such examples from the book at the ora website. -- Steve Farrell To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87u39mrw2k.fsf>