2005 1 26 process And threAd

其实一直没搞清楚process和threAd的关系,,因为自己现在看的linux版本里还没有threAd的概念,,,这两天看了看,就windows下的threAd其实同linux下的process很相象,都是调度的最小单位,,windows下,process只提供进程的context和其他的一些变量,inside windows2000里有段话很清楚:

As already noted, Windows 2000 schedules at the thread granularity. This approach makes sense when you consider that processes don't run but only provide resources and a context in which their threads run. Because scheduling decisions are made strictly on a thread basis, no consideration is given to what process the thread belongs to. For example, if process A has 10 runnable threads and process B has 2 runnable threads, and all 12 threads are at the same priority, each thread would receive one-twelfth of the CPU time—Windows 2000 wouldn't give 50 percent of the CPU to process A and 50 per

windows下的threAd没有自己的地址空间,它同本process中的其他 threAd公用同一个,,但每个threAd是有自己的kernel stAck的,,,也应该有user stAck吧,,,,
   linux2.6里内核线程也可以抢占了,,而windwos里本来就可以

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值