Every single thread has the follow elements:

  1. Execution Context:Every thread has a execution context which maintains some basical data about the running of the thread, like windows identity information, pricipal ,etc.One important thing about execution context is,when a thread create another thread (say,to do some work asynchronously), the execution context will "flow" from main thread to the sub-thread to let it run just like the main thread do.You can say that a "execution context inherit". You can stop this by calling the System.Threading.ExecutionContext.SuppressFlow() static method, that will help improve the performance.
  2. Thread Kernel Object:TKO is a data structure.Everytime when a thread is created,a TKO will be assigned and initialized.TKO maintains a property of descriping the thread, and thread context.
  3. Thread Environment Block,which is related to exception.
  4. User-Mode Stack: this stack stores the local variables and arguments in the method,and the returnning address of the method,so the thread can move on from this address when returned from the method.
  5. Kernel-Mode Stack:a stack which managed by OS kernel function.
  6. Thread context switch causes a bad performence.Here is how a context switch work :OS will move the data on CPU's register to the current thread's context, then move the target thread's context data into the cpu register so that the cpu can do its work.

最新文章

  1. 【CSS3动画】transform对文字及图片的旋转、缩放、倾斜和移动
  2. python中非关键字可变长参数和关键字变量参数的区别
  3. AE创建一个空白的Shapefile
  4. Oracle Temp表空间切换
  5. Ceph性能优化总结(v0.94)
  6. SQL中Where与Having的区别
  7. 包含Blob字段的表无法Export/Import
  8. 【转】PackageInfo、ResolveInfo 笔记
  9. 使用Eclipse构建Maven的SpringMVC项目
  10. android之Widget01
  11. iOS 两种方法实现左右滑动出现侧边菜单栏 slide view
  12. android 遇到的细节 FAQ
  13. windows系统SVN和apache的下载和安装
  14. Nginx编译参数
  15. FFmpeg 结构体学习(二): AVStream 分析
  16. C#.NET 大型通用信息化系统集成快速开发平台 4.6 版本 - SSO单点登录接口
  17. PowerDesigner 学习:十大模型及五大分类
  18. 01_hello world
  19. web项目目录结构
  20. mfc 虚函数

热门文章

  1. java课程设计-坦克大战
  2. CSS: body{font-size: 62.5%;}设置原因
  3. Java 字符串拼接 StringBuilder() StringBuffer
  4. 学习笔记之PHP
  5. 面试总结之JAVA
  6. NFS 相关操作指令
  7. PHP CRC16 校验码的算法怎么使用
  8. oracle事务知识点小结
  9. jQuery用FormData对象实现文件上传以及如何通过ajax下载文件
  10. win10 修改hosts