当前位置:网站首页>Differences among pipes, pipe passes and pipe States
Differences among pipes, pipe passes and pipe States
2022-07-28 10:15:00 【interval_ package】
The Conduit 、 Tube side 、 Difference of tube state
Sum up the comparison
| purpose | nature | |
|---|---|---|
| Tube side | Used for process synchronization | A data structure , It is convenient for us to manage a series of semaphores , At the same time, encapsulate the semaphore operation |
| The Conduit pipe | For process communication | pipe The communication of is based on the file system , that pipe It's actually a file , We passed this document IO To indirectly realize the communication between processes |
| Tube state | Control the permissions of the process | PCB One of the signs , Used to confirm the permission status of the current process |
Learn from others' articles :
Tube side
( Process synchronization ) Centralize shared variables and all operations that can be performed on shared variables in one module , An operating system or concurrent program is composed of several such modules , Because a module is usually short , The connection between modules is clear , Improved readability , Easy to maintain and modify , Correctness is easy to guarantee .
The Conduit
( Process of communication also socket、 mail 、 Semaphore 、 Shared memory 、 Message queue, etc )
The so-called pipeline , It is an open shared file connected between two processes , Dedicated to data communication between processes . The sending process can continuously write data streams from one end of the pipeline , The length of each write is variable ; The receiving process can read data from the other end of the pipe when needed , The readout unit length is also variable . obviously , The foundation of pipeline communication is file system .
Tube state
Tube state ( The system state ) V.S Eye state ( User mode )
CPU Alternate between operating system programs and user programs .
CPU The status of belongs to the program status word PSW One of . Most computer systems will CPU The execution status is divided into pipe status and target status .
Tube state is also called privilege state , System state or nuclear state of mind .CPU The complete set of instruction system can be executed in tube state . Usually , The operating system runs in tube mode .
Target state is also called normal state or user state . When the machine is in target state , The program can only execute non privileged instructions . The user program can only run in the target state , If the user program executes the privilege instruction in the target state , The hardware will interrupt , Controlled by the operating system , Privileged instruction execution is prohibited , This can prevent the user program from damaging the system intentionally or unintentionally .
The only way to change from the target state to the tube state is to interrupt .
From the pipe state to the target state can be achieved by modifying the program status word , This will be accompanied by the conversion from operating system programs to user programs .
边栏推荐
猜你喜欢

6、双指针——递增数组两数之和与目标数相等

What are the advantages of MRO purchasing website for industrial products? One article will help you understand

office2013以上输入数学公式
![[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals](/img/bf/0a968064a8f7c11b86a2a2820208e6.png)
[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals

7、二分法——寻找一组重复或者有序但是旋转的数组

API 网关 APISIX 在Google Cloud T2A 和 T2D 的性能测试

定了!就在7月30日!

Redis interview questions must be known and learned

我用小程序容器让移动研发效率提升了5倍!

What kind of knowledge payment system functions are more conducive to the development of the platform and lecturers?
随机推荐
我用小程序容器让移动研发效率提升了5倍!
13 probability distributions that must be understood in deep learning
Redis设计规范
排序——快速排序(快慢指针实现)
Massive data topn problem
语音聊天app——如何规范开发流程?
[esp32][esp idf] esp32s3 quickly build lvglv7.9
21. 合并两个有序链表
海量数据TopN问题
用K-means聚类分类不同行业的关税模型
管道、管程、管态的区别
[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals
Elk real time log analysis platform
PL/SQL server语法详解
19. 删除链表的倒数第 N 个结点
ELK实时日志分析平台
SuperMap iServer发布管理以及调用地图服务
2021-10-13arx
uni-app进阶之创建组件/原生渲染
(10) Defer keyword