当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 国内三大云数据库测试对比
- Flink的DataSource三部曲之三:自定义
- Esockettimeout solution in request in nodejs
- How does semaphore, a thread synchronization tool that uses an up counter, look like?
- android开发中提示:requires permission android.permission write_settings解决方法
- How to reduce the resource consumption of istio agent through sidecar custom resource
- 基于链表的有界阻塞队列 —— LinkedBlockingQueue
- What courses will AI programming learn?
- Octave basic syntax
- How does pipedrive support quality publishing with 50 + deployments per day?
猜你喜欢
AQS 都看完了,Condition 原理可不能少!
Five factors to consider before choosing API management platform
Octave基本语法
Factory pattern pattern pattern (simple factory, factory method, abstract factory pattern)
上线1周,B.Protocal已有7000ETH资产!
Leetcode-15: sum of three numbers
Have you ever thought about why the transaction and refund have to be split into different tables
Introduction skills of big data software learning
android开发中提示:requires permission android.permission write_settings解决方法
Introduction to nmon
随机推荐
B. protocal has 7000eth assets in one week!
大数据软件学习入门技巧
Teacher Liang's small class
B. protocal has 7000eth assets in one week!
Review of API knowledge
选择API管理平台之前要考虑的5个因素
leetcode之反转字符串中的元音字母
A few lines of code can easily transfer traceid across systems, so you don't have to worry about losing the log!
Flink's datasource Trilogy 3: customization
Factory Pattern模式(简单工厂、工厂方法、抽象工厂模式)
Constructors and prototypes
【200人面试经验】,程序员面试,常见面试题解析
Test comparison of three domestic cloud databases
文件拷贝的实现
程序员都应该知道的URI,一文帮你全面了解
Tips in Android Development: requires permission android.permission write_ Settings solution
First development of STC to stm32
How to analyze Android anr problems
上线1周,B.Protocal已有7000ETH资产!
Platform in architecture