当前位置:网站首页>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 .
边栏推荐
猜你喜欢

21. 合并两个有序链表
![[esp32][esp idf] esp32s3 quickly build lvglv7.9](/img/39/8efef047d0a9223b97819a54b5edf8.png)
[esp32][esp idf] esp32s3 quickly build lvglv7.9

On July 13, 2021, we collapsed like this

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

Why should I take the first-class constructor examination? How high is the gold content of the first-class Constructor Certificate?

ADVANCE.AI出海指南助力企业出海印尼,掌握东南亚市场半边天

B2B e-commerce website scheme for building materials industry: enable the transformation and upgrading of building materials enterprises to achieve cost reduction and efficiency improvement

5、动态规划---斐波那契数列

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

Flink - checkpoint Failure reason: Not all required tasks are currently running
随机推荐
Oracle中的小知识
MySQL的SQL TRACE一例
[jzof] 14 cut rope
Skiasharp's WPF self drawn drag ball (case version)
What kind of knowledge payment system functions are more conducive to the development of the platform and lecturers?
7、二分法——寻找一组重复或者有序但是旋转的数组
QT | some summaries of signals and slots
Tencent technical experts: decrypt the 100 million user products wechat, QQ, King glory... Comprehensively practice on the cloud!
Kubernetes
ASP. Net core 6 framework unveiling example demonstration [29]: building a file server
5、动态规划---斐波那契数列
3.用数组逆序打印链表
Summary of key points of bank entry examination
什么样的知识付费系统功能,更有利于平台与讲师发展?
15、判断二维数组中是否存在目标值
11、链表反转
leetcode——旋转数组的最小数字
[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals
LIBCMTD.lib
房地产数字化转型方案:全方位数智化系统运营,助力房企管控实效提升