news 2026/4/23 18:01:28

【把Linux“聊”明白】从冯诺依曼架构到操作系统

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【把Linux“聊”明白】从冯诺依曼架构到操作系统

截至目前,我们所认识的计算机,都是由一个个的硬件组件组成

输入设备:包括键盘,鼠标,扫描仪等;中央处理器(CPU):含有运算器和控制器等;输出单元:显示器,打印机等。

我们要知道,这里的存储器指的是内存,输入输出设备是站在内存的角度来看的。

为什么cpu不直接在磁盘上获取数据呢?因为CPU的速度和磁盘的速度之间存在巨大的、难以逾越的鸿沟,如果CPU直接去磁盘取数据,整个计算机将会慢到无法忍受。 内存作为一道必不可少的“缓存”或“缓冲区”,填补了CPU和磁盘之间巨大的速度鸿沟,是保证现代计算机高效运行的基石。

在不考虑缓存情况,这里的CPU能且只能对内存进行读写,不能访问外设(输入或输出设备),外设(输入或输出设备)要输入或者输出数据,也只能写入内存或者从内存中读取。 即所有设备都只能直接和内存打交道。

所以,在我们学习C语言时,printf函数就是把数据写到硬件,也就是显示器上。

二、操作系统的概念

任何计算机系统都包含一个基本的程序集合,称为操作系统(OS)。笼统的理解,操作系统包括:

内核(进程管理,内存管理,文件管理,驱动管理) 其他程序(例如函数库,shell程序等等)

在这里插入图片描述

三、设计操作系统的目的

对上,为用户程序(应用程序)提供一个良好的执行环境(目的)

对下,与硬件交互,管理所有的软硬件资源(手段)

我们来看一下计算机系统的层次结构:

  1. 软硬件体系结构为层状结构
  2. 访问操作系统,必须使用系统调用— 其实就是函数,只不过是系统提供的;
  3. 我们的程序,只要你判断它访问了硬件,那么它必须贯穿整个软硬件体系结构;
  4. 库函数可能在底层封装了系统调用。

在这里插入图片描述

四、操作系统的核心功能

在上面我们也可以看出,操作系统是管理者和服务提供者。它管理所有硬件资源(CPU、内存、设备、文件),同时为用户和应用程序提供简单、统一、安全的服务接口。所以操作系统的定位是:⼀款纯正的“搞管理”的软件

4-1 如何理解"管理"

简单来说,就是 —先描述,再组织。 举例: 校长管理学生,先对学生进行描述

代码语言:javascript

AI代码解释

struct student { int id; // 学号 char* name; // 名字 char* age; // 年龄 //...

此时,每个学生信息对应一个结构体,然后,再以某种数据结构(比如链表)将学生对象的信息组织起来:

在这里插入图片描述

即:先描述被管理对象,再组织被管理对象

此时,校长想管理学生,需要和学生见面吗?不需要。 所以,要管理,管理者和被管理者,可以不需要见面。 那么,管理者和被管理者,怎么管理呢?根据“数据”进行管理!但是不需要见面,如何得到数据?由中间层获取!(比如辅导员)

有了上述的先描述,再组织,可以看到,校长对学生的管理工作,变成了对链表的增删查改。

www.dongchedi.com/article/7595302803858293310
www.dongchedi.com/article/7595302533728551486
www.dongchedi.com/article/7595303526705152574
www.dongchedi.com/article/7595302533728911934
www.dongchedi.com/article/7595302732916277822
www.dongchedi.com/article/7595300345145164313
www.dongchedi.com/article/7595287730565710361
www.dongchedi.com/article/7595287469617529368
www.dongchedi.com/article/7595289256520663576
www.dongchedi.com/article/7595287092394000920
www.dongchedi.com/article/7595286612611957273
www.dongchedi.com/article/7595285133738410521
www.dongchedi.com/article/7595285905729487384
www.dongchedi.com/article/7595287514580435481
www.dongchedi.com/article/7595285072006382105
www.dongchedi.com/article/7595285719334502936
www.dongchedi.com/article/7595285631619007000
www.dongchedi.com/article/7595277509785453081
www.dongchedi.com/article/7595276630432760345
www.dongchedi.com/article/7595275735409967640
www.dongchedi.com/article/7595277089067549246
www.dongchedi.com/article/7595276413155295769
www.dongchedi.com/article/7595276373905195544
www.dongchedi.com/article/7595274144955499033
www.dongchedi.com/article/7595274423667048984
www.dongchedi.com/article/7595275907217195545
www.dongchedi.com/article/7595274913787953689
www.dongchedi.com/article/7595274806057337368
www.dongchedi.com/article/7595274833727406617
www.dongchedi.com/article/7595255011878208062
www.dongchedi.com/article/7595255232834159166
www.dongchedi.com/article/7595244636982379033
www.dongchedi.com/article/7595246619336000062
www.dongchedi.com/article/7595245102663352894
www.dongchedi.com/article/7595246113737982526
www.dongchedi.com/article/7595238963515146814
www.dongchedi.com/article/7595238605032292888
www.dongchedi.com/article/7595237840809198105
www.dongchedi.com/article/7595237829975212569
www.dongchedi.com/article/7595237024668877336
www.dongchedi.com/article/7594914712018600510
www.dongchedi.com/article/7594913283375907352
www.dongchedi.com/article/7594914016129106456
www.dongchedi.com/article/7594914424213766718
www.dongchedi.com/article/7594913083894891033
www.dongchedi.com/article/7594913119710069310
www.dongchedi.com/article/7594912459706696254
www.dongchedi.com/article/7594911633613390360
www.dongchedi.com/article/7594909036307595800
www.dongchedi.com/article/7594910057444786750
www.dongchedi.com/article/7594909893274927641
www.dongchedi.com/article/7594909974816588350
www.dongchedi.com/article/7594909035217404441
www.dongchedi.com/article/7594908551181615678
www.dongchedi.com/article/7594906883010855486
www.dongchedi.com/article/7594907513641058878
www.dongchedi.com/article/7594905549272285720
www.dongchedi.com/article/7594906861996884505
www.dongchedi.com/article/7594906134906421785
www.dongchedi.com/article/7594905869373096472
www.dongchedi.com/article/7594904114086560281
www.dongchedi.com/article/7594903301414650392
www.dongchedi.com/article/7594901235942228542
www.dongchedi.com/article/7594901805579452953
www.dongchedi.com/article/7594900315275657752
www.dongchedi.com/article/7594899458794799641
www.dongchedi.com/article/7594900266315645465
www.dongchedi.com/article/7594900151853236798
www.dongchedi.com/article/7594898846111580697
www.dongchedi.com/article/7594899021756776984

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/23 11:33:09

Emotion2Vec+ Large语音情感识别系统中文英文多语种支持实测

Emotion2Vec Large语音情感识别系统中文英文多语种支持实测 1. 引言 随着人工智能技术的不断演进,语音情感识别(Speech Emotion Recognition, SER)作为人机交互中的关键环节,正逐步从实验室走向实际应用。传统的语音识别系统仅关…

作者头像 李华
网站建设 2026/4/23 11:29:38

LightVAE:视频生成提速省内存的AI新突破

LightVAE:视频生成提速省内存的AI新突破 【免费下载链接】Autoencoders 项目地址: https://ai.gitcode.com/hf_mirrors/lightx2v/Autoencoders 导语:LightVAE系列通过架构优化与知识蒸馏技术,在保持接近官方模型画质的同时&#xff0…

作者头像 李华
网站建设 2026/4/23 11:28:43

HiDream-E1.1:免费AI图像编辑工具,9项指标第一

HiDream-E1.1:免费AI图像编辑工具,9项指标第一 【免费下载链接】HiDream-E1-1 项目地址: https://ai.gitcode.com/hf_mirrors/HiDream-ai/HiDream-E1-1 导语:HiDream-E1.1开源图像编辑模型在权威评测中横扫9项指标冠军,以…

作者头像 李华
网站建设 2026/4/22 19:02:18

Vue图片裁剪组件vue-cropperjs终极使用指南

Vue图片裁剪组件vue-cropperjs终极使用指南 【免费下载链接】vue-cropperjs A Vue wrapper component for cropperjs https://github.com/fengyuanchen/cropperjs 项目地址: https://gitcode.com/gh_mirrors/vu/vue-cropperjs 在现代Web开发中,图片处理已成为…

作者头像 李华
网站建设 2026/4/23 13:57:30

DCT-Net创意工坊:与Stable Diffusion联动的艺术风格融合实验

DCT-Net创意工坊:与Stable Diffusion联动的艺术风格融合实验 你有没有想过,把自己的照片变成动漫角色?或者让一张写实人像瞬间拥有手绘水彩的质感?现在,借助AI技术,这一切不仅可能,而且越来越简…

作者头像 李华