当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- When iperf is installed under centos7, the solution of make: * no targets specified and no makefile found. Stop
- 当我们聊数据质量的时候,我们在聊些什么?
- Core knowledge of C + + 11-17 template (2) -- class template
- 写时复制集合 —— CopyOnWriteArrayList
- 使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
- 装饰器(一)
- 【200人面试经验】,程序员面试,常见面试题解析
- Why need to use API management platform
- 分库分表的几种常见玩法及如何解决跨库查询等问题
- C + + adjacency matrix
猜你喜欢

Factory pattern pattern pattern (simple factory, factory method, abstract factory pattern)

【200人面试经验】,程序员面试,常见面试题解析

Combine theory with practice to understand CORS thoroughly

What are the basic requirements for big data posts?

移动大数据自有网站精准营销精准获客

Fiddler无法正常抓取谷歌等浏览器的请求_解决方案

Octave basic syntax

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

服务器性能监控神器nmon使用介绍

Five design patterns frequently used in development
随机推荐
Factory pattern pattern pattern (simple factory, factory method, abstract factory pattern)
Linked blocking queue based on linked list
Realization of file copy
How to get started with rabbitmq
Tips in Android Development: requires permission android.permission write_ Settings solution
使用容器存储表格数据
Factory Pattern模式(简单工厂、工厂方法、抽象工厂模式)
Chapter 5 programming
Dynamic ReLU:微软推出提点神器,可能是最好的ReLU改进 | ECCV 2020
salesforce零基础学习(九十八)Salesforce Connect & External Object
Leetcode-11: container with the most water
Nodejs中request出现ESOCKETTIMEDOUT解决方案
写时复制集合 —— CopyOnWriteArrayList
分库分表的几种常见玩法及如何解决跨库查询等问题
How does semaphore, a thread synchronization tool that uses an up counter, look like?
leetcode之反转字符串中的元音字母
Five design patterns frequently used in development
AQS 都看完了,Condition 原理可不能少!
架构中台图
小议缓冲区溢出