I have never really found anything that would
suggest what order to generally follow AFTER
booting. When the kernel is enabling its timers,
etc. What is the best order to load things like
Memory Management, timer, Scheduler, etc? Does
any one know a website that discusses which should
come first, etc?
Order of operations?
RE:Order of operations?
>On 2002-04-18 11:26:21, Anonymous wrote:
>I have never really found anything that would
>suggest what order to generally follow AFTER
>booting. When the kernel is enabling its timers,
>etc. What is the best order to load things like
>Memory Management, timer, Scheduler, etc? Does
>any one know a website that discusses which should
>come first, etc?
There's no general rule... every OS does it slightly
differently. I would suggest getting the bare
bones systems up and running first (the idt, pic,
gdt, etc), and then systematically add interrupts
for basic devices (the timer, keyboard, etc).
I would also suggest getting memory management
(even a basic system) up and running fairly
quickly, simply because the more complex your
kernel and modules, etc, the more work you have
to do in your initial memory init code to flag
all used space as flagged, and assign it properties,
and all that.
In other words, its easier to set up memory
management code when very little memory is actually
in use.
Jeff
>I have never really found anything that would
>suggest what order to generally follow AFTER
>booting. When the kernel is enabling its timers,
>etc. What is the best order to load things like
>Memory Management, timer, Scheduler, etc? Does
>any one know a website that discusses which should
>come first, etc?
There's no general rule... every OS does it slightly
differently. I would suggest getting the bare
bones systems up and running first (the idt, pic,
gdt, etc), and then systematically add interrupts
for basic devices (the timer, keyboard, etc).
I would also suggest getting memory management
(even a basic system) up and running fairly
quickly, simply because the more complex your
kernel and modules, etc, the more work you have
to do in your initial memory init code to flag
all used space as flagged, and assign it properties,
and all that.
In other words, its easier to set up memory
management code when very little memory is actually
in use.
Jeff
RE:Order of operations?
>On 2002-04-18 11:26:21, Anonymous wrote:
>What is the best order to load things like
>Memory Management, timer, Scheduler, etc?
The order of the FreeBSD (www.freebsd.org) boot procedure follows (from sys/kernel.h):
SI_SUB_DUMMY = 0x0000000, /* not executed; for linker*/
SI_SUB_DONE = 0x0000001, /* processed*/
SI_SUB_CONSOLE = 0x0800000, /* console*/
SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/
SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */
SI_SUB_VM = 0x1000000, /* virtual memory system init*/
SI_SUB_KMEM = 0x1800000, /* kernel memory*/
SI_SUB_KVM_RSRC = 0x1A00000, /* kvm operational limits*/
SI_SUB_CPU = 0x2000000, /* CPU resource(s)*/
SI_SUB_KLD = 0x2100000, /* KLD and module setup */
SI_SUB_INTRINSIC = 0x2200000, /* proc 0*/
SI_SUB_DEVFS = 0x2300000, /* get DEVFS ready */
SI_SUB_DRIVERS = 0x2400000, /* Let Drivers initialize */
SI_SUB_CONFIGURE = 0x2500000, /* Configure devices */
SI_SUB_RUN_QUEUE = 0x3000000, /* the run queue*/
SI_SUB_VM_CONF = 0x3800000, /* config VM, set limits*/
SI_SUB_VFS = 0x4000000, /* virtual file system*/
SI_SUB_CLOCKS = 0x4800000, /* real time and stat clocks*/
SI_SUB_MBUF = 0x5000000, /* mbufs*/
SI_SUB_CLIST = 0x5800000, /* clists*/
SI_SUB_SYSV_SHM = 0x6400000, /* System V shared memory*/
SI_SUB_SYSV_SEM = 0x6800000, /* System V semaphores*/
SI_SUB_SYSV_MSG = 0x6C00000, /* System V message queues*/
SI_SUB_P1003_1B = 0x6E00000, /* P1003.1B realtime */
SI_SUB_PSEUDO = 0x7000000, /* pseudo devices*/
SI_SUB_EXEC = 0x7400000, /* execve() handlers */
SI_SUB_PROTO_BEGIN = 0x8000000, /* XXX: set splimp (kludge)*/
SI_SUB_PROTO_IF = 0x8400000, /* interfaces*/
SI_SUB_PROTO_DOMAIN = 0x8800000, /* domains (address families?)*/
SI_SUB_PROTO_END = 0x8ffffff, /* XXX: set splx (kludge)*/
SI_SUB_KPROF = 0x9000000, /* kernel profiling*/
SI_SUB_KICK_SCHEDULER = 0xa000000, /* start the timeout events*/
SI_SUB_INT_CONFIG_HOOKS = 0xa800000, /* Interrupts enabled config */
SI_SUB_ROOT_CONF = 0xb000000, /* Find root devices */
SI_SUB_DUMP_CONF = 0xb200000, /* Find dump devices */
SI_SUB_VINUM = 0xb300000, /* Configure vinum */
SI_SUB_MOUNT_ROOT = 0xb400000, /* root mount*/
SI_SUB_ROOT_FDTAB = 0xb800000, /* root vnode in fd table...*/
SI_SUB_SWAP = 0xc000000, /* swap*/
SI_SUB_INTRINSIC_POST = 0xd000000, /* proc 0 cleanup*/
SI_SUB_KTHREAD_INIT = 0xe000000, /* init process*/
SI_SUB_KTHREAD_PAGE = 0xe400000, /* pageout daemon*/
SI_SUB_KTHREAD_VM = 0xe800000, /* vm daemon*/
SI_SUB_KTHREAD_BUF = 0xea00000, /* buffer daemon*/
SI_SUB_KTHREAD_UPDATE = 0xec00000, /* update daemon*/
SI_SUB_KTHREAD_IDLE = 0xee00000, /* idle procs*/
SI_SUB_SMP = 0xf000000, /* idle procs*/
SI_SUB_RUN_SCHEDULER = 0xfffffff /* scheduler: no return*/
>What is the best order to load things like
>Memory Management, timer, Scheduler, etc?
The order of the FreeBSD (www.freebsd.org) boot procedure follows (from sys/kernel.h):
SI_SUB_DUMMY = 0x0000000, /* not executed; for linker*/
SI_SUB_DONE = 0x0000001, /* processed*/
SI_SUB_CONSOLE = 0x0800000, /* console*/
SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/
SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */
SI_SUB_VM = 0x1000000, /* virtual memory system init*/
SI_SUB_KMEM = 0x1800000, /* kernel memory*/
SI_SUB_KVM_RSRC = 0x1A00000, /* kvm operational limits*/
SI_SUB_CPU = 0x2000000, /* CPU resource(s)*/
SI_SUB_KLD = 0x2100000, /* KLD and module setup */
SI_SUB_INTRINSIC = 0x2200000, /* proc 0*/
SI_SUB_DEVFS = 0x2300000, /* get DEVFS ready */
SI_SUB_DRIVERS = 0x2400000, /* Let Drivers initialize */
SI_SUB_CONFIGURE = 0x2500000, /* Configure devices */
SI_SUB_RUN_QUEUE = 0x3000000, /* the run queue*/
SI_SUB_VM_CONF = 0x3800000, /* config VM, set limits*/
SI_SUB_VFS = 0x4000000, /* virtual file system*/
SI_SUB_CLOCKS = 0x4800000, /* real time and stat clocks*/
SI_SUB_MBUF = 0x5000000, /* mbufs*/
SI_SUB_CLIST = 0x5800000, /* clists*/
SI_SUB_SYSV_SHM = 0x6400000, /* System V shared memory*/
SI_SUB_SYSV_SEM = 0x6800000, /* System V semaphores*/
SI_SUB_SYSV_MSG = 0x6C00000, /* System V message queues*/
SI_SUB_P1003_1B = 0x6E00000, /* P1003.1B realtime */
SI_SUB_PSEUDO = 0x7000000, /* pseudo devices*/
SI_SUB_EXEC = 0x7400000, /* execve() handlers */
SI_SUB_PROTO_BEGIN = 0x8000000, /* XXX: set splimp (kludge)*/
SI_SUB_PROTO_IF = 0x8400000, /* interfaces*/
SI_SUB_PROTO_DOMAIN = 0x8800000, /* domains (address families?)*/
SI_SUB_PROTO_END = 0x8ffffff, /* XXX: set splx (kludge)*/
SI_SUB_KPROF = 0x9000000, /* kernel profiling*/
SI_SUB_KICK_SCHEDULER = 0xa000000, /* start the timeout events*/
SI_SUB_INT_CONFIG_HOOKS = 0xa800000, /* Interrupts enabled config */
SI_SUB_ROOT_CONF = 0xb000000, /* Find root devices */
SI_SUB_DUMP_CONF = 0xb200000, /* Find dump devices */
SI_SUB_VINUM = 0xb300000, /* Configure vinum */
SI_SUB_MOUNT_ROOT = 0xb400000, /* root mount*/
SI_SUB_ROOT_FDTAB = 0xb800000, /* root vnode in fd table...*/
SI_SUB_SWAP = 0xc000000, /* swap*/
SI_SUB_INTRINSIC_POST = 0xd000000, /* proc 0 cleanup*/
SI_SUB_KTHREAD_INIT = 0xe000000, /* init process*/
SI_SUB_KTHREAD_PAGE = 0xe400000, /* pageout daemon*/
SI_SUB_KTHREAD_VM = 0xe800000, /* vm daemon*/
SI_SUB_KTHREAD_BUF = 0xea00000, /* buffer daemon*/
SI_SUB_KTHREAD_UPDATE = 0xec00000, /* update daemon*/
SI_SUB_KTHREAD_IDLE = 0xee00000, /* idle procs*/
SI_SUB_SMP = 0xf000000, /* idle procs*/
SI_SUB_RUN_SCHEDULER = 0xfffffff /* scheduler: no return*/