Computer Science, asked by Adhyatma3454, 1 year ago

What are the advantages and disadvantages of using the same system call interface for manipulating both?

Answers

Answered by railway36
2
who is the best state
Answered by anuj7kumar
10
Each device can be accessed as though it was a file in the
file system. Since most of the kernel deals with devices through this file interface, it is relatively easy to add a new device driver by implementing the hardware-specific code to support this abstract file interface.
Therefore, this benefits the development of both user program code, which can be written to access devices and files in the same manner, and device-driver code, which can be written to support a well-defined application program interface (API).
Disadvantage with using the same interface is that it might be difficult to capture the functionality of certain devices within the context of the file access API, thereby resulting in either a loss of functionality or a loss of performance. Some of this could be overcome by the use of the ioctl operation that provides a general-purpose interface for processes to invoke operations on devices.
Similar questions