Group Discounts available for 3+ students and Corporate Clients

Functional layers & Models in Unix

Levels of Unix Software

  • Unix users a layer approach of defining software layered approach is basis for Unix Security.
  • At the lowest level, the level closest to the hardware, are the basic hardware interface modules
    • process scheduling
    • Memory management
    • interrupt handling
    • low level device control
    • disk system management & data buffering
    • process synchronization and inter – process communication ( 1pc)

Unix Functional layer Model

 

 

2

 

 

Kernel Service layer

 

UntitledFile / disk access service

Untitledprocess creation and termination

UntitledMapping between user requests and device driver actions.

UntitledThe next level provides all the kernel services

UntitledThe user system call is converted to a Kernel service call that actually  performs  the requests service

UntitledI/O service

UntitledTerminal handling services

 

System call Interface Layer

 

UntitledThe system call interface layer converts a process running in user mode to a protected kernel mode process.

 

UntitledThis allows the program to invoke protected kernel routines to perform system functions.

 

User process Layer 

The uppermost layer consists of user process running :

  • shell
  • Unix commands
  • Utility programs
  • User application program

 

  User process

*protected from other users

*Have no access to Unix Kernel routines except through system call interface

*cannot directly access Kernel memory space.

 

Kernel   VS User space

Untitled  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.

UntitledThe inner protected ring is known as kernel space

UntitledThe outer ring is called user space. 

 

 

User Space

UntitledUser space is the area in memory  when user process are run

UntitledThis consist of memory starting above the kernel and includes the4 rest of available memory.

UntitledThis memory is protected ; the system prevents one user from interfering with another.

UntitledOnly Kernel process can access a user process.

UntitledA process operating in this memory region is said to be in user mode.

 

Kernel Space

UntitledKernel space is the region at memory where all kernel service are provided via kernel process.

UntitledAny process executing in kernel space is said to be executing in kernel mode.

UntitledKernel Space is a privileged area ; the area the user has access to it only through the system call interface.

UntitledA user does not have direct access to either all machine instructions or devices.

UntitledA kernel process does have direct access to both.

UntitledAlso, a kernel process can modify the memory map, an operation frequently required to perform process scheduling.

UntitledA user process becomes a kernel process when it executes a system call and starts executes kernel code.

 

Data Flow Between Kernel and user Space

 

UntitledSince users and the kernel do not share memory address space , the mechanism for moving data between them is important.

UntitledWhen a system call is executed , the arguments to the call and the corresponding kernel routine  identification are passed from user space to kernel space.

UntitledKernel routine ID is usually passed either via a hardware machine register or via the stack.

UntitledSystem call arguments are passed in the user area of the calling process.

UntitledUser area of a process contains information a bout the process the Kernel needs while the process is running.

UntitledOpen files , root, current directory, arguments to current system call , and process text, stack and data segment sizes.

UntitledA pointer to the process table entry containing information for scheduling such as priority.

UntitledUser file descriptor table and information about open files.

UntitledKernel Stack for the process.

UntitledRemember , user can not access Kernel space but Kernel space can access user space.

 

 

 

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Functional layers & Models in Unix"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Support


    Please Enter Your Details and Query.
    Three + 6