操作系统大内核和微内核

内核输入/输出子系统 (Kernel Input / Output subsystem)

Input and output (I/O) devices permit us to communicate with the computer system. I/O is the transfer of data between RAM and various I/O peripherals. By using Input devices such as keyboards, mouse, card readers, scanners, voice recognition systems, and touch screens we can enter data into the computer. y using output devices such as monitors, printers, plotters, and speakers allow us to get information from the computer.

输入和输出(I / O)设备允许我们与计算机系统进行通信。 I / O是RAM和各种I / O外设之间的数据传输。 通过使用输入设备,例如键盘,鼠标,读卡器,扫描仪,语音识别系统和触摸屏,我们可以将数据输入计算机。 使用显示器,打印机,绘图仪和扬声器之类的输出设备可以使我们从计算机中获取信息。

These devices directly not connected with the CPU. But there is an interface that manages the data transfers between them. The system bus signals converted to and from a format that is acceptable to the given device by this interface. Communication between these external devices and processor is done via I/O registers.

这些设备直接未与CPU连接。 但是有一个接口可以管理它们之间的数据传输。 系统总线通过此接口将信号转换为给定设备可以接受的格式,或从该设备接受该格式。 这些外部设备和处理器之间的通信通过I / O寄存器完成。

The kernel provides many services related to I/O. Several services such as scheduling, caching, spooling, device reservation, and error handling – are provided by the kernel, and build on the hardware and device driver infrastructure.

内核提供了许多与I / O相关的服务。 内核提供了一些服务,例如调度,缓存,后台处理,设备保留和错误处理,这些服务建立在硬件和设备驱动程序基础结构上。

We will discuss kernel services such as I/O scheduling, Caching, Buffering, Spooling, Device Reservation, I/O Protection, and Error Handling.

我们将讨论内核服务,例如I / O调度,缓存,缓冲,假脱机,设备保留,I / O保护和错误处理。

1)排程 (1) Scheduling)

It means to determine a good order in which to execute input/output requests called disk scheduling.

这意味着确定执行输入/输出请求的良好顺序,称为磁盘调度。

Scheduling I/O requests can greatly improve overall efficiency. Priorities can also play a vital role in request scheduling and can reduce the average waiting time for I/O to complete.

安排I / O请求可以大大提高整体效率。 优先级还可以在请求调度中发挥至关重要的作用,并且可以减少I / O完成的平均等待时间。

By this device access, permissions will be fair to all jobs. When an application issues a blocking I/O system call, the request is placed on the job queue for that device. The order of the queue rearranges by the Kernel I/O scheduler to improve the overall system efficiency.

通过此设备访问,权限将对所有作业均公平。 当应用程序发出阻塞的I / O系统调用时,该请求将放置在该设备的作业队列上。 队列的顺序由内核I / O调度程序重新排列,以提高整体系统效率。

2)缓存 (2) Caching)

It involves keeping a copy of data in a faster access location than where the data is normally stored.

它涉及将数据副本保存在比通常存储数据的位置更快的访问位置。

For example, when you request a file by looking at a Web page are stored on your hard disk in a cache subdirectory under the directory for your browser. When you get back to a page you have recently visited, the browser can get those files from the cache rather than the original server, saving you time and saving the network the burden of additional traffic.

例如,当您通过查看网页来请求文件时,网页存储在您的硬盘上浏览器目录下的缓存子目录中。 当您返回到您最近访问过的页面时,浏览器可以从缓存而不是原始服务器中获取这些文件,从而节省了时间并减轻了网络额外流量的负担。

There is a difference between cache and buffer is cache is a duplicate copy of some other data stored elsewhere whereas buffer stores copy of an existing data item.

高速缓存与缓冲区之间的区别在于,高速缓存是存储在其他位置的某些其他数据的副本,而缓冲区则存储现有数据项的副本。

3)缓冲 (3) Buffering)

Buffer is a memory area maintains by Kernel I/O Subsystem that stores data while they are transferred between two devices or between a device with an application.

缓冲区是由内核I / O子系统维护的存储区,用于在两个设备之间或带有应用程序的设备之间传输数据时存储数据。

Buffering is done for three reasons.

进行缓冲有三个原因。

  1. One reason is to adapt to devices that have different data transfer sizes.

    原因之一是要适应具有不同数据传输大小的设备。

  2. A second use of buffering is to support copy semantics for an application I/O. An application wants to write data on disk which is stored in its buffer, it is called “copy semantic ”. it calls the write() system call, providing a pointer to the buffer and the integer specify the number of bytes to write.

    缓冲的第二个用途是支持应用程序I / O的复制语义。 一个应用程序想要在磁盘上写入存储在其缓冲区中的数据,这被称为“复制语义”。 它调用write()系统调用,提供指向缓冲区的指针,整数指定要写入的字节数。

  3. A third one is to cope with the speed mismatch between the producer and consumer of the data stream.

    第三个是应付数据流的生产者和消费者之间的速度不匹配。

4)假脱机 (4) Spooling)

A spool is a type of buffer that holds output for a device. It is the process in which jobs from the cards are read directly onto the disk and the location of that card in the disk is recorded in a table by the operating system. When that job is required for execution, it is read from the disk.

假脱机是一种缓冲区,用于保存设备的输出。 在此过程中,卡中的作业被直接读取到磁盘上,操作系统将该卡在磁盘中的位置记录在表中。 当需要执行该作业时,将从磁盘读取该作业。

For example, several applications may wish to print their output concurrently, so spooling solves this problem by maintaining a queue for the output. A printer does not accept interleaved data. The output of all application is spooled in a separate disk file. When an application finishes printing then the spooling system queues the corresponding spool file for output to the printer.

例如,几个应用程序可能希望同时打印其输出,因此假脱机通过为输出保留队列来解决此问题。 打印机不接受交错数据。 所有应用程序的输出都后台处理在单独的磁盘文件中。 当应用程序完成打印时,假脱机系统会将相应的假脱机文件排队,以输出到打印机。

5)设备预约 (5) Device Reservation)

It provides exclusive device access. Allocation of devices when required by the processes and that device when it is no longer needed. It prevents deadlock. Many operating systems provide features that enable processes to coordinate and give exclusive access to them.

它提供独占的设备访问权限。 在流程需要时分配设备,在不再需要时分配设备。 它可以防止死锁。 许多操作系统提供的功能使进程能够进行协调并为其提供独占访问权。

6)I / O保护 (6) I/O Protection)

I/O must be performed via system calls. User processes may accidentally or purposefully attempt to disrupt normal operation via illegal I/O instructions. To prevent a user from do all I/O instructions defined to be privileged.

I / O必须通过系统调用执行。 用户进程可能会通过非法的I / O指令意外或有意地破坏正常操作。 为了防止用户执行所有定义为特权的I / O指令。

7)错误处理 (7) Error Handling)

An operating system that uses protected memory that can guard against many kinds of hardware and application errors. Devices and I/O transfers may fail in some manner, either for transient reasons, as when a network becomes overloaded or for permanent reasons, as when a disk controller becomes defective.

一个使用受保护的内存的操作系统,可以防止多种硬件和应用程序错误。 设备和I / O传输可能会以某种方式失败,可能是由于暂时原因(例如网络过载时),也可能是由于永久性原因(例如磁盘控制器出现故障)。

翻译自: https://www.includehelp.com/operating-systems/kernel-io-subsystem.aspx

操作系统大内核和微内核

操作系统大内核和微内核_操作系统中的内核I / O子系统相关推荐

  1. 操作系统大内核和微内核_操作系统中的内核

    操作系统大内核和微内核 A Kernel is the central component of an Operating System. The Kernel is also said to be ...

  2. 操作系统大内核和微内核_操作系统中的内核类型

    操作系统大内核和微内核 As we have already studied about the Kernels, we know that the Kernel is a program which ...

  3. 【Linux 内核】宏内核与微内核架构 ( 操作系统需要满足的要素 | 宏内核 | 微内核 | Linux 内核动态加载机制 )

    文章目录 一.操作系统需要满足的要素 二.宏内核 三.微内核 四.Linux 内核动态加载机制 一.操作系统需要满足的要素 电脑上运行的 操作系统 , 是一个 软件 ; 设备管理 : 操作系统需要 为 ...

  4. linux 内核编号含义_如何阅读linux内核代码?

    阅读代码从来就是不可行的方法,有篇文章详细讲了这个事,很多人都觉得应该多读代码, 读好的代码,比如Donald Knuth. 但事实上, 只要简单让你描述一下最近读了什么代码,绝大多数人都说不上.文章 ...

  5. 骆驼祥子大事件时间轴_骆驼中的事件处理

    骆驼祥子大事件时间轴 在上一篇有关骆驼-小水车的文章中,我介绍了骆驼-小水车的组件,并使用骆驼路线中的规则实现了一些简单的面向任务的过程. 今天,我将展示如何通过添加事件处理来扩展此示例. 那么如何描 ...

  6. rust大油田分解机_睡梦中,狂风起!大棚棉被刮翻了,卷帘机也连带吹坏了......

    前两天,北京.山东.河北.河南等地出现了大风降温天气,风力强劲,多地发布了大风蓝色预警.在<中国蔬菜>微信群里,很多朋友都说,夜里一刮大风,很多菜农都是彻夜难眠. 风有多大,听听视频中的声 ...

  7. suse 内核编译安装_升级SUSE Linux内核的完整步骤!

    安装完SLED 10后发现仍然有"热启动网络不通"的问题,原因是内核版本较低,于是升级到2.6.17版内核,成功解决此问题.为了造福广大菜鸟,分享一下我的经验,欢迎高手批评补充. ...

  8. 【操作系统】大内核和微内核的比较

    操作系统基本的两种体系结构是大内核和微内核. 大内核系统将操作系统的主要功能模块都作为一个紧密联系的整体运行在内核态,从而为应用系统提供高性能的系统服务. 微内核系统将操作系统内核中最基本的功能保留在 ...

  9. 操作系统----大内核与微内核

    操作系统内核 1.大内核 大内核是将操作系统功能作为一个紧密结合的整体放到内核.由于各模块共享信息,因此有很高 的性能. 但随着体系结构和应用需求的不断发展,需要操作系统提供的服务越来越多,而且接口形 ...

最新文章

  1. 【内核】嵌入式linux内核的五个子系统
  2. 计划实现一个开源的KV数据库——Simple DB
  3. 调整linux系统时区
  4. c++ opencv 通过网络连接工业相机_摄像头和机器人视觉开发中的「相机标定」,你了解多少?...
  5. C语言 extern “C” - C语言零基础入门教程
  6. 61. Rotate List
  7. java violate 实例_Java的Volatile实例用法及讲解
  8. 安卓rom制作教程_OPPO Reno安卓9系统如何升级ColorOS6.7最新版本-安卓10系统
  9. VB.NET实现Windows剪贴板监视器
  10. Redis实战第一篇
  11. Cordova+Vue实现Android APP开发
  12. NMF非负矩阵分解算法(Non-negative Matrix Factorization)
  13. 阿里云服务器centos7上手安装-4 防火墙篇
  14. 输出7和7的倍数,还有包含7的数字例如(17,27,37...70,71,72,73...)
  15. MCS:离散随机变量——Poisson分布
  16. 用Mailgun方式在Drone pipeline中集成SMTP邮件通知
  17. a标签的tagart属性
  18. HP小型机 nPartiton 分区管理
  19. 西安软件测试员工资是多少,【华为西安研究所工资】软件测试工程师待遇-看准网...
  20. 腾讯35亿收下搜狗,BAT新一轮大战一触即发

热门文章

  1. 学python哪个网站好-有哪些值得推荐的Python学习网站|
  2. libzdb 连接mysql,数据库连接池库libzdb使用教程
  3. pytorch 查看参数是否被训练 require_grad()
  4. Angular国际化方案
  5. c#统计字符串中数字字符的个数【C#】
  6. Exploit开发系列教程-Mona 2 SEH
  7. 形象易懂讲解算法I——小波变换
  8. 微软Azure云之企业Exchange 2016部署12—配置负载平衡
  9. hdu 5631 Rikka with Graph(图)
  10. 一步一步搭建客服系统 (7) 多人共享的电子白板、画板