From owner-freebsd-java Mon Aug 27 12:44:17 2001 Delivered-To: freebsd-java@freebsd.org Received: from matsulab.is.titech.ac.jp (matsulab.is.titech.ac.jp [131.112.35.129]) by hub.freebsd.org (Postfix) with ESMTP id 1E42D37B401 for ; Mon, 27 Aug 2001 12:44:12 -0700 (PDT) (envelope-from fuyuhik8@is.titech.ac.jp) Received: from tripper.private by matsulab.is.titech.ac.jp (8.8.8+Sun/3.7W) id EAA21585; Tue, 28 Aug 2001 04:44:02 +0900 (JST) Date: Tue, 28 Aug 2001 04:46:28 +0900 Message-ID: <55itf9cmln.wl@tripper.private> From: Fuyuhiko Maruyama To: Arun Sharma Cc: Fuyuhiko Maruyama , java@FreeBSD.ORG Subject: Re: JVM and native threads In-Reply-To: <20010827095624.B14875@sharmas.dhs.org> References: <20010824233304.A32099@sharmas.dhs.org> <55vgjcqv87.wl@tripper.private> <20010825095746.A1015@sharmas.dhs.org> <55heuv0xtl.wl@tripper.private> <20010826171010.A6742@gnuppy> <20010827143244.A12305@misty.eyesbeyond.com> <55k7zqnd1x.wl@tripper.private> <20010827095624.B14875@sharmas.dhs.org> User-Agent: Wanderlust/2.6.0 (Twist And Shout) on XEmacs/21.5.1 (anise) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org At Mon, 27 Aug 2001 09:56:24 -0700, Arun Sharma wrote: > > On Mon, Aug 27, 2001 at 05:04:58PM +0900, Fuyuhiko Maruyama wrote: > > What APIs are needed for ORP, Arun? How do you use NGPT for ORP? > > ORP was written for NT first and then ported to Linux. The approach > they've taken is to emulate NT calls using the POSIX API: > > WaitForSingleObject > CreateEvent > > See /os//os_wrapper.c > > However, the suspend and resume APIs haven't been implemented for > POSIX platforms. > > #if defined(ORP_NT) > > #define SUSPEND_THREAD(orpthread) SuspendThread((orpthread)->thread_handle) > #define RESUME_THREAD(orpthread) ResumeThread((orpthread)->thread_handle) > > #elif defined(ORP_POSIX) > > // Linux asserts if these are called, signal logic TBD > inline DWORD _enum_bad_call(){assert(0); return 1;} > #define SUSPEND_THREAD(orpthread) _enum_bad_call() > #define RESUME_THREAD(orpthread) _enum_bad_call() > Thanks, it is interesting. In fact, it seems quite curious for me because you say nothing about thread's context. So I dig the orp-20010727 sources and found that current ORP doesn't well support Linux platform. Current ORP may cause disaster when GC is happen on Linux, possible senarios are: 1. GC system collects live object refered only by register. 2. GC system moves live objects refered by register and it doesn't treat pointers on register to catch up moving of objects. 3. GC system cannot ensure all threads are suspended at GC safepoint. Do I misunderstand? -- Fuyuhiko MARUYAMA Matsuoka laboratory, Department of Mathematical and Computing Sciences, Graduate School of Information Science and Engineering, Tokyo Institute of Technology. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message