What is a device driver, device driver is integration of two pieces of code.
The first piece of code is how the tribal services are made available to userspace.
Second piece of code is the one that actually communicates with the hardware and performs the required
operation.
Bino in line.
Everything is considered as a file.
Even the hardware devices are defined in Lennix.
In short, we call the hardware device as fine as device files, so hardware, devices, files or cordless
device files.
These device files are present in Steve BattleCry.
These are files, all the operations which can be performed on normal text files like Collins, using
system calls like open read, write laws and seek a map, etc. This all system codes can also be used
on device files.
So when you call the system goes, the call will come to your device driver just associated with the
hardware or the physical device.
There are mainly two categories of devices, files.
So one is correct, is fine, the other is block device, file division is performed.
Based on speed of data transfer.
Amount of data for the way of organizing data transfer from the device to the system and vice versa.
So now, as we said, there are only two categories, character and bloc.
We'll be looking into character race drivers in this court character is this little device that will
only transmit a small amount of data.
And to Lord Howe frequency calls, examples of such devices are keyboard mouse, serial, port, soundcard
and joystick.
So in general, operations or data transfer with the devices I perform sequentially, bye bye bye.
So to read and write operations are performed by backbite the second category of devices, which is
block devices that is organized not in bytes, but on blocks.
So in character devices, you have data organized by byte, whereas in block devices, data is organized
block by block and we perform a lot of operations like research director randomly example of such devices
are hard drives, CD-ROMs, Ramdisk, etc..
So in case of factory workers, drivers, they never call a system call to directly come to your device
driver.
So there is no clear case of character device drivers.
But this is not the case of black drivers.
There's an intermediate layer in case of black devices, which we call as filesystem.
So you can open on a plot device to will go to filesystem.
And then this filesystem acts as an intermediate layer between your device driver and the userspace
when the same cases, whenever we call the other system calls.