File / disk access service process creation and termination Mapping between user requests and device driver actions. The next level provides all the kernel services The user system call is converted to a Kernel service call that actually performs the requests service I/O service Terminal handling services
The system call interface layer converts a process running in user mode to a protected kernel mode process. This allows the program to invoke protected kernel routines to perform system functions.
The uppermost layer consists of user process running :
*protected from other users *Have no access to Unix Kernel routines except through system call interface *cannot directly access Kernel memory space.
In addition to the software levels, Unix also features two “rings of protection ” from inadvertent programming errors or malisons attacks that might damage other user’s processes or the kernel’s processes and data structures. The inner protected ring is known as kernel space The outer ring is called user space.
User space is the area in memory when user process are run This consist of memory starting above the kernel and includes the4 rest of available memory. This memory is protected ; the system prevents one user from interfering with another. Only Kernel process can access a user process. A process operating in this memory region is said to be in user mode.
Kernel space is the region at memory where all kernel service are provided via kernel process. Any process executing in kernel space is said to be executing in kernel mode. Kernel Space is a privileged area ; the area the user has access to it only through the system call interface. A user does not have direct access to either all machine instructions or devices. A kernel process does have direct access to both. Also, a kernel process can modify the memory map, an operation frequently required to perform process scheduling. A user process becomes a kernel process when it executes a system call and starts executes kernel code.
Since users and the kernel do not share memory address space , the mechanism for moving data between them is important. When a system call is executed , the arguments to the call and the corresponding kernel routine identification are passed from user space to kernel space. Kernel routine ID is usually passed either via a hardware machine register or via the stack. System call arguments are passed in the user area of the calling process. User area of a process contains information a bout the process the Kernel needs while the process is running. Open files , root, current directory, arguments to current system call , and process text, stack and data segment sizes. A pointer to the process table entry containing information for scheduling such as priority. User file descriptor table and information about open files. Kernel Stack for the process. Remember , user can not access Kernel space but Kernel space can access user space.
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.