The Embedded New Testament

The "Holy Bible" for embedded engineers


Project maintained by theEmbeddedGeorge Hosted on GitHub Pages — Theme by mattgraham

🚀 Practice & deep-dive on EmbeddedInterviewLab

Get these OS / Linux concepts as community-ranked interview questions with model answers, plus interactive deep-dive guides.

👉 Browse Embedded Linux & OS questions →  ·  Read the in-depth guide →


Linux System Call Mechanism

Why do we need system call?

System call is the method user space applications use to request for OS kernel services. This is because user space apps cannot directly access resources in OS kernel due to their privileage difference.

System call Layer diagram:

syscall layer

User space process request for OS service:

syscall execution

Take kill() syscall as an example:

Reference

https://www.slideshare.net/VandanaSalve/introduction-to-char-device-driver

https://www.slideshare.net/garyyeh165/linux-char-device-driver

https://www.ptt.cc/bbs/b97902HW/M.1268953601.A.BA9.html

https://www.ptt.cc/bbs/b97902HW/M.1268932130.A.0CF.html

http://gityuan.com/2016/05/21/syscall/

http://hwchiu.logdown.com/posts/1733-c-pipe

http://wiki.csie.ncku.edu.tw/embedded/ARMv8

http://linux.vbird.org/linux_basic/0440processcontrol.php

Advanced Programming in the UNIX Environment 3rd Edition