Reputation: 29
Is there any way to achieve 100% CPU utilization just for few microseconds (say 900usec) and then return back to normal CPU utilization.
I have multiple processes (say X,Y,Z..)running on the same core. These processes perform some task in 500usec. Now I want to introduce this another process A which will bind on the same core and consume the whole CPU for some microseconds so that X is not able to complete its processing within 500usec timeframe.
Upvotes: 1
Views: 199
Reputation: 4287
You can do a busy loop and set the nice value to the highest priority possible to increase the chances that your process will run. However you still cannot guarantee that your process will run instead of the other processes. This depends on the OS scheduler.
Upvotes: 1