首页 > 试题广场 >

As described in Section 4.5.2,

[问答题]
As described in Section 4.5.2,Linux does not distinguish between processes and threads.Instead,Linux treats both in the same way,allowing a task to be more akin to a process or a thread depending on the set of flags passed to the clone( ) system call.However,many operating systems—such as Windows XP and Solaris—treat processes and threads differently.Typically,such systems use a notation wherein the data structure for aprocess contains pointers to the separate threads belonging to the process.Contrast these two approaches for modeling processes and threads within the kernel.
推荐
On one hand,in systems where processes and threads are considered as similar entities,some of the operating system code could be simplified.A scheduler,for instance,can consider the different processes and threads in equal footing without requiring special code to examine the threads associated with aprocess during every scheduling step.On the other hand,this uniformity could make it harder to impose process-wide resource constraints in a direct manner.Instead,some extra complexity is required to identify which threads correspond to which process and perform the relevant accounting tasks.
发表于 2018-05-05 22:03:21 回复(0)