linux device driver
In the previous posts we discussed about what are device drivers and how to create one, load them into linux kernel and test them. In this post we will discuss about what to be implemented in a device driver. Core function for device drivers: An important structure in any device driver is the file_operations. It holds the pointers […]
OS development over time We all know that kernel is the core part of any OS. It is the set of code running in privileged mode (kernel mode or Ring3 security level). Operating Systems can be classified based on the architecture of their kernel as below: Monolithic kernel OS This is the old style of […]
Let us try to create a toy system call to do add operation, which takes 2 arguments and return their added value. Following are the steps in adding a new system call to Linux Kernel: Step 1: Unzip and untar the latest Linux kernel source (https://www.kernel.org currently 3.14 is the stable version) into /usr/src/ directory. Step […]
System calls are used by user programs in order get service from the operating system. Some of the popular system calls are we normally use are open, read, write, close, wait, exec, fork, exit, and kill. There are usually 100’s of system call available in OS. For example, Linux has 300+ system calls. Why we […]
Device drivers and OS In the beginning almost all OS were implemented as a single huge kernel with all device drivers included as part of the kernel. If we think further this design make sense, as almost all device drivers require the hardware/resource access and these accesses are provided by being part of the kernel […]