About Me (TS Pradeep Kumar)

Working at VIT University and having great interest towards embedded wireless systems and e-learning. This site caters to most of the Indian Engineering/technology students to know about embedded systems, network simulator, e learning tools/techniques, etc. If you are a student or a learner, you can always request a title or post..

Subscribe by Email

Enter your email address:

Delivered by FeedBurner

Representation of File System in the Kernel

Representation of data on a floppy and hard disk may consistently differ, but representing them in the kernel is almost same.
VFS mounts the file system through the function

register_filesystem(struct file_system_type *fs),
Example

register_filesystem(&ext2_fs_type);

Mounting

Before a file can be accessed, the file system containing the file should be mounted.
Done by the call using mount or function [...]

Continue reading Representation of File System in the Kernel

  • Share/Bookmark

Linux File System

Linux supports many number of file systems, that’s why Linux is accepted quickly as one of the best Operating systems.
Linux has the unified interface called as Virtual File system (VFS) which serves as the interface defined in between the OS kernel and the different file systems as illustrated below.

The Virtual file System

Supplies the [...]

Continue reading Linux File System

  • Share/Bookmark

Sockets for Inter process communication

Socket programming interfaces provides communication via a network as well as locally on a single computer. Example is INET daemon which waits for incoming network service requests and then call the appropriate service program using the socket file descriptor as standard input and output.
Implementation of Unix domain sockets

Represented by a kernel data structure socket
Socket [...]

Continue reading Sockets for Inter process communication

  • Share/Bookmark

Debugging using ptrace

Ptrace is a system call provided in unix for one process to take control of another process to debug errors or bugs in the system
The process under control can be run step by step and its memory can be read and modified.
int sys_ptrace(long request, long pid, long addr, long data);
the function processes various request defined [...]

Continue reading Debugging using ptrace

  • Share/Bookmark

System V IPC

Three forms of System V IPC

Semaphores

Message Queues

Shared Memory

System V IPC is different from POSIX API, but both are available in the linux kernel.
GNU C library in kernel version 2.2 includes the interfaces for shared memory and the semaphore according to POSIX.
Access Rights and Numbers
struct kern_ipc_perm
{
key_t key;  //key
uid_t uid; //Owner
gid_t gid;  //Owner
uid_t cuid;  //Creator
gid_t cgid; [...]

Continue reading System V IPC

  • Share/Bookmark

Pipes and Named Pipes (FIFO)

Pipes are the classical method of interprocess communication.
For example
# ls –l | more

The symbol | indicates a pipe and the shell in the above example runs the processes ls and more which are linked with a pipe. ls writes data to the pipe and more reads it.
Named pipes otherwise called as the FIFO (First [...]

Continue reading Pipes and Named Pipes (FIFO)

  • Share/Bookmark

Communication Via Files (IPC)

This is one of the oldest way of data exchange in which the information is sent as a file.
File needs two type of locking
Mandatory Locking

Read wirte is blocked during the entire locking period

Advisory locking

Allows Read and write even after the lock has been set
processes accessing the file for Read and Write has to [...]

Continue reading Communication Via Files (IPC)

  • Share/Bookmark

Inter process Communication in Linux Kernel (IPC)

When two processes trying to access a resource is called race condition.
Main challenge is to avoid the race condition, the following method is usually adopted to avoid the race condition

use of shared memory can prevent race condition
Use of threads. Threads use the same address space when switching it to other threads(so same page [...]

Continue reading Inter process Communication in Linux Kernel (IPC)

  • Share/Bookmark

Micriµm Unveils New Book: µC/OS-III, The Real-Time Kernel

After the introduction of Micriµm’s µC/OS-III earlier this year, the biggest question on many engineers’ minds was, "Will there be a book?"  Undoubtedly, these engineers were hoping for a follow-up to the highly popular MicroC/OS-II, The Real-Time Kernel.  One of the all-time best sellers in the embedded field, this text has long been recognized [...]

Continue reading Micriµm Unveils New Book: µC/OS-III, The Real-Time Kernel

  • Share/Bookmark

E-Learning through Blogging

E- Learning is one of the modern methods of active learning among the learners and the teachers.Through various means, elearning can be achieved, one such modern tool available is through blogging.
So How to start a blog?Following points indicates how to start a blog and how to post notes and other information for Elearning.

There are many [...]

Continue reading E-Learning through Blogging

  • Share/Bookmark