Hotplug and Coldplug:-
Devices connected to a running system on-the-fly are said to be hotplugged, whereas those connected prior to system boot are considered to be coldplugged. Earlier, the kernel used to notify user space about hotplug events by invoking a helper program registered via the /proc filesystem. But when current kernels detect hotplug, they dispatch uevents to user space via netlink sockets. Netlink sockets are an efficient mechanism to communicate between kernel space and user space using socket APIs. At the user-space end, udevd, the daemon that manages device node creation and removal, receives the uevents and manages hotplug.
Udev also handles coldplug. Because udev is part of user space and is started only after the kernel boots, a special mechanism is needed to emulate hotplug events over coldplugged devices. At boot time, the kernel creates a file named uevent under sysfs for all devices and emits coldplug events to those files. When udev starts, it reads all the uevent files from /sys and generates hotplug uevents for each coldplugged device.


LinkBack URL
About LinkBacks
Reply With Quote

LinkBacks Enabled by vBSEO
Bookmarks