Language Selection

English French German Italian Portuguese Spanish

How System Calls Work in Linux?

Filed under
HowTos

Every GNU/Linux programmer here reading this article must have used system calls to code their programs. GNU/Linux programming is incomplete without system calls. System calls are initiated by software interrupts. Before we delve into that, however, let’s define system calls.

A system call is the mechanism used by an application program to request service from the operating system, or more specifically, the operating system kernel.

Modern processors execute instructions in different privilege states. In system, where just two levels are defined (as in i386), these states are known as user mode and supervisor mode. These privilege levels are defined so that an operating system restrict can control the operations performed by the program. Controlling is done for reasons of security and stability. The kernel of the operating system should always run in privilege mode since it needs to do some operations. Such operations include accessing hardware devices, enabling and disabling interrupts, changing privileged processor state, and accessing memory management units.

Now with this setup of an operating system (with two modes of execution (considering only i386 architecture only)), we need a mechanism to transfer control safety from lesser privileged modes to higher privileged modes.

Full Story.

More in Tux Machines

Leftovers: Gaming

Android Leftovers

  • OnePlus Will Reveal Details Of Its ‘Oxygen’ Android ROM On February 12
    OnePlus introduced its own version of Android for its One smartphone earlier this month in response to its standoff with Cyanogen, and now the company has revealed that it will unveil its own ROM which can be installed on third-party Android devices on February 12. Correction: OnePlus tells us that, in fact, it won’t launch the ROM on the 12th. This is a tease-of-a-tease, and instead we can expect to see “more information about the ROM” not an actual download for third-party Android devices.
  • Android is suddenly surrounded by enemies
    Cyanogen is one of these forks. It has just raised $70 million from a number of investors including Microsoft to continue producing its own version of Android that it can position as a direct competitor to Google's.
  • Working New Android 5 Lollipop Features into Your Apps
  • Major Blackphone Security Flaw Discovered
    You might want to think twice before sending that sensitive text message over your supposedly secure Blackphone. A security flaw discovered by an Australian communication security expert could have allowed attackers to decrypt a Blackphone user’s messages, gather location information, and run additional code of the attacker’s choosing.
  • World’s most ‘NSA-proof’ phone vulnerable to simple SMS hack
    A smartphone marketed as the most anti-surveillance, NSA-proof personal device – the BlackPhone – has been found vulnerable to a simple SMS attack that allows the hacker to steal contacts, decrypt messages, and even take full control of the device.