Ever wondered how does your computer magically sense and install your usb drive or cd? Welcome to the world of 'plug and play' using the concept of HAL--Hardware Abstraction Layer--A software that sits between your kernel and hardware.
-hal - hardware abstraction layer.
-automatic detection and initialization of hardware (plug n play) happens because of hal.
-hal works under the daemon called 'hald'.
-hald maintains a database of currently connected hardware.
-hal = sysfs + udev + hald + dbus
-sysfs = stores settings about hald
-udev = listens for new devices and kicks off procs; acts as the manager of files in /dev dir.
-hald = the daemon, maintains a database of h/w conn currently
-dbus = handshakes hardware and actual running proc.
Modules - Modules are snippets of code pertaining to a specific hardware. Modules are the way in which kernel manages a hardware. Modules can be loaded and unloaded on demand; this is most commonly seen in case of plug and play devices.
Useful Module commands:
-lsmod - lists currently loaded kernel modules.
-lspci - lists h/w connected via the pci bus.
-lspcmcia & lsusb cmds behave similarly.
-lshal and lshw show info about currently conn devices.
-modprobe - probes modules
-insmod - inserts modules
-rmmod - removes modules
No comments:
Post a Comment