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

Kernel 3.18 development – the kernel column

Linus Torvalds announced Linux 3.17, the Shuffling Zombie Juror, saying, “The past week was fairly calm, and so I have no qualms about releasing 3.17 on the normal schedule”. The latest kernel includes a number of nice headline features, such as the new getrandom() system call and sealed files APIs that we covered in previous issues of LU&D. Linux 3.17 also includes support for less highlighted new features, such as new signature checking of kexec()’d kernel images and sparse files on Samba file systems (which is significant for those mounting Windows and Mac shares). Read more

Qt 5.4 Release Candidate Available

I am happy to announce that Qt 5.4 Release Candidate is now available. After the Qt5.4 Beta release we have done some build & packaging related updates in addition to large number of error fixes based on feedback from Beta release. Read more

Weston's IVI Shell Sees New Version

There hasn't been much in the way of exciting Wayland/Weston developments to report on this month, but its development is continuing in its usual manner. Out today is another version of the Weston IVI Shell as it still works to being accepted upstream. The weston-ivi-shell is a reference shell for Wayland's Weston compositor running on In-Vehicle Infotainment (IVI) systems. The Weston-IVI work dates back many months and today's revision to the shell marks its eighth public version as it still seeks to be accepted into mainline Weston. Read more

Python 3 Support Added To The GNOME Shell

The GNOME Shell 3.15.2 release fixes some visual glitching, improves the layout of the extension installation dialog, supports the CSS margin property, and offers other bug fixes and minor enhancements. Most notable to GNOME Shell 3.15.2 though is there's finally Python 3 support. Many GNOME components have long ported their Python 2 code to Python 3 while GNOME Shell's Python support has just received the Py3 treatment. Details on GNOME's overall Python 3 porting work can be found via this Wiki page. Read more