Linux kernel Learn (step-by-step)--Kernel overview

Source: Internet
Author: User

One, user space and kernel space:

Users interact with the operating system through user space, and applications developed or used by programmers are located in user space. The user space does not have direct access to the kernel and thus cannot access hardware resources, but it can be accessed through the kernel-defined outermost routines-system transfer.

Kernel space is the area where the hardware management function works.

Second, the user identifier

The user logs in with a unique account name and can also associate a unique user ID (UID). The kernel uses this UID to verify the user's file access rights.

A user is also a member of one or more groups, and each group has its own unique group ID (GID).

Iii. Types of files

1. Ordinary files (regular file) are represented by dashes (eg,-RW-RW-RW) in the first character of a pattern field.

2. The first character of the catalog (directory) file in the Pattern field is denoted by "D" (eg,drwx--), which holds the association between the file name and the index node of the document.

3. Block device files use "B" (EG,BRW---) in the first character of the pattern field. Represents a hardware device whose I/O is transmitted as a power-block size of 2.

4. The character equipment (character device) file is denoted by "C" in the first character of the pattern field (eg,crw--), which represents the hardware device, the data is not organized in blocks, and I/O is sent in a byte stream.

5. The first character of the link file in the Pattern field is denoted by "l" (EG,LRW---), and the link is a pointer to the file.

6. The first character of a named pipe file in a pattern field is denoted by "P" (eg,prw--), which is used as a data pipeline to facilitate communication between programs

7. Socket (socket) file is denoted by "s" in the first character of the pattern field (eg,srw--)

Iv. file Mode

1.sticky

A file with the sticky bit enabled is "T" (eg,-rwx-----t) in the last character of the Mode field. The executable can enable the sticky bit to ensure that it can be kept in memory regardless of its execution state. When this is applied to a frequently used program, it improves performance because it reduces the time it takes for the disk to access file information.

2.suid

If the SUID bit is set, then the user accesses the position "X" to "s" (Eg,-rws---). When the user executes an executable file, the executing program is associated with the user who called the file.

3.sgid

If the Sgid bit is set, then the user group accesses the Place of Thrones where the executable bit "x" becomes "s" (EG,-RWXRWS), similar to Suid, which is used for group

Linux kernel Learn (step-by-step)--Kernel overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.