English 中文(简体)
流程表和校对时间表
原标题:Process scheduler and thread scheduler

I was reading through galvin chapters on process and thread Looking at processes , multiple processes are scheduled by the cpu scheduler or short term scheduler , after this comes the concept that a thread is a path of execution and a process can contain multiple threads . Now i thought of a scenario , Suppose the cpu scheduler schedules a process for execution using round robin algo , now suppose the scheduled process has 50 threads , now in this scenario how are the threads withing the same process scheduled and how does the context switch b/w threads , process happen Can plz sm one explain me the entire scenario in detals , i will be very thankfullll

问题回答

Process is a program in execution and its the job of the programmer to decide the number of threads in that process and how they would be scheduled.. it depends on which sequence he would like the program to run.. so as soon as the process is in running state it would run the thread that was scheduled to run by the programmer.. Even in case of threads running concurrently its the programmer who decides which threads can run concurrently and which cannot.. i hope this clears your doubt.





相关问题
CPU检查 C#

是否有任何人知道如何从C#中检查CPU是否支持人口计算?

Using Java to retrieve the CPU Usage for Window s Processes

I am looking for a Java solution to finding the CPU usage for a running process in Windows. After looking around the web, there seems to be little information on a solution in Java. Keep in mind, I am ...

How can I do a CPU cache flush in x86 Windows?

I am interested in forcing a CPU cache flush in Windows (for benchmarking reasons, I want to emulate starting with no data in CPU cache), preferably a basic C implementation or Win32 call. Is there a ...

How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Optimal number of threads per core

Let s say I have a 4-core CPU, and I want to run some process in the minimum amount of time. The process is ideally parallelizable, so I can run chunks of it on an infinite number of threads and each ...

Diagnosing runaway CPU in a .Net production application

Does anyone know of a tool that can help me figure out why we are seeing runaway CPU in a managed app? What I am not looking for: Process explorer, it has this awesome feature that lets you see CPU ...

热门标签