当前位置:网站首页>1. What does the operating system do?
1. What does the operating system do?
2020-11-09 00:28:00 【Hakou】
In the last article, we told a brief history of computers , In the development of computer, the operating system gradually appeared . But what the operating system is for doesn't tell us , So this article will talk about The role of operating systems in the whole computer world .
Let's first look at the definition of an operating system .
That's what Wikipedia says :
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.( The operating system is the management of computer hardware and software resources , And system software that can provide a variety of common services for applications .)
Baidu Encyclopedia is so introduced :
operating system (Operating System, abbreviation OS) It is a computer program that manages computer hardware and software resources . The operating system needs to deal with memory management and configuration 、 Determine the priority of supply and demand of system resources 、 Control input device and output device 、 Basic affairs such as operation network and management file system . The operating system also provides an interface for users to interact with the system .
As can be seen from the above description : First , The operating system is a piece of software , It's like any other application , It's software in nature . secondly , Operating system, which can manage computer hardware resources , such as CPU、 Memory 、 Hard disk 、 mouse 、 Monitors and so on . and , The operating system, which also manages the software on the computer , It can control the life and death of other software on the computer , Kill whoever you want , If you want to give more resources to any software, you can give more resources to that software .
therefore , The operating system, which acts as an intermediary coordinator between hardware and application software , As shown in the figure below .

What are the specific tasks of the operating system ?
1. Process management . A process can be understood as a task , For example, playing music is a process . The state of each process can be divided into newly build 、 be ready 、 function 、 Blocking 、 End These five states , Of course, in the actual operating system, the process is more than these States , After all, the reality is always more complicated . Process management is to manage the process in these five states : The loader creates a new process , Allocate resources to the newly created process and enter the ready state , When the process gets CPU Then it can be run , At this point it's in the running state , If you run half of it CPU It's preempted by other processes , It's going to get stuck , Wait for other processes to put CPU Give it back , When it gets it again CPU After entering the running state and executing the task , It goes into a termination state , The operating system will allocate the memory previously allocated to it 、 File and other resources recycling , And kill it .

2. Process synchronization . If the operating system runs only one process from beginning to end , There must be no process synchronization problem . What is process synchronization ? It's when multiple processes grab resources , How to arrange these processes to acquire resources . For example , We must all have been to the playground , You'll also find that there's a lot of people lining up for every hot project . If you think of people as processes , Popular games are seen as resources , When a lot of people want to play a hot item without queuing up , This project will be a mess , Even the whole project can't work properly . How to manage everyone to use the game project is called process synchronization , In reality, people usually synchronize processes by queuing , It's the same thing in the operating system .

3. memory management . When a program runs, it becomes a process , And processes need memory to run . Let's use people as an example , After birth , He needs food 、 clothes 、 house 、 Transportation, etc , These things can be seen as memory resources . When people die , These things will be recycled , It's the same as the operating system reclaiming process resources .

4. Storage management . Storage management is not just about disk or file management , It also includes how the process works with peripherals IO.
5. Equipment management . A computer contains a lot of peripherals , Like the monitor 、 disk 、 mouse 、 Keyboard light , When these devices are going to be connected to the computer , How the computer receives information from these devices , And how to manage these devices , These belong to the content of equipment management .

These are the main tasks of the operating system , All it does is dirty work , It's also the manual work before the advent of operating systems . The purpose of creating an operating system is In order to transfer the dirty work to the machine , Lighten the burden on mankind , Increase work efficiency .
ps. Welcome to the official account " Hackle ".

版权声明
本文为[Hakou]所创,转载请带上原文链接,感谢
边栏推荐
- 大数据岗位基础要求有哪些?
- How to deploy pytorch lightning model to production
- 几行代码轻松实现跨系统传递 traceId,再也不用担心对不上日志了!
- 简单介绍c#通过代码开启或关闭防火墙示例
- Concurrent linked queue: a non blocking unbounded thread safe queue
- 使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
- How does semaphore, a thread synchronization tool that uses an up counter, look like?
- 服务器性能监控神器nmon使用介绍
- 选择API管理平台之前要考虑的5个因素
- centos7下安装iperf时出现 make: *** No targets specified and no makefile found. Stop.的解决方案
猜你喜欢

老大问我:“建表为啥还设置个自增 id ?用流水号当主键不正好么?”

云计算之路-出海记-小目标:Hello World from .NET 5.0 on AWS

Huawei HCIA notes

VIM 入门手册, (VS Code)

SQL语句的执行

centos7下安装iperf时出现 make: *** No targets specified and no makefile found. Stop.的解决方案

梁老师小课堂|谈谈模板方法模式

What courses will AI programming learn?

Copy on write collection -- copyonwritearraylist

文件拷贝的实现
随机推荐
Web上的分享(Share)API
实现图片的复制
Why need to use API management platform
教你如何 分析 Android ANR 问题
Introduction to nmon
六家公司CTO讲述曾经历的“宕机噩梦”
Combine theory with practice to understand CORS thoroughly
First development of STC to stm32
【200人面试经验】,程序员面试,常见面试题解析
表连接
通过canvas获取视频第一帧封面图
Linked list
理论与实践相结合彻底理解CORS
Decorator (2)
AQS 都看完了,Condition 原理可不能少!
Copy the picture
Dynamic ReLU:微软推出提点神器,可能是最好的ReLU改进 | ECCV 2020
Database design: paradigms and anti paradigms
如何将 PyTorch Lightning 模型部署到生产中
LeetCode-15:三数之和