linux
What is the Apache access log : The Apache access log is a file that records detailed information about each request made to an Apache HTTP Server. This log file is useful for monitoring server performance, troubleshooting errors, and identifying potential security issues. The format of the log file is configurable and can include information […]
When I started software development, my biggest concern was the source control system. There needs to be more detailed documentation, and senior developers in your team expect you to know this by default. They take it for granted. I started with VSS, SVN, ClearCase, PVCS, and git. It has been git for a while now […]
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 […]
Compile & Boot Linux from source code It becomes absolutely necessary for a Kernel Hacker (Linux) to compile various kernel sources and boot them for either taking traces or testing a modification for a kernel module. Although there are lot of blogs talk about this compile and booting, I found the following resource useful (http://www.wikihow.com/Compile-the-Linux-Kernel). […]
Most of us know about design patterns. But let me give the crux of — what a design pattern is? before getting into the topic. Design Patterns are the set of solution to typical and most commonly occurring problems in designing software program. They are mostly related to object orient design but not restricted to OOD. […]
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 […]
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 […]