• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Processes and Timeout

Status
Not open for further replies.
OS related stuff.

So, the question is what happens when a process is finished before the timeslice for that process expired. What will the system do?
1. Repeat the last address until timeout?
2. Return to Dispatcher?
3. Or maybe something else?

Need help on this matter, if it's the wrong place, feel free to move it to the right forum.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,232
So, the question is what happens when a process is finished before the timeslice for that process expired. What will the system do?
As far as I am aware processes are not given time slices, rather threads are. Threads belong to processes with each process having at least 1 thread.

If a currently executing thread blocks or terminates before its time slice is finished the scheduler will then immediately schedule another thread and give that another time slice. If there are no non-blocked or currently executing threads available then it will schedule an idle time slot. Idle time slots might put the core into a lower power state or use a loop of specially constructed instructions that minimize energy usage. Idle time slots will be interrupted as soon as there is a non-blocked or currently executing thread available to schedule a time slice for. If the core is in a low power state there might be some non-trivial wake up time involved before a thread will be placed on it.
 
Status
Not open for further replies.
Top