Contents
What is the purpose of system call?
System call provides the services of the operating system to the user programs via Application Program Interface(API). It provides an interface between a process and operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system.
How user process is affected by system call?
System calls are usually made when a process in user mode requires access to a resource. Then the system call is executed on a priority basis in the kernel mode. After the execution of the system call, the control returns to the user mode and execution of user processes can be resumed.
How are parameters passed in a system call?
There are three main methods to pass the parameters required for a system call: (1) Pass the parameters in registers (this may prove insu\cient when there are more parameters than registers). (2) Store the parameters in a block, or table, in memory, and pass the address of block as a parameter in a register.
Why is it important to write user program code?
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 API.
How to obtain a statistical profile of a program?
Describe how you could obtain a statistical profile of the amount of time spent by a program executing different sections of its code. Discuss the importance of obtaining such statistical profile. Ans:
Briefly describes the two tags and discuss how they differ. Ans: One classof services provided by an operating system is to enforce protection between different processes running concurrently in the system. Processes are allowed to access only those memory locations that are associated with their address spaces.