From owner-freebsd-hackers Sat Mar 13 6:37:37 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bingsun1.cc.binghamton.edu (bingsun1.cc.binghamton.edu [128.226.1.2]) by hub.freebsd.org (Postfix) with ESMTP id 8146B14D4F for ; Sat, 13 Mar 1999 06:37:34 -0800 (PST) (envelope-from bf20761@binghamton.edu) Received: from localhost by bingsun1.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id JAA12981 for ; Sat, 13 Mar 1999 09:37:14 -0500 (EST) X-Authentication-Warning: bingsun1.cc.binghamton.edu: bf20761 owned process doing -bs Date: Sat, 13 Mar 1999 09:37:14 -0500 (EST) From: zhihuizhang X-Sender: bf20761@bingsun1 To: freebsd-hackers@FreeBSD.ORG Subject: Kernel-internal process vs. user deamon 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 Hi, I need some advice on how to design a system service. I can think of three choices: (1) Implement the system service as a kernel internal process. Since FreeBSD 2.2.8 kernel is not multithreaded, this means for each request we must create a process. This can add a lot of context switch overhead. I wonder if by using a kernel process, I can get a higher priority. (2) Implement the system service as a user-level process. This way, I can make use of the multi-threaded feature available at the user level. I do not know whether I can make a user process has at least the same priority as a kernel process and how to make the user-level process running as a deamon (has no controlling terminal). (3) Implement the system service directly in the interrupt handling routine. This saves scheduling overhead and can repond quickly. But I guess that this technique can be more tricky and error prone. I do not have very intimate knowledge of FreeBSD kernel, so I hope I can get some precious advice/hints on these tentative ideas. Any help is highly appreciated. -------------------------------------------------- | Zhihui Zhang, http://cs.binghamton.edu/~zzhang | | Dept. of Computer Science, SUNY at Binghamton | -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message