加入收藏 | 设为首页 | 会员中心 | 我要投稿 东莞站长网 (https://www.0769zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Anatomy of the Linux kernel--转

发布时间:2021-01-24 14:03:11 所属栏目:Linux 来源:网络整理
导读:ref:http://www.ibm.com/developerworks/linux/library/l-linux-kernel/?S_TACT=105AGX52S_CMP=cn-a-l Given that the goal of this article is to introduce you to the Linux kernel and explore its architecture and major components,let's start with
副标题[/!--empirenews.page--]

ref:http://www.ibm.com/developerworks/linux/library/l-linux-kernel/?S_TACT=105AGX52&S_CMP=cn-a-l

Given that the goal of this article is to introduce you to the Linux kernel and explore its architecture and major components,let's start with a short tour of Linux kernel history,then look at the Linux kernel architecture from 30,000 feet,and,finally,examine its major subsystems. The Linux kernel is over six million lines of code,so this introduction is not exhaustive. Use the pointers to more content to dig in further.

You've probably noticed that Linux as an operating system is referred to in some cases as "Linux" and in others as "GNU/Linux." The reason behind this is that Linux is the?kernel?of an operating system. The wide range of applications that make the operating system useful are the?GNU software. For example,the windowing system,compiler,variety of shells,development tools,editors,utilities,and other applications exist outside of the kernel,many of which are GNU software. For this reason,many consider "GNU/Linux" a more appropriate name for the operating system,while "Linux" is appropriate when referring to just the kernel.

While Linux is arguably the most popular open source operating system,its history is actually quite short considering the timeline of operating systems. In the early days of computing,programmers developed on the bare hardware in the hardware's language. The lack of an operating system meant that only one application (and one user) could use the large and expensive device at a time. Early operating systems were developed in the 1950s to provide a simpler development experience. Examples include the General Motors Operating System (GMOS) developed for the IBM 701 and the FORTRAN Monitor System (FMS) developed by North American Aviation for the IBM 709.

In the 1960s,Massachusetts Institute of Technology (MIT) and a host of companies developed an experimental operating system called Multics (or Multiplexed Information and Computing Service) for the GE-645. One of the developers of this operating system,AT&T,dropped out of Multics and developed their own operating system in 1970 called Unics. Along with this operating system was the C language,for which C was developed and then rewritten to make operating system development portable.

Twenty years later,Andrew Tanenbaum created a microkernel version of UNIX?,called MINIX (for minimal UNIX),that ran on small personal computers. This open source operating system inspired Linus Torvalds' initial development of Linux in the early 1990s (see Figure 1).

Short history of major Linux kernel releases

Linux quickly evolved from a single-person project to a world-wide development project involving thousands of developers. One of the most important decisions for Linux was its adoption of the GNU General Public License (GPL). Under the GPL,the Linux kernel was protected from commercial exploitation,and it also benefited from the user-space development of the GNU project (of Richard Stallman,whose source dwarfs that of the Linux kernel). This allowed useful applications such as the GNU Compiler Collection (GCC) and various shell support.

Now on to a high-altitude look at the GNU/Linux operating system architecture. You can think about an operating system from two levels,as shown in Figure 2.

The fundamental architecture of the GNU/Linux operating system

In reality,the architecture is not as clean as what is shown in Figure 2. For example,the mechanism by which system calls are handled (transitioning from the user space to the kernel space) can differ by architecture. Newer x86 central processing units (CPUs) that provide support for virtualization instructions are more efficient in this process than older x86 processors that use the traditional int 80h method.

At the top is the user,or application,space. This is where the user applications are executed. Below the user space is the kernel space. Here,the Linux kernel exists.

There is also the GNU C Library (glibc). This provides the system call interface that connects to the kernel and provides the mechanism to transition between the user-space application and the kernel. This is important because the kernel and user application occupy different protected address spaces. And while each user-space process occupies its own virtual address space,the kernel occupies a single address space. For more information,see the links in the??section.

(编辑:东莞站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读