Concepts of Programming

Essential Concepts and the Introduction

System programming, or the process of developing system software, is the subject of this book. Low-level system software interacts directly with the kernel and core system libraries. System software includes your shell and text editor, compiler and debugger, core utilities, and system daemons. The network server, web server, and database, on the other hand, are all in the same boat. These components are fully system software, interacting with the kernel and the C library mostly, if not solely. Other software (such as high-level GUI apps) operates higher, only occasionally dipping into the low level. Some programmers devote their whole day to building system software, while others devote only a portion of their time to this effort. On the other hand, no programmer can do without a working knowledge of system programming. System programming is at the centre of any software that we build, whether it is the programmer’s raison d’être or simply a foundation for higher-level notions.

This book focuses on Linux system programming in particular. Linux is a modern Unix-like operating system created from the ground up by Linus Torvalds and a worldwide community of programmers. Even though Linux shares Unix’s aims and philosophy, it is not Unix. Instead, Linux takes its path, deviating where it’s appropriate and converging just where it’s necessary. The essential programming on a Linux system is the same as any other Unix system. Beyond the essentials, however, Linux distinguishes itself from traditional Unix systems by supporting more system calls, behaving differently, and providing new functionality.

Programming of the System

Traditionally, all Unix programming was done at the system level. Historically, Unix systems lacked many higher-level abstractions. Even in a development environment like the X Window System, the basic Unix system API was exposed in full view. As a result, this book may be classified as a general guide to Linux programming. However, keep in mind that this book does not cover the Linux programming environment; for example, there is no build instruction on these pages. The system programming API provided on a modern Linux computer is protected.

System programming and application programming may be compared and contrasted since they differ in some significant ways but are quite similar in others. The characteristic of system programming is that the system programmer must have a thorough understanding of the hardware and operating system on which they operate. Application programmes interact with high-level libraries and the kernel and system libraries, as do system programmes. The hardware and functional system specifics are abstracted away by these libraries. Such abstraction aims to construct higher-level toolkits that are easier to use, more powerful or both. It has several goals: portability with different systems, compatibility with other versions of those systems, and the construction of higher-level toolkits that are easier to use, more powerful, or both. The amount of system vs high-level libraries used in a specific programme is determined by the stack level at the application was created. Some apps are only written in higher-level abstractions. Even these programmes, which are not at the system’s lowest levels, benefit from a familiar programmer with system programming. All styles of programming benefit from the same excellent practices and understanding of the underlying system.

Why Should You Study System Programming?

In the previous decade, application programming has shifted away from system-level programming and toward highly high-level development, either through web software (such as JavaScript) or managed code (such as Java). However, this development does not portend the end of system programming. The JavaScript interpreter and the Java Virtual Machine, both system programming, must yet be written. Furthermore, system programming expertise may aid a developer in producing Python, Ruby, or Scala code, as knowing the machine’s soul makes for better code no matter where in the stack the code is produced.