The top half is machine-independent code, and vice versa. Porting an operating system to a new platform should only consist of porting the bottom half. The connection can be made through software interrupts. Specifically, the interrupt table for software interrupts is initialized by the OS to point to code that changes to supervisor mode and calls appropriate OS routines. The ISR returns to the user program.
System calls and interrupts are expensive in processor time.
Converted from groff by Ted Faber Please mail me any problems or comments.