Threads are scheduled to run based on their scheduling priority. Each thread is assigned a scheduling priority. The priority levels range from zero (lowest priority) to 31 (highest priority).
***Only the zero-page thread can have a priority of zero. (The zero-page thread is a system thread responsible for zeroing any free pages when there are no other threads that need to run.)***

Q. Is this zero-page thread is created immediately after the process is created?


If a higher-priority thread becomes available to run, the system rejects to execute the lower-priority thread (without allowing it to finish using its time slice), and assigns a full time slice to the higher-priority thread.


Q. So the process will only run one thread at a time since its after the highest priority thread only! So the concept of multi-threading doesn't exist! Can you clarify please


Please clarify your answer, if you don't mind! Talk to me like you are talking to 3 years old kid...I'm trying to understand the concepts before i go into cosing multi-threads.

Recommended Answers

All 2 Replies

Multi-processing (siultaneous processing) does not truely exist on a computer with a single processor. Only one thread at a time can run. The processor switches threads so quickly that it only appears to the human eye that they are all running at the same time. Its impossible for a single processor to execute two instructions at the exact instance of time.

That is not the same as scheduling threads with priority. The scheduler will give the thread with the highest priority the most CPU time. And if you increase a thread's priority high enough it may even disable the entire operating system because it will get no CPU time.

Is this zero-page thread is created immediately after the process is created?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.