Skip to content
Tcl Source Code Artifact [c3e17d3a15]
Login

Artifact [c3e17d3a15]

Artifact c3e17d3a15fa04137b004decf0212b0ec2e203b7:

Ticket change [c3e17d3a15] - Ticket [1038541fffffffff|1038541fff] <i>CPU-Performance increase with MM-Timer</i> status still Open with 4 other changes by kennykb on 2004-10-04 21:02:22.
D 2004-10-04T21:02:22
J icomment Logged\sIn:\sYES\s\nuser_id=99768\n\nThis\sproblem\sis\snot\squite\sa\sbug.\n\nOn\sWindows,\sas\sindeed\son\smost\ssystems,\swhen\sa\sthread\sasks\sto\ndelay\nfor\sa\sgiven\stime,\sthe\stime\sis\srounded\sto\sa\s"clock\stick"\s-\sone\ncycle\sof\ssome\sexternal\soscillator.\s\sOn\sthe\svarious\sversions\sof\nWindows,\sthe\ssize\sof\sa\sclock\stick\svaries;\sit\smay\sbe\sas\slong\sas\n60\sms\sor\sas\sshort\sas\sa\smillisecond.\n\nThe\s[after]\scommand\sattempts\sto\shide\sthis\sgranularity.\s\sWhen\sthe\nwait\stime\sis\sshorter\sthan\sa\sclock\stick,\sthe\skernel\scall\sthat\nit\suses\nactually\smakes\sthe\sthread\swait\sfor\szero\stime,\sand\sbecome\nimmediately\navailable\sfor\sredispatch.\s\sAt\sthat\spoint,\sthe\sTcl\snotifier\nchecks\nwhether\sany\stimer\sevents\sare\sready\sfor\sservice,\sfinds\sthat\snone\nis\s(because\sthe\snecessary\smillisecond\shas\snot\syet\selapsed),\sand\nagain\sdelays\sfor\szero\stime.\s\sThis\szero\sdelay\scauses\sa\sbehavior\s\nin\swhich\sthe\snotifier\sis\susing\sapparently\sall\sthe\sCPU.\n\nIf\sany\sother\sthread\sis\scontending\sfor\sthe\sCPU,\showever,\sit\swill\nget\sits\sfull\stime\squantum\swhen\sit\scomes\sto\sthe\shead\sof\sthe\nqueue.\nAt\sthat\spoint,\sthe\snotifier\sthread\swill\suse\sa\sshort\sburst\sof\sCPU\nchecking\sfor\sevents,\srelinquish\sthe\sprocessor,\sand\sallow\sthe\nCPU-intensive\sthread\sto\sproceed\sonce\sagain.\s\sAs\sfar\sas\sI\scan\ntell,\nwhile\sit\sappears\salarming,\sthe\sCPU\susage\swhen\sshort\s[after]\nevents\nare\sscheduled\sis\ssimply\sCPU\stime\sthat\sis\stransferred\sfrom\sthe\nidle\sloop.\n\nIf\syou've\sactually\sobserved\ssystem\sperformance\sbeing\sadversely\naffected,\srather\sthan\ssimply\san\salarming\snumber\son\sthe\sTask\nManager,\nplease\sreopen\sthis\sissue\sand\swe'll\sinvestigate\sfurther.\s\sAt\sthe\npresent\stime,\sas\sfar\sas\swe\scan\stell,\sthe\sfact\sthat\sTcl\stakes\nover\spart\sof\sthe\ssystem's\sidle\stime\shas\snot\sbeen\sobserved\sto\nhave\sany\ssignificant\simpact.\n
J login kennykb
J mimetype text/plain
J username kennykb
K 1038541fffffffffffffffffffffffffffffffff
U kennykb
Z af93a20a5f34ec74c4297c7eadf63f65