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: Software

  • An intro to git gui
    I have been using git for years now, I think I can say I know the tool quite well, yet I do all my commits with git gui. This often surprises my coworkers because a) it looks a bit ugly and b) it's a graphical application! The horror!
  • 15 years of VLC and VideoLAN
    Technically, today is the 15th anniversary of the relicensing of all the VideoLAN software to the GPL license, as agreed by the École Centrale Paris, on February 1st, 2001.
  • LiVES Video Editor 2.6.0 Version Released For Ubuntu/Linux Mint Via PPA
    As you know there are plenty of video editors available for other operating systems (Mac, Windows) but there isn't lack of best video editors for Unix/Linux and support wide variety of architecture (x86, amd64, x86_64, i64, sparc, hppa, ppc and xbox/x86.) but using the PPA you can only install for x86/x86_64/amd64 architectures. If you are into video editing and looking for open-source and free alternative for yourself then here is great video editing program "LiVES" for you. LiVES is an awesome, very simple, powerful video editor and VJ tool exist for Linux operating system. Using LiVES video editor you can combine realtime and rendered effects, streams and multiple video/audio files, and then encode to over 50 formats. It is small in size, yet it has many advanced features. LiVES is part editor, part VJ tool. It is fully extendable through open standard RFX plugin scripts.
  • Firejail 0.9.38 Release Announcement
    We are happy to announce the release of Firejail version 0.9.38 (download). Firejail is a generic Linux namespaces security sandbox, capable of running graphic interface programs as well as server programs. The project went through an external security audit, and several SUID-releated problems have been found. Please update your software.

Kernel Space: Linux, Graphics

today's howtos

Leftovers: Gaming

  • Don't Starve: Shipwrecked DLC is now available on SteamOS & Linux
    Heads up survivalists! Don't Starve: Shipwrecked the good looking new DLC for the single player version of Don't Starve is now on SteamOS & Linux.
  • SuperTuxKart - A simple recipe for simple fun
    It's been a while since I've done a proper Linux game review. The reasons being, we now have Steam, so there's less of a distinction between Windows and Linux. That division is now blurred, and we're past the free-only, indie-only games of yore. Good. That, however, does not mean you can't be having fun for free. SuperTuxKart is one such title. It's nothing more than a point-and-shoot racer, arcade all the way, with you taking helm in one of the many funnily shaped vehicles and racing down some crazy tracks. Then, it's about taking on some opponents, in-game traps and perks, and gradually unlocking new levels as you make progress in the existing set. But let us explore in more depth.
  • GPUOpen, Mad Max on Linux speculation, and more open gaming news