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

LibreOffice 5, a foundation for the future

The release of the next major version of LibreOffice, the 5.0, is approaching fast. In several ways this is an unique release and I’d like to explain a bit why. Read more

Samsung Continues to Lessen Android Dependence

Samsung's partnership with members of the Linux Foundation appears to be bearing fruit. The partnership's mobile operating system -- dubbed Tizen -- is Linux-based. Samsung's initial Tizen phone rollout was rocky: The company's highly anticipated Samsung Z launch in Russia was quickly canceled last year, and the company blamed concerns about the ecosystem for the delay. Unfortunately, in many cases, ecosystem development presents a "chicken and egg" problem: Developers won't build apps until you have users, and users won't select your product until you have apps. Read more

Linux 4.2 Offers Performance Improvements For Non-Transparent Bridging

The Non-Transparent Bridge code is undergoing a big rework that has "already produced some significant performance improvements", according to its code maintainer Jon Mason. For those unfamiliar with NTB, it's described by the in-kernel documentation, "NTB (Non-Transparent Bridge) is a type of PCI-Express bridge chip that connects the separate memory systems of two computers to the same PCI-Express fabric. Existing NTB hardware supports a common feature set, including scratchpad registers, doorbell registers, and memory translation windows." Or explained simply by the Intel Xeon documentation that received the NTB support, "Non-Transparent Bridge (NTB) enables high speed connectivity between one Intel Xeon Processor-based platform to another (or other IA or non-IA platform via the PCIe interface)." Read more

Benchmarks Of 54 Different Intel/AMD Linux Systems

This week in celebrating 200,000 benchmark results in our LinuxBenchmarking.com test lab, I ran another large comparison against the latest spectrum of hardware/software in the automated performance test lab. Read more