1

Question 1) How do i shutdown my computer? is there any interrupt for this?

Question 2) I heard that acpi power options can be used to shutdown or restart or put the computer to sleep. mode. Well how to do it? are they in form of some routines that can be called? if so how to call them? or are they include in any of the interrupts?

Question 3) suppose when the os is running i press power button which is on the cabinet. then is any irq fired so that my os can prepare and shutdown the computer?

Edit: Here i am talking about my Own OS not windows.

manuhg
  • 360
  • 1
  • 4
  • 16
  • I would just use the methods already mentioned here: http://stackoverflow.com/questions/2019463/shutdown-computer-in-ms-dos-using-acpi – myron-semack Feb 22 '12 at 17:05
  • Voting to close as too broad. Too many questions in one. See also: http://stackoverflow.com/questions/678458/shutdown-the-computer-using-assembly || http://stackoverflow.com/questions/3145569/how-to-power-down-the-computer-from-a-freestanding-environment || http://stackoverflow.com/questions/21463908/x86-instructions-to-power-off-computer-in-real-mode – Ciro Santilli OurBigBook.com Sep 06 '15 at 22:07

2 Answers2

1

Here's a very informative blog post by Matthew Garrett describing how Windows and Linux implement rebooting; I assume shutdown is somewhat similar. In principle, there are many ways which should work. In practice, the problem is that BIOS'es and ACPI implementations are usually crappy and tested only with Windows, so the best way is probably to do as Windows does. Which, per the article I linked, is what Linux also does nowadays.

janneb
  • 36,249
  • 2
  • 81
  • 97
-3

Answer 1. There are many ways to shutdown your computer.

  1. Use shutdown option shown in Windows dialogue
  2. Use shutdown command in command prompt
  3. Use Task Manager to shutdown your computer
  4. Press power button on cabinet to shutdown your computer.
Michael Myers
  • 188,989
  • 46
  • 291
  • 292
Hiren H Patel
  • 167
  • 3
  • 12
  • 1
    Seems to me that OP is after of the inner-workings of the shutdown process - not Windows specifics. – jweyrich Feb 21 '12 at 12:01