Linux
1. Describe the relationship between user mode and kernel mode during a system call? Explain in detail.
2. In system calls for file input/output, why is buffering needed? Explain in detail.
1. A system call occurs when a process requests some services in the user mode from the kernel. This can be achieved if the mode is changed from system to kernel mode.
The system is commonly in user mode while running an application. If the application needs some services from kernel mode, an interrupt is generated which is called a system call. This causes the mode to be changed from user to kernel.
2. Input/output related to a file requires execution of some input/output operations and transfer of data. Buffering serves as a throughput improving mechanism. For every device engaged in input/output service, a buffer is associated. A temporary space is used where data and commands are stored. They are transferred into the processor and out of the processor for transfer of data to take place at the same time.
Get Answers For Free
Most questions answered within 1 hours.