[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: Context Switch
From: Hans Ottevanger <hans () beastielabs ! net>
Date: 2012-03-30 14:20:12
Message-ID: 4F75C11C.3060002 () beastielabs ! net
[Download RAW message or body]
On 03/30/12 15:36, Giovanni Trematerra wrote:
> On Thu, Mar 29, 2012 at 7:18 PM, Mahesh Babu<maheshbabu90@yahoo.co.in> wrote:
> > Which part of the source code in FreeBSD 9 is responsible for making context \
> > switching i.e. storing and restoring the process state.
>
> Context switch is split up in machine indipendent code (MI Code) and
> machine dependent code (MD Code)
>
> For MI part take a look at
> mi_switch in sys/kern/kern_sync.c
> sched_switch in sys/kern/sched_ule.c and sys/kern_4bsd.c depending on
> configurated scheduler in the kernel config file.
>
> For MD part search for symbol cpu_switch inside the specific arch directory.
>
For background information you could read "The Book" (a bit dated but
still quite relevant):
http://www.informit.com/store/product.aspx?isbn=0201702452
And you are especially lucky, since the chapter that is the most
relevant to you is freely available on-line:
http://www.informit.com/articles/article.aspx?p=366888
Kind regards,
Hans Ottevanger
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic