device driver
Compiling driver: As discussed earlier a Linux loadable kernel module (LKM) is different from other binary executables. Hence, it cannot be compiled the way we compile normal C files. Compiling a Linux module is a separate process. We use the help of kernel Makefile for compilation. The makefile we will have contents as given below. When you […]
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 […]
OOPS — Abstraction One of the core concept in object oriented paradigm is ‘Abstraction’. As most of us know Abstraction is nothing but hiding complete technical details (how its implemented or working) from the user (client code using the system/object/module) and exposing only necessary details for interacting with system/object/module. Static Function & Variables I guess […]
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 […]
What is a device driver? Device driver is simply a program which executes in kernel mode (unrestricted mode) interacting directly with hardware of the corresponding device. In the previous post we discussed about the different modes (restricted and unrestricted) of operation. They mainly do all the talking/interaction with raw hardware as part OS. Why we need them? […]
As we all know that CPU (micro-processor) executes all the instructions. Most of the modern architectures support at least 2 modes of CPU operation. Even if architecture supports more than 2 modes, they are usually grouped under 2 modes to have compatibility (of OS — across all machines). Mode 1 — Every operation possible is allowed […]