From owner-doc-jp@jp.freebsd.org  Sat May  5 16:10:58 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id QAA97634;
	Sat, 5 May 2001 16:10:58 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from mercury.ikeno.org (z211-19-83-249.dialup.wakwak.ne.jp [211.19.83.249])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id QAA97627
	for <doc-jp@jp.freebsd.org>; Sat, 5 May 2001 16:10:56 +0900 (JST)
	(envelope-from nao@mc.kcom.ne.jp)
Received: from localhost (localhost [127.0.0.1])
	by mercury.ikeno.org (8.11.3/8.11.3) with ESMTP id f457Atx34753
	for <doc-jp@jp.freebsd.org>; Sat, 5 May 2001 16:10:56 +0900 (JST)
	(envelope-from nao@mc.kcom.ne.jp)
To: doc-jp@jp.freebsd.org
In-Reply-To: <20010505.041103.104025248.hrs@eos.ocn.ne.jp>
References: <20010505.041103.104025248.hrs@eos.ocn.ne.jp>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Sat_May__5_16:10:41_2001_809)--"
Content-Transfer-Encoding: 7bit
Message-Id: <20010505161043W.nao@mc.kcom.ne.jp>
Date: Sat, 05 May 2001 16:10:43 +0900
From: IKENO Naoki <nao@mc.kcom.ne.jp>
X-Dispatcher: imput version 20000228(IM140)
Lines: 150
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: doc-jp 8167
Subject: [doc-jp 8167] Re: Call for Translators
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: nao@mc.kcom.ne.jp

----Next_Part(Sat_May__5_16:10:41_2001_809)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit


 $B$3$s$K$A$O!"CSLn$G$9!#(B

 $B$h$&$d$/0-KbK\K.Lu$,=P$k$N$O4r$7$$$G$9$M!#(B
 $B$G!"$J$s$H$J$/8+$F$$$F(B book.3.sgml $B$rK]Lu$7$^$7$?!#(B
#$BK\Ev$OJL$NJY6/$r$7$F$k$O$:$@$C$?$N$G$9$,(B ;-p

 $B4V0c$($F$kItJ,$,$"$k$H;W$$$^$9$N$G!"$?$?$$$F2<$5$$!#(B
-----
IKENO Naoki
Mail: nao@mc.kcom.ne.jp



----Next_Part(Sat_May__5_16:10:41_2001_809)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="book.3ch.sgml"

    <sect1>
      <title>Kernel Services</title>
      <title>$B%+!<%M%k(B $B%5!<%S%9(B</title>
      
      <para>The boundary between the kernel- and user-level code is enforced by
	hardware-protection facilities provided by the underlying hardware.
        $B%+!<%M%k$H%f!<%6%l%Y%k$N%3!<%I4V$N6-3&$O(B, $B%O!<%I%&%'%"$K$h$C$F(B
        $BDs6!$5$l$k%O!<%I%&%'%"J]8n5!G=$K$h$C$F6/2=$5$l$^$9(B.

	The kernel operates in a separate address space that is inaccessible to
	user processes.
	Privileged operations -- such as starting I/O
	and halting the central processing unit
	(CPU) --
	are available to only the kernel.
        $B%+!<%M%k$O(B, $B%f!<%6!&%W%m%;%9$K$H$C$F%"%/%;%9$7$K$/$$@Z$jN%$5$l$?(B
        $B%"%I%l%96u4V$G:nF0$7$^$9(B. $BFC8"$N$"$k%*%Z%l!<%7%g%s(B --$B$?$H$($P(B
        I/O $B$K;O$^$j(B, $BCf1{=hM}AuCV(B (CPU) $B$rDd;_$5$;$k$h$J(B--, 
        $B$O%+!<%M%k$@$1$KMxMQ2DG=$G$9(B.

	Applications request services from the kernel with
	<emphasis>system calls</emphasis>
	System calls are used to cause the kernel to execute complicated
	operations, such as writing data to secondary storage,
	and simple operations, such as returning the current time of day.
        $B%"%W%j%1!<%7%g%s$O(B<emphasis>$B%7%9%F%`%3!<%k(B</emphasis>$B$r%+!<%M%k$K(B
        $BMW5a$7$^$9(B. $B%7%9%F%`%3!<%k$OBh#25-21AuCV$K%G!<%?$r=q$-9~$`$h$&$J(B
        $BJ#;($J:n6H$d(B, $B8=:_$NF|;~$rJV$9$h$&$JC1=c$J:n6H$r%+!<%M%k$K(B
        $B<B9T$5$;$k$?$a$K;HMQ$5$l$^$9(B. 

	All system calls appear
	<emphasis>synchronous</emphasis>
	to applications:
	The application does not run while the kernel does the actions associated
	with a system call.
        $B$9$Y$F$N%7%9%F%`%3!<%k$O%"%W%j%1!<%7%g%s$H(B<emphasis>$BF14|$7$F(B</emphasis>
        $BH/@8$7$^$9(B. $B%"%W%j%1!<%7%g%s$O%+!<%M%k$,%7%9%F%`%3!<%k$K4XO"$7$?(B
        $BF0:n$r$7$F$$$k$H$-$K$O<B9T$5$l$^$;$s(B.
	
        The kernel may finish some operations associated with a system call
	after it has returned.
        $B%+!<%M%k$O%7%9%F%`%3!<%k$,La$C$?8e(B, $B$=$l$K4X$9$k$$$/$D$+$N:n6H$r(B
        $B=*N;$9$k$+$b$7$l$^$;$s(B.
	
        For example, a
	<emphasis>write</emphasis>
	system call will copy the data to be written
	from the user process to a kernel buffer while the process waits,
	but will usually return from the system call
	before the kernel buffer is written to the disk.
        $BNc$($P(B, <emphasis>wirte</emphasis>$B%7%9%F%`%3!<%k$O(B, $B%W%m%;%9$,(B
        $BBT$C$F$$$k4V$K%f!<%6%W%m%;%9$+$i%+!<%M%k%P%C%U%!!<$K=q$-9~$^$l$F$$$k(B
        $B%G!<%?$r%3%T!<$7$h$&$H$7$^$9$,(B, $B$?$$$F$$%+!<%M%k%P%C%U%!!<$,%G%#%9%/$K(B
        $B=q$-9~$^$l$kA0$K%7%9%F%`%3!<%k$+$iLa$C$F$/$k$G$7$g$&(B.
</para>
      
      <para>A system call usually is implemented as a hardware trap that changes the
	CPU's
	execution mode and the current address-space mapping.
        $BDL>o%7%9%F%`%3!<%k$O(B, CPU $B$N<B9T%b!<%I$*$h$S8=:_$N%"%I%l%96u4V(B
        $B%^%C%T%s%0$rJQ99$9$k%O!<%I%&%'%"%H%i%C%W$H$7$F<B9T$5$l$^$9(B.

	Parameters supplied by users in system calls are validated by the kernel	before being used.
        $B%7%9%F%`%3!<%kCf$N%f!<%6$K$h$C$FM?$($i$l$?%Q%i%a!<%?!<$O(B, 
        $B;HMQ$5$l$kA0$K%+!<%M%k$K$h$C$FM-8z$K$5$l$^$9(B.

	Such checking ensures the integrity of the system.
        $B$=$N$h$&$J%A%'%C%/$O%7%9%F%`$N40A4@-$rJ]>Z$7$^$9(B.

	All parameters passed into the kernel are copied into the
	kernel's address space,
	to ensure that validated parameters are not changed
	as a side effect of the system call.
        $B%+!<%M%k$XEO$5$l$?%Q%i%a!<%?!<$O$9$Y$F(B, $B%7%9%F%`%3!<%k$NI{:nMQ$H$7$F(B
        $BM-8z$K$J$C$?%Q%i%a!<%?!<$,JQ99$5$l$J$$$3$H$rJ]>Z$9$k$?$a$K%+!<%M%k$N(B
        $B%"%I%l%96u4V$K%3%T!<$5$l$^$9(B.

	System-call results are returned by the kernel,
	either in hardware registers or by their values
	being copied to user-specified memory addresses.
        $B%7%9%F%`%3!<%k$N7k2L$O(B, $B%+!<%M%k$K$h$C$F%O!<%I%&%'%"%l%8%9%?$+(B, 
        $B$"$k$$$O%f!<%6;XDj$N%a%b%j%"%I%l%9$K%3%T!<$5$l$F$$$kCM$KJV$5$l$^$9(B.

	Like parameters passed into the kernel,
	addresses used for
	the return of results must be validated to ensure that they are
	part of an application's address space.
        $B%+!<%M%k$XEO$5$l$?%Q%i%a!<%?!<$N$h$&$K(B, $B7k2L$rLa$9$?$a$K(B
        $B;HMQ$5$l$?%"%I%l%9$O$=$l$i$,%"%W%j%1!<%7%g%s$N%"%I%l%96u4V$N(B
        $B0lIt$G$"$k$3$H$r3N<B$K$9$k$?$a$K3NG'$5$l$J$1$l$P$J$j$^$;$s(B.

	If the kernel encounters an error while processing a system call,
	it returns an error code to the user.
        $B%+!<%M%k$,%7%9%F%`%3!<%k$r=hM}$9$k4V$K%(%i!<$KAx6x$9$k>l9g(B, $B$=$l$O(B
        $B%f!<%6$K%(%i!<%3!<%I$rJV$7$^$9(B.

	For the
	C programming language, this error code
	is stored in the global variable
	<emphasis>errno</emphasis>,
	and the function that executed the system call returns the value -1.
        C$B%W%m%0%i%_%s%08@8l$K$D$$$F$O(B, $B$3$N%(%i!<%3!<%I$,%0%m!<%P%kJQ?t(B
        <emphasis>errno</emphasis>$B$K3JG<$5$l$^$9(B. $B$^$?(B, $B%7%9%F%`%3!<%k$r(B
        $B<B9T$7$?5!G=$O(B -1 $B$NCM$rJV$7$^$9(B.</para>

      <para>User applications and the kernel operate
	independently of each other.
        $B%f!<%6%"%W%j%1!<%7%g%s$*$h$S%+!<%M%k$O8_$$$KL54X78$K:nF0$7$^$9(B.

	4.4BSD does not store I/O control blocks or other
	operating-system-related
	data structures in the application's address space.
        4.4BSD$B$O%"%W%j%1!<%7%g%s$N%"%I%l%96u4V$K(BI/O$B%3%s%H%m!<%k%V%m%C%/(B
        $B$"$k$$$O%*%Z%l!<%F%#%s%0%7%9%F%`$K4XO"$9$kB>$N%G!<%?9=B$$r3JG<$7$^$;$s(B.

	Each user-level application is provided an independent address space in
	which it executes.
        $B3F%f!<%6%l%Y%k$N%"%W%j%1!<%7%g%s$O(B, $B$=$l$r<B9T$9$k$?$aFH<+$N(B
        $B%"%I%l%96u4V$r6!5k$5$l$^$9(B.

	The kernel makes most state changes,
	such as suspending a process while another is running,
	invisible to the processes involved.
        $B%+!<%M%k$OJL$N%W%m%;%9$,Av$C$F$$$k4V(B, $BI=$K$G$F$3$J$$4X78$"$k%W%m%;%9(B
        $B$r%5%9%Z%s%I$9$k$h$&$JB?$/$N>uBV$NJQ99$r$7$F$$$^$9(B.</para>

----Next_Part(Sat_May__5_16:10:41_2001_809)----
