2. Kernel
The UNIX kernel is the base of the UNIX operating system. Processes do not happen in the kernel, rather they do things through the kernel (i.e. a process cant write to the disk, it has to go through the kernel, because only the kernel has direct access to any hardware.) When a process needs the kernel, it will do it, then go to another process until the new process requires the kernel, or its time slice (amount of time allocated to processes) has run out.
The steps to booting up on UNIX:
(Hardware or PROM)
Power On Self-Test
Banner (from /etc/motd)
Boot-devices:
Loads bootblock
Uses UFS (UNIX File System) (how to)
Name of next file to run (/platform/sun44/ufsboot)
Loads ufsboot (/platform/sun44/ufsboot)
Shows name of kernel (/kernel/genunix is generic UNIX)
Load kernel
Init kernel
Mount / (root)
Start init
What is init - /etc/inittab tells how to do each run level
What is init kernel - /platform (either Sun4m, Sunf4c, or Sun4u [4c = classic, 4u = ultrasparc) tells about each separate piece of hardware and how it interacts (genunix is for all hardware)
The following is a list of directories that are located in the /kernel directory, and what they are for:
/kernel/fs shows different file systems
/kernel/drv shows different drivers
/kernel/exec shows different executables
/kernel/genunix shows generic UNIX
/usr/kernel - also holds kernel information
The following are some commands that apply to the kernel
Note a module is a program loaded in the kernel, similar to a TSR in DOS computers
modinfo lists all current kernel modules
modunload i 96 takes out all mods (96 number of mod takes out just the specified mod)
modunload l 0 unloads all mods not in use
Mods to kernels
(cp * /kernel) load new mods copy new on to /kernel and correct subdirectory
change variable = vi /etc/system (edit it)
The kernel is a program
genunix and sun4u/kernel together are the static core, many variables are not what they appear to be
Module variables only effect the module they are in
Rebooting (init 6) unloads and reloads the kernel
To get around having no /system file or a bad one do the following:
Go to ok> prompt and type boot a
When in interactive mode, just hit defaults all the way until you get to system file [etc/system] and type dev/null
The roles of the kernel are to control processes, control I/O (input/output) devices, manage RAM, and run file systems. (processes are called by other processes)
Go to Chapter 1
Go to Index
Go to Chapter 3