当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
Using containers to store table data
使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
Why need to use API management platform
Core knowledge of C + + 11-17 template (2) -- class template
salesforce零基础学习(九十八)Salesforce Connect & External Object
几行代码轻松实现跨系统传递 traceId,再也不用担心对不上日志了!
Five factors to consider before choosing API management platform
程序员都应该知道的URI,一文帮你全面了解
理论与实践相结合彻底理解CORS
STS安装
随机推荐
国内三大云数据库测试对比
Pipedrive如何在每天部署50+次的情况下支持质量发布?
Five phases of API life cycle
A brief introduction of C code to open or close the firewall example
The vowels in the inverted string of leetcode
六家公司CTO讲述曾经历的“宕机噩梦”
Five design patterns frequently used in development
装饰器(一)
大数据软件学习入门技巧
表连接
Salesforce connect & external object
文件拷贝的实现
API部分的知识点复习
LeetCode-15:三数之和
Tips in Android Development: requires permission android.permission write_ Settings solution
B. protocal has 7000eth assets in one week!
你有没有想过为什么交易和退款要拆开不同的表
《MFC dialog中加入OpenGL窗体》
Copy the picture
Dynamic relu: Microsoft's refreshing device may be the best relu improvement | ECCV 2020