Shutting down the operating system without using the API

I tried to add a shutdown function to my home OS, but I don't have such an API yet. I was wondering how does the OS terminate? I would appreciate it if someone could give me some guidance to get started.

+3


source to share


1 answer


Your low-level hardware shutdown code will vary by architecture. To disable i386 device with BIOS, INT 15h is a vector that is ultimately used by OS monitors.

You should consider APM and ACPI schemes for power management, graceful disconnection of power-controlled peripherals, and power consumption considerations in multiprocessor systems.



I expect others to provide answers to help you learn Linux APM and ACPI code. In i386 kernels, there is a very simple apm_power_off () function in arch / x86 / kernel / apm_32.c that disables INT 15.

+6


source







All Articles