Smx/Minix Booting Sequence

This document talks about the booting sequence for the Minix Operating system. This will help the students to understand the key processes and the programs that are invoked during the booting process. Please use the document to understand the booting sequence for Minix. I have illustrated the key points:

1.  The minix program processes the config file, sets up file descriptors used in device emulation, allocates the smx memory area, loads kernel, mm, fs, inet, init into it, jumps into kernel.

2.  A small SunOS program (minix) is responsible for processing a configuration file,

allocating memory for SunOS Minix, loading and relocating the SunOS Minix \image then jumping to the startup code within the SunOS Minix kernel proper.

3.  minix allocates the requested amount of memory in the data segment of the SunOS process, and loads the image, consisting of kernel, mm, fs and init, at the beginning of the area allocated.

4.  Amongst other initialization steps, kernel creates an initial process table containing all layers 2 and 3 processes and init. restart called to schedule first process.

5.  Each task runs its initialization code, then blocks waiting for a message. Each server runs its initialization code, then blocks waiting for a message.

6.  Finally init runs. It executes /etc/rc (mounts file systems, starts daemons) then creates getty processes for each terminal line.

Booting has mainly 2 phases:

1.  Minix Phase: The various operations are as follows

•Read the configuration file, open various devices on well – known (to minix and kernel) SunOS descriptors.

•A child process is created that will run the Solaris minix.

•The child creates a temporary file that is the same size as minix physical memory and maps to child’s address space at the virtual address assigned to the beginning of kernel’s text segment.

•A bootinfo structure at the start of kernel data segment is filled in.

•Execution then switches to kernel entry point

2.  Kernel Phase: The various operations are as follows

  The kernel entry point is in a small piece of assembler code that sets the stack pointer to layer 1 stack, and then calls the C function “main”(main.c).

 Then the standard pieces of code that are added to the boot sequence involve the setting up the handling of SunOS signals, and setting up of memory protection