1-什么是操作系统

首先,先说说什么是操作系统。

What is operating system?

An operating system(OS) is system software that manages computer hardware and software resources and provides common services for computer programs. All computer programs, excluding firmware, require an operating system to function.[1]

Operating system provides interfaces between applications that running on system with hardware they are using.

OS must ensure 'fair': every application get fair share of resources.

OS must ensure one application won't corrupt the work done by another application.

所以总的来说,操作系统就是software that manages the resources of a machine. 这里的management of resource主要指四个方面:process management; memory management; file system management; device management.

Memory Management

内存管理指的是对于Primary Memory(Main Memory)的管理。Primary Memory指的就是我们通常说的RAM(random access memory)主存储器。Main memory is a large array of words or bytes where each word or byte has its own address. 因为可以直接与CPU交互,所以RAM的存储速度很快。对于正在执行的程序,即进程,它一定是在主存里的。

通常RAM对所有进程来说都不太够用,因为RAM很贵。limited amount RAM but large amount disk。

Another crucial job performed by the operating system is memory management. There is usually insufficient(不足) RAM for all of the processes running on a machine. Since RAM is relatively expensive, portions of disk (often called swap regions) are used to extend the amount of memory that is available to an application.

The total amount of memory that appears to be available for a process to use is called virtual memory. The memory manager is responsible for moving pages of processes into and out of memory as needed by the CPU. This will normally happen without the knowledge of the applications.

The memory manager gives each process its own view of memory, represented by a logical address space, arranges for this to be translated into physical memory resources and protects each process from accidentally overwriting other process' address spaces.


An Operating System does the following activities for memory management −

Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use.

In multiprogramming, the OS decides which process will get memory when and how much.

Allocates the memory when a process requests it to do so.

De-allocates the memory when a process no longer needs it or has been terminated.

*If there are many applications running at the same time, each will require memory to store variables, etc. The physical memory in the system must be partitioned and shared amongst the tasks.

Process Management

In multiprogramming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling

An Operating System does the following activities for processor management −

Keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller.

Allocates the processor (CPU) to a process.

De-allocates processor when a process is no longer required.

Device Management

An Operating System manages device communication via their respective drivers. 

The physical devices attached to the system, for example printers, scanners and modems as well as internal devices such as disks. Often programs need direct access to these devices.

It does the following activities for device management −

Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.

Decides which process gets the device when and for how much time.

Allocates the device in the efficient way.

De-allocates devices.

* 在device management中,还有一个特殊情况是connectivity to other system, 即网络。由于network这些年越来越重要,所以我们把connectivity拿出来,与上面的file system management, memory management, process management, device management 放一起,作为第五个部分。

Network capabilities, allowing systems to communicate with each other. This could be viewed as a special case of device accessing as described above, but networking and distribution is such an important part of today's systems architectures that it is correct to treat it separately.

File Management

A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions.

The file storage of the system, giving long term storage capabilities to applications.

An Operating System does the following activities for file management −

Keeps track of information, location, uses, status etc. The collective facilities are often known as file system.

Decides who gets the resources.

Allocates the resources.

De-allocates the resources.

Other Important Activities

管理计算机硬件和软件资源的各种程序。其管理功能分为处理机管理、存储管理、设备管理和文件管理等四大部分。是提高计算机利用率,方便用户而设计的软件。[2]

An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs.


what is os


什么是CPU(中央处理器 Central Processing Unit)

中央处理器(CPU,Central Processing Unit)是一块超大规模的集成电路,是一台计算机的运算核心(Core)和控制核心( Control Unit)。它的功能主要是解释计算机指令以及处理计算机软件中的数据。

中央处理器主要包括运算器(算术逻辑运算单元,ALU,Arithmetic Logic Unit)和高速缓冲存储器(Cache)及实现它们之间联系的数据(Data)、控制及状态的总线(Bus)。它与内部存储器(Memory)和输入/输出(I/O)设备合称为电子计算机三大核心部件。[5]

The CPU provides the basic execution resource for each application.

[1].https://en.wikipedia.org/wiki/Operating_system

[2].http://hanyu.baidu.com/zici/s?wd=%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F&query=%E4%BB%80%E4%B9%88%E6%98%AF%20%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F&srcid=28204&from=kg0&from=kg0

[3].https://baike.baidu.com/item/%E8%BF%9B%E7%A8%8B/382503?fr=aladdin

[4].https://www.tutorialspoint.com/operating_system/os_process_scheduling.htm

[5].https://baike.baidu.com/item/%E4%B8%AD%E5%A4%AE%E5%A4%84%E7%90%86%E5%99%A8/284033?fr=aladdin&fromid=368184&fromtitle=%EF%BC%A3%EF%BC%B0%EF%BC%B5

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 199,393评论 5 467
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,790评论 2 376
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 146,391评论 0 330
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,703评论 1 270
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,613评论 5 359
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,003评论 1 275
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,507评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,158评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,300评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,256评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,274评论 1 328
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,984评论 3 316
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,569评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,662评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,899评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,268评论 2 345
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,840评论 2 339

推荐阅读更多精彩内容