From owner-freebsd-hackers Sun Dec 20 13:33:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA24178 for freebsd-hackers-outgoing; Sun, 20 Dec 1998 13:33:13 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bright.fx.genx.net (bright.fx.genx.net [206.64.4.154]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA24171 for ; Sun, 20 Dec 1998 13:33:11 -0800 (PST) (envelope-from bright@hotjobs.com) Received: from localhost (bright@localhost) by bright.fx.genx.net (8.9.1/8.9.1) with ESMTP id QAA17785 for ; Sun, 20 Dec 1998 16:36:52 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: bright.fx.genx.net: bright owned process doing -bs Date: Sun, 20 Dec 1998 16:36:51 -0500 (EST) From: Alfred Perlstein X-Sender: bright@bright.fx.genx.net To: hackers@FreeBSD.ORG Subject: question about re-entrancy. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm a bit confused. I've been watching the discussions going on about SMP. The issue of kernel re-entrancy has been brought up many times. So here's the question: I thought the kernel was re-entrant, when a process makes a syscall it's thread of execution enters the kernel where its arguments are validated and careful checks are done to ensure security then the syscall is done. If during the system call the process is put to sleep or rescheduled, another process may enter the kernel. As long as the splxxx() calls do not interfere with each other you have 2 processes excuting in the kernel at that point. (more can enter as well) Or.... what i'm now thinking is that once a process enters the kernel it must run until it exits the system call. I have a problem with this though, processes such as nfsiod/nfsd enter the kernel through a syscall and never exit (according to design and implementation) how then are other processes allowed into the kernel? Can anyone explain this a bit better? I understand deadlock can occur if something like this happens: process 1 process 2 syscall() splbio() rescheduled -----> syscall() splimp() <----- rescheduled splimp()? -no,reschedule-> <-no,reschedule- splbio()? splimp()? -no,reschedule-> splbio()? some sorta flipflop deadlock happens at this point as nested locks are held and won't be released as two in kernel processes never relinquish resources. Or are the spl calls simply there to diable interupts? but that brings me back to the question about "well how do nfsd and nfsiod do it?" Perhaps once an spl is initiated the process can not block? the more I thought about this, the more my head ached :) Mike, Terry, Matt, John? thanks, Alfred Perlstein - Programmer, HotJobs Inc. - www.hotjobs.com -- There are operating systems, and then there's FreeBSD. -- http://www.freebsd.org/ 3.0-current To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message