您的位置:首页 > 其它

2005 1 26 process And threAd

2005-01-26 00:26 309 查看
其实一直没搞清楚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里本来就可以
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: