2014-05-11 05:55

题目链接

原题:

difference between thread and process.

题目:请描述进程和线程的区别。

解法:操作系统理论题。标准答案在恐龙书上,我自己回忆了一点。我想就算是面试官也不会一字一句地要求你背书的,对于要点掌握住就可以了。

代码:

 // http://www.careercup.com/question?id=5718181884723200
Answer:
Process:
. Basic element of resource allocation in the operating system.
. Possesses independent resources:
a. code segment
b. data segment
i. constant data
ii. global variable
iii. stack
iv. heap
c. register
d. program counter
. Have independent virtual address mapping.
. It has life cycle, it is running, in contrast to a program.
Thread:
. Basic element of CPU scheduling.
. Possesses part of independent resources:
a. register
b. stack
c. program counter
. Multiple threads share part of resources in same process:
a. code segment
b. data segment
i. constant data
ii. global variable
iii. heap
. All threads in a process share the same address space.
. It has life cycle

最新文章

  1. 建造者模式组装mybatis参数Example()
  2. MySQL随机获取数据的方法,支持大数据量
  3. Mysql Concat()bug
  4. cocos2d-x知识巩固-基础篇(2)
  5. java实现生产者消费者问题
  6. HDU 3264 Open-air shopping malls (计算几何-圆相交面积)
  7. deinstall oracle 11g on linux
  8. 前端教你学UI——人物处理(一)
  9. 快速搭建一个Fabric 1.0的环境
  10. Elasticsearch.Net、Nest批量插入BulkAll
  11. 【转载】OpenSSL 提取 pfx 数字证书公钥与私钥
  12. 洛谷P3627[APOI2009] (讨厌的)抢掠计划
  13. 移动端web页面列表类上拉加载,查看详情,iframe嵌套第三方页面遇到的问题以及解决办法
  14. CF449 (Div. 1简单题解)
  15. 使用JavaScript完成文字向上间歇滚动
  16. pandas的离散化,面元划分
  17. pandas的日常笔记--查询
  18. Class AB与Class D功放
  19. MFC使用自定义资源加载PNG
  20. mvc view获取url参数

热门文章

  1. 实现IHttpModule接口,给每个页面输出一段脚本
  2. 二十、ValueStack的常用方法
  3. 条款19 command 模式与好莱坞法则
  4. C#基础-可访问性-public、ptotected、protected internal、internal、private
  5. 使用javascript取得网站的根路径
  6. NodeJs 中的Crypto 加密模块
  7. Delete PeopleSoft Query From the Database
  8. css半透明
  9. 关于ASP.net TextBox控件的失去焦点后触发其它事件
  10. Vue.js学习 Item11 – 组件与组件间的通信