Date: Tue, 19 Jan 1999 13:14:45 -0500 (EST) From: zhihuizhang <bf20761@binghamton.edu> To: Sabrina Minshall <sabrina@accesscom.com> Cc: hackers <freebsd-hackers@FreeBSD.ORG> Subject: Re: stack info Message-ID: <Pine.SOL.L3.93.990119130428.10398B-100000@bingsun2> In-Reply-To: <199901190433.UAA13330@shell.accesscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 18 Jan 1999, Sabrina Minshall wrote: > Hi Zhihui, > > Since you're hot off this topic, I have a question. > > 1. When a process enters kernel mode (via system call) what > stack is used (in the top half)? is it a common stack to all > processes or is it per process? Where is it located? I have not read that part of the source code. As I understand it, the stack you use when you enter into kernel mode is the kernel stack. It is a per-process resource. It should be at the top of the u-area. In FreeBSD, I think the size of the u-area is two pages. > > 2. When the kernel is executing in the botton half, what stack is used? > is it kstack, or tmpstk? kstack is the kernel stack. tmpstk is used when the CPU is idle (see swtch.s). I am not sure what stack is used when an interrupt happens (the kernel is executing in the bottom half). However, since the interrupt handler does not have a process context, it should not use kstack. Maybe there is a third stack reserved for it or it could use tmpstk? > > 3. Does the kernel have multiple stacks for in the bottom half? Like > interrupt stack, etc? > I am not sure about this. See above. Zhihui Zhang ------------ 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.990119130428.10398B-100000>