SysRq

SysRq or SysReq (short for System Request) is a key on keyboards for PCs that no longer has a standard use. When introduced by IBM with the PC/AT computer model in 1984, it was intended to be available as a special key to directly invoke the operating system (somewhat like the Windows key on modern keyboards), without conflicting with application program key uses or TSR program "hotkeys" (and a corresponding BIOS routine — interrupt hexadecimal 15, subfunction hexadecimal 85 — was added to signal to the operating system when SysReq was pushed or released). However, this never caught on for its intended purpose. On 84-key IBM AT keyboards, SysReq was a key of its own, but on most modern keyboards, the key shares a button with the PrintScrn function, and is used to take a screenshot of the entire screen, or to take a screenshot of the active window by pressing the combination Alt + PrintScrn. The BIOS keyboard routines simply ignore SysRq; therefore so do the DOS input routines as well as the keyboard routines in libraries supplied with many high-level languages.

The key is not totally ineffective, When it is pressed, nothing is stored in the keyboard buffer, but a BIOS function is called. The default handler of that function does nothing and simply returns. Programs can use SysReq simply by creating an interrupt handler to replace the default stub function, but most programs have no need to do that. Sometimes software has the potential to completely lock up the system. When this happens, a BIOS interrupt is the only input that can be generated. The SysReq BIOS interrupt handler can be configured as a form of "panic button" to gracefully terminate the program or reboot the system.

In GNU/Linux systems, provided the kernel has been compiled with the correct option ("Magic SysReq Key"), the key can be used to perform a variety of functions in an emergency, such as syncing disks, killing processes and turning off the computer, even when the computer is otherwise hung and no longer reacts to mouse actions or normal key presses.

See also