int socket(int domain, int type, int protocol); The socket created is one end point of a communication channel. The domain parameter specifies the address family, the type parameter specifies the type of communication to be used with this socket, and … Continue reading
In sockets five main functions that r used are: socket() , bind(), listen(), accept() and close()
The pairing between the process descriptor and the Kernel Mode stack offers a key benefit in terms of efficiency: the kernel can easily obtain the process descriptor pointer of the process currently running on the CPU from the value of … Continue reading
The esp register is the CPU stack pointer, which is used to address the stack’s top location. On Intel systems, the stack starts at the end and grows toward the beginning of the memory area. Right after switching from User … Continue reading
After a driver has requested the range of I/O ports it needs to use in its activities, it must read and/or write to those ports. To this end, most hardware differentiates between 8-bit, 16-bit, and 32- bit ports.
Processes are dynamic entities whose lifetimes in the system range from a few milliseconds to months. Thus, the kernel must be able to handle many processes at the same time.The kernel reserves a global static array of size NR_TASKS called … Continue reading
To use parallel port we need to allocate region using following function struct resource *request_region(unsigned long first, unsigned long n, const char *name); We can also check whether region available or not by this function int check_region(unsigned long first, unsigned … Continue reading
To test parallel port we can do the following step: Create a node by mknod /dev/parlelport c 61 0 The module can now be installed, parlelport. You can check that it is effectively reserving the input/output port addresses 0×378 with … Continue reading
Lightweight processes should not be confused with user-mode threads, which are different execution flows handled by a user-level library. For instance, older Linux systems implemented POSIX threads entirely in user space by means of the pthread library; therefore,a multithreaded program … Continue reading
One of the most common communication buses in the world, and hence one that should be well understood by prospective engineers, is the I2C bus. It may not be as well known as USB or Ethernet, but much of the world … Continue reading
DEVICE DRIVER ::A device driver is a software, it’s not a hardware. A driver is a code which is completely specific to a hardware device and brings all the functionality to it. Without a driver in OS environment an application … Continue reading
Linux programs the first PC’s PIT to issue timer interrupts on the IRQ0 at a (roughly) 100-Hz frequency, that is, once every 10 milliseconds. This time interval is called a tick, and its length in microseconds is stored in the … Continue reading
Starting with the Pentium, many recent Intel 80×86 microprocessors include a 64-bit Time Stamp Counter (TSC ) register that can be read by means of the rdtsc assembly language instruction. This register is a counter that is incremented at each … Continue reading
t is rare (even unknown) for kernel code to create a standalone kobject; instead, kobjects are used to control access to a larger, domain-specific object. To this end, kobjects are found embedded in other structures. If you are used to … Continue reading