Posts

Showing posts from February, 2021

Linux interview question

Image
What happens when I dereference a NULL pointer in kernel space?      Kernel panic    What's the difference between initrd and initramfs?      Initrd is a separate image loaded by the bootloader, while intramfs is embedded within the kernel image.  How is the scheduler called in Linux Kernel?      In the Linux kernel, the scheduler is invoked by a periodic timer interrupt. This is called periodic scheduling which is essential for preempting tasks that have consumed more CPU cycles in order to offer other tasks on run-queue a fair chance to utilize the CPU. The scheduler is also invoked by kernel functions that block the current task, and this allows the scheduler to decide on which task on the run-queue should run and context switch to that task What is the difference between vmlinux and vmlinuz? Vmlinux stands for Linux kernel with virtual memory(VM) this is the kernel image. Vmlinuz is the compressed kernel image. What is th...

I/O devices Interface

Image
The microprocessor cannot do anything by itself therefore, It needs to be linked with memory, extra peripherals, or IO devices. This linking is called Interfacing. interfacing of the I/O devices in 8085 can be done in two ways Memory mapped IO interface: I/O mapped I/O interface Memory Mapped IO interface: We assign a memory address that can be used in the same manner as we use a normal memory location. Let's look into below memory mapped on the STM32L microcontroller. Memory mapping of STM32. The ARM architecture is following the Memory-mapped I/O.  common address space for both I/O and Memory.  Two control signal MEMR MEMW Only Memory related Instruction to communicate I/O address space.  ARM has single address liner for memory and IO.  cat /proc/iomem to see memory address space.   I/O mapped  I/O interface: also called port mapped IO. example:  Intel Have separate I/o address and Memory address space.  4 control single  MEMR MEMR...