26

I have never understood what system programming meant. The usual definition given is "...doing something close to the Os or extending Os features...".

Does using Windows API directly rather than some libraries to say do file i/o make it system programming? Was writing Android OS system programming? If I write something that would expose linux kernel through a console like app on Android am I doing system programming? If I am writing software to control a washing machine am I writing system programming?

I am a beginner in programming and this is confusing me to no end. Please explain contrasting it with "application programming".

  • 2
    This definition has changed and system programmers themselves don't seem to be sure of a unique definition today. This problem usually comes when people debates about whether language X is convenient for system programming... – Denys Séguret Jun 5 '12 at 13:28
  • @Denys Séguret - Ironic if no one can agree on what "system programming" is to start with. – John Jun 9 '18 at 17:00
19

I personally like the definition from Wikipedia:

System programming (or systems programming) is the activity of programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user (e.g. word processor), whereas systems programming aims to produce software which provides services to the computer hardware (e.g. disk defragmenter). It requires a greater degree of hardware awareness.

12

There are several questions you can ask yourself to gain practice in deciding that question.

  • Was the system originally sold without this program? Angry Birds may be a "Killer App" for a smart phone (the reason why someone buys it), but it is still a separate third-party app written long after the phone was introduced. Writing it would have been applications programing. But the display driver of the same smart phone is essential to using it at all, so it would have been systems programming.
  • Can you imagine porting the code to another platform without largely rewriting it? TeX and troff have been ported to virtually any system with few changes, so they are applications, even though they are located towards the bottom of the tool chain that people typically use. The file system that TeX writes its output to, e.g. UFS or VFAT, is a borderline case. You could port a file system to a different OS if it was totally awesome, but usually people just take over awesome ideas and write their own file system for their own OS. That makes file systems system software.
  • Is the functionality implemented in the kernel or in separate binaries? (File systems occupy a middle ground here as well. many parts of many file systems are in fact kernel code, but many have substantial parts in user-space.) Graphics display drivers can in principle be pluggable external components, but they are often implemented in the kernel or at least with privileged direct access to the kernel (or even to the hardware). That would be systems programing. On the other hand, computer games that use the graphics display stack are applications.

To your questions, writing the Android OS was definitely systems programming. Writing a program that uses Windows API calls is application programming. It is not as portable as if would be if you used cross-platform libraries such as SDL or OpenGL, but it can in principle be ported, it is third-party-code, and it runs in user space. A console app that exposes the state of the Linux kernel is an interesting thought experiment. I would definitely say it involves systems programing, since you'd have to know a lot about the structure of Linux (note that "Linux" is properly only the kernel, not the distribution) to write, and probably even to use it!

4

In short: Writing software that extends or enhances the functioning of an OS, like drivers, system utilities updates to OS'es or even brand new OS'es.

It mostly involves the Memory Management; I/O operations in the broadest sense of the word like networking, file access and device management; process management (multi tasking, process administration, etc.); user<->system interaction methods (both in and out) and user administration. Basically everything that is part of the OS that isn't an application is systems programming.

3

Using the Windows API directly was, at one point, a common way to write applications for Windows. So no, that's not systems programming.

Systems programming is not just "close to the OS" -- it's something essential to the core functioning of the computer system. So writing an OS is systems programming. Writing video drivers, filesystem drivers, network drivers for that OS is systems programming. Writing a compiler for a particular combination of language/chipset is systems programming.

1

Normally, it refers to "low level stuff that non-technical end users don't know exist or don't know very clearly that they are using or what they do".

Some examples that would often be considered system programming:

  • operating systems and drivers
  • compilers
  • emulators and virtualization
  • distribution creation, i.e. the creation of userland images.

    This notably normally involves selecting the C standard library, the init system and basic userland components like a shell.

Systems programming is often done in lower compiled level languages without automatic garbage collection like C or assembly, and tend to access less common system calls often through POSIX C interfaces.

I'm maintaining a hands on tutorial that covers several system programming topics here.

0

When defining this I would steer clear from any technical details altogether. Then it becomes easy.

An application allows a user to do something useful with some piece of technology. So application programming is targeted at providing features to a user, quite directly.

System programming on the other hand would lay the groundwork to make application programming possible. It delivers features to the application programmer rather than to the user.

This definition will hold, but it is a matter of perspective and context and roles. To a computer programmer, programming tools are applications. To an end user they are meaningless, just out of the picture.

-3

In short, The system programming when compared with application programming is that the SP handles the OS software to work with hardware resources and AP handles the end users activity.

  • 4
    this doesn't seem to offer anything substantial over points made and explained in prior 4 answers – gnat Sep 12 '16 at 15:25

protected by gnat Sep 12 '16 at 15:24

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.