karandeep963 Posted May 15, 2013 Report Share Posted May 15, 2013 Hello All,I was wondering to understand Context switching in the SystemC scheduler. What I found is that It is something which makes the threads slower than methods. Can anyone please explain it. Regards, KS Quote Link to comment Share on other sites More sharing options...
apfitch Posted May 15, 2013 Report Share Posted May 15, 2013 SC_THREADs allow the user to call wait() to suspend the process. When the process executes the wait() function, it has to store its state somewhere (the state consists of the value of local thread variables and the programme counter indicating where the computer should resume executing after the call to wait()). The process of storing the state so that another process can run is called a context switch, which does indeed take time. So SC_THREADs are slower than SC_METHODs - but then SC_METHODs can't suspend, regards Alan Tanja 1 Quote Link to comment Share on other sites More sharing options...
karandeep963 Posted May 16, 2013 Author Report Share Posted May 16, 2013 Thanks Alan !!!!!!!!!!!!!!!, I understand the concept. Regards, KS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.