分享
 
 
 

翻译: 深入理解Linux内核 节选 基本的操作系统概念

王朝system·作者佚名  2008-10-30
窄屏简体版  字體: |||超大  

1.4 Basic Operating System Concepts

基本的操作系统概念

Each computer system includes a basic set of programs called the operating system. The most important program in the set is called the kernel. It is loaded into RAM when the system boots and contains many critical procedures that are needed for the system to operate. The other programs are less crucial utilities; they can provide a wide variety of interactive experiences for the user—as well as doing all the jobs the user bought the computer for—but the essential shape and capabilities of the system are determined by the kernel. The kernel provides key facilities to everything else on the system and determines many of the characteristics of higher software. Hence, we often use the term "operating system" as a synonym for "kernel."

任何一个计算机系统都包含一个基本的程序集,又称为操作系统。在这个程序集中最重要的程序叫做kernel(内核)。当系统引导时,内核就被装进RAM,它还包含许多能够让系统运行起来的关键规程;其它的程序相对来说并不是非常的重要;它们能为用户提供各种各样的交互式体验----做这些工作也是用户购买计算机的原因;但是内核决定了系统的本质形态以及做这些工作的能力;内核不仅为计算机系统提供关键设备资源,而且也决定着高层软件的特征。因此,我们常用“操作系统“这个术语来代替”kernel(内核)“ ;

The operating system must fulfill two main objectives:

操作系统必须实现两个主要目标:

· Interact with the hardware components, servicing all low-level programmable elements included in the hardware platform.

和硬件部件相结合,维护包括在硬件平台上的所有底层的可编程元件;

· Provide an execution environment to the applications that run on the computer system (the so-called user programs).

为运行在操作系统上的应用程序(所谓的用户程序)提供一个执行环境

Some operating systems allow all user programs to directly play with the hardware components (a typical example is MS-DOS). In contrast, a Unix-like operating system hides all low-level details concerning the physical organization of the computer from applications run by the user. When a program wants to use a hardware resource, it must issue a request to the operating system. The kernel evaluates the request and, if it chooses to grant the resource, interacts with the relative hardware components on behalf of the user program.

许多操作系统允许用户程序直接的利用硬件部件;(一个典型的例子是MS-DOS)相反,类Unix系统隐藏了来自于用户程序所涉及到的计算机物理组织的所有底层细节;但当一个程序想使用硬件资源时,它必须发送一个请求给操作系统;内核评估这个请求,如果相关的硬件部件支持用户程序,内核就分配资源;

To enforce this mechanism, modern operating systems rely on the availability of specific hardware features that forbid user programs to directly interact with low-level hardware components or to access arbitrary memory locations. In particular, the hardware introduces at least two different execution modes for the CPU: a nonprivileged mode for user programs and a privileged mode for the kernel. Unix calls these User Mode and Kernel Mode, respectively.

为了这种机制的实施,现在的操作系统依赖于指定硬件可选件的有效性,如禁止用户程序直接和底层硬件部件相结合或者是禁止用户程序任意的存取内存单元.特别提出CPU至少要有两种不同的执行模式:一种用户程序使用的非特权模式和一种内核使用的特权模式;Unix分别称它们为用户模式和内核模式;

In the rest of this chapter, we introduce the basic concepts that have motivated the design of Unix over the past two decades, as well as Linux and other operating systems. While the concepts are probably familiar to you as a Linux user, these sections try to delve into them a bit more deeply than usual to explain the requirements they place on an operating system kernel. These broad considerations refer to virtually all Unix-like systems. The other chapters of this book will hopefully help you understand the Linux kernel internals.

在这一章的最后,我们介绍一些基本概念,这些概念在过去的二十年间推动了像Linux,Unix和其它一些操作系统的设计.作为一个Linux的用户,你也许相当熟悉这些概念,这些部分试图钻研一下这些概念,以便解释它们在一个操作系统内核上放置了那些需求;这些概念的考虑涉及到了所有的类Unix系统.而这本书的其它章希望能帮助你理解Linux内核的内部构件;

1.4.1 Multiuser Systems

多任务系统

A multiuser system is a computer that is able to concurrently and independently execute several applications belonging to two or more users. Concurrently means that applications can be active at the same time and contend for the various resources such as CPU, memory, hard disks, and so on. Independently means that each application can perform its task with no concern for what the applications of the other users are doing. Switching from one application to another, of course, slows down each of them and affects the response time seen by the users. Many of the complexities of modern operating system kernels, which we will examine in this book, are present to minimize the delays enforced on each program and to provide the user with responses that are as fast as possible.

一个多任务系统是一个能够同时并且独立的执行属于两个和多个用户的应用程序的计算机. 同时,意味着几个应用程序能在同一时间处于执行态,并且能够竞争诸如CPU,内存,硬磁盘等多种资源;独立意味着每一个应用程序能完成它的工作而无需考虑其它用户的应用程序正在做些什么;当然,从一个应用程序切换到另一个应用程序,会减慢它们的速度并且影响到达用户的响应时间.当代的操作系统内核是非常复杂的,它们尽可能的减少每一个应用程序的延迟以及为用户提供尽可能快的响应时间.我们将在这本书中考察这些知识;

Multiuser operating systems must include several features:

多任务操作系统必须包括的几个特征:

· An authentication mechanism for verifying the user's identity

认证机制,用来检验用户身份

· A protection mechanism against buggy user programs that could block other applications running in the system

保护机制,防止出错的用户程序阻碍在系统中其它应用程序的运行;

· A protection mechanism against malicious user programs that could interfere with or spy on the activity of other users

保护机制,阻止恶意的用户程序妨碍或者监视其它用户的活动

· An accounting mechanism that limits the amount of resource units assigned to each user

计数机制,限制分配给每个用户的资源单元数目

To ensure safe protection mechanisms, operating systems must use the hardware protection associated with the CPU privileged mode. Otherwise, a user program would be able to directly access the system circuitry and overcome the imposed bounds. Unix is a multiuser system that enforces the hardware protection of system resources.

为了保证能实现这些安全保护机制,操作系统必须使用和硬件保护关联的CPU特权模式.否则,用户程序将能够自己存取系统电路并且克服这些强加的限制;Unix是一个实施系统资源硬件保护的多任务系统;

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有