13.1. Symmetrical Multi-Processing
来源:互联网 发布:域名反向解析怎么设置 编辑:程序博客网 时间:2024/05/18 20:31
By relatively easy, I mean exactly that: not that it's really easy. In a symmetrical multi-processing environment, the CPU's share the same memory, and as a result code running in one CPU can affect the memory used by another. You can no longer be certain that a variable you've set to a certain value in the previous line still has that value; the other CPU might have played with it while you weren't looking. Obviously, it's impossible to program like this.
In the case of process programming this normally isn't an issue, because a process will normally only run on one CPU at a time[1]. The kernel, on the other hand, could be called by different processes running on different CPU's.
In version 2.0.x, this isn't a problem because the entire kernel is in one big spinlock. This means that if one CPU is in the kernel and another CPU wants to get in, for example because of a system call, it has to wait until the first CPU is done. This makes Linux SMP safe[2], but inefficient.
In version 2.2.x, several CPU's can be in the kernel at the same time. This is something module writers need to be aware of.
Notes
[1]The exception is threaded processes, which can run on several CPU's at once.
[2]Meaning it is safe to use it with SMP
- 13.1. Symmetrical Multi-Processing
- SMP(Symmetrical Multi-Processing)
- Python Multi-Processing多线程编程
- Parallel Processing and Multi-Core Utilization with Java
- 1MULTI-DIMENSIONAL SIGNAL PROCESSING AND CIRCUITS FOR ADVANCED ELECTRONICALLY SCANNED ANTENNA ARRAYS
- 2MULTI-DIMENSIONAL SIGNAL PROCESSING AND CIRCUITS FOR ADVANCED ELECTRONICALLY SCANNED ANTENNA ARRAYS
- 3MULTI-DIMENSIONAL SIGNAL PROCESSING AND CIRCUITS FOR ADVANCED ELECTRONICALLY SCANNED ANTENNA ARRAYS
- 4MULTI-DIMENSIONAL SIGNAL PROCESSING AND CIRCUITS FOR ADVANCED ELECTRONICALLY SCANNED ANTENNA ARRAYS
- multi-
- Idle Processing
- Processing - 1
- Processing Flow
- Mount Processing
- Event Processing
- Asynchronous Processing
- Processing- CreateThread()
- Contour Processing
- trouble processing
- 嵌入式方面名词术语总结
- 文本工具箱——“sed”篇
- 12.1. Interrupt Handlers
- 内核分类
- URL Rewrite技术
- 13.1. Symmetrical Multi-Processing
- 14.1. Common Pitfalls
- asp.net第一篇
- A.1. Changes between 2.0 and 2.2
- Spring使用JdbcTemplate操作数据库---使用RowMapperResultSetExtractor读数据篇
- B.1. Where From Here?
- ASP.NET
- C#中TreeView组件使用方法初步
- Nokia面试经历zz