Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 1999 09:37:14 -0500 (EST)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Kernel-internal process vs. user deamon
Message-ID:  <Pine.SOL.L3.93.990313092727.12830A-100000@bingsun1>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.990313092727.12830A-100000>