System Call

Operating Systems

Tutor: Colm Donohoe
Author: Domas Zelionis

Table of Contents
Introduction 2
System Call Research 3
System Call Definition 3
The Environment 6
Implementing System Call 7
The Program 7
Program ‘newprocess’ Explained 8
Program ‘killer’ Explained 9
Compiling 10
Testing 11
Summary 12
References 12
Bibliography 12


Before anyone can write software for a particular operating system, they must
first understand the programming interfaces the system provides. So, in this project we will explain and implement system call in Linux.
System Call Research

In any modern operating system, virtual memory is divided into two spaces. One is used to run code in privileged mode, known as kernel space and another for executing user applications. Kernel code has complete control over the machine; it can access any of the machine’s resources, such as memory, network adapters, and disk drives. User space code has limited access to system resources. In order to read from a disk drive or write to the network, for example, user code has to ask the kernel to perform the operation. So, in this stage system call is involved, it allows user space programs to request services from the kernel.

System Call Definition

| A system call, sometimes referred to as a kernel call, is a request in a Unix-like operating system made via a software interrupt by an active process for a service performed by the kernel. A process (also frequently referred to as a task) is an executing (i.e., running) instance of a program. An active process is a process that is currently progressing in the CPU (central processing unit), as contrasted with processes that are waiting for their next turns in the CPU. An interrupt is a signal to the kernel that an event has occurred, and this results in changes in the sequence of instructions that is executed by the CPU. A software interrupt, also referred to as an exception, is an...