Windows CE 5.0ʵʱϵͳ
ÖÚËùÖÜÖª£¬ÊµÊ±ÏµÍ³²¢²»Í¨¹ýµ¥Ò»·ÖÎö½øÐвâÊÔ£¬¼´Ê¹µ¥Ò»·ÖÎö¿ÉÒÔÖ¤Ã÷ʵʱϵͳµÄÕýÈ·ÐÔ¡£ÊµÊ±ÏµÍ³µÄ²âÊÔÊÇÏ꾡ÌÖÂÛ´ËÎÊÌâµÄÒÀ¾Ý¡£ÄúµÄ¹¤×÷¾ÍÊǽ¨Á¢ÆðÓû§¶Ô½â¾ö·½°¸µÄÐÅÈθС£ÏÂÎĽéÉܵŤ¾ß¿ÉÒÔÍêÕû¡¢ÊµÊ±µØ½âÊÍÓ¦ÓóÌÐòºÍ²Ù×÷ϵͳ֮¼äµÄ½»»¥×÷Óã¬ËüÃÇÓÐÖúÓÚÄú¼ÓÉî¶ÔʵʱϵͳµÄÁ˽⡣
¾¡¹Ü¹ØÓÚʵʱµÄ¶¨Ò廹´æÔÚÖî¶àÕùÒ飬ÎÒÃÇ»¹ÊÇÀ´Á˽âһ϶ÔËüµÄ¶¨Òå¡£ÕâÀÎÒÒýÓÃcomp.realtime FAQµÄ¶¨Ò塣ʵʱϵͳµÄȨÍþ¶¨Ò壨Donald Gillies£©ÈçÏ£º
¡°ÊµÊ±ÏµÍ³ÊÇÕâÑùÒ»ÖÖϵͳ£¬¼´Æä¼ÆËãÕýÈ·Óë·ñ£¬²»½öÈ¡¾öÓÚ¼ÆËãÂß¼ÊÇ·ñÕýÈ·£¬»¹È¡¾öÓÚ¼ÆËã½á¹ûËù»¨·ÑµÄʱ¼ä¡£Èç¹û²»ÄÜÂú×ãϵͳµÄʱ¼äÏÞÖÆ£¬¾Í»á³öÏÖϵͳʧ°ÜµÄÇé¿ö¡£¡±
ÒòΪ¼¯¸ßËÙI/O¡¢»úÆ÷È˼¼ÊõºÍ»úе¿ØÖÆÓÚÒ»ÉíµÄ¹¤Òµ×Ô¶¯»¯Ó¦ÓöÔʱ¼äµÄÒªÇó×îΪ¿Á¿Ì¡£Î¢Èí¿ªÊ¼Á˽âʵʱǶÈëʽ²Ù×÷ϵͳµÄÌØÊâÉç»áÒªÇó¡£×Ô1986ÄêÒÔÀ´£¬Í¨ÓÃÆû³µ¶¯Á¦¹«Ë¾£¨GMPTG£©ÔÚÖÆÔìÓ¦ÓÃÖÐʵʩOMAC¼¼Êõ·½ÃæÒ»Ö±´¦ÓÚÁìÏȵØ룬²¢ÇÒÔÚºóÀ´´Ù³ÉÁËOMACÓû§ÈºµÄÐγɡ£ËûÃÇÒ»Æð¶ÔÊý°ÙÖÖÓ¦ÓýøÐÐÆÀ¹Àºó·¢ÏÖ£¬´ó¶àÊýϵͳ£¨95%£©ÐèÒªÒ»ºÁÃë»òÉÔ³¤µÄÖÜÆÚ¡£Ò»ºÁÃëÖÜÆÚÔÊÐíµÄ±ä»¯·ù¶ÈΪ10%£¬»òÊÇ100΢Ã루¦Ìs£©¡£ÕâÊÇ»ùÓÚ200 MHz X86ϵͳµÄWindows CEµÄÉè¼ÆÄ¿±ê£¬ÆäÔÚ¸Ãƽ̨ÉϵÄƽ¾ùÏìӦʱ¼äΪ50 ¦Ìs¡£Windows CE´ïµ½»ò³¬¹ýÁË95%µÄ±»ÆÀ¹ÀµÄӲʵʱӦÓÃOMACµÄÒªÇó¡£
´ó²¿·ÖÂú×ãÒªÇóµÄ¹¤Òµ×Ô¶¯»¯Ó¦ÓÃÊÇÓÉ´Óһ̨»úÆ÷·¢³öµÄÍⲿÐźÅÇý¶¯µÄ¡£´ËÐźÅÒÔÖжÏÐÎʽ·¢Ë͸øӲʵʱӦÓá£Î¢Èí¹ÄÀøWindows CEµÄ¿ª·¢ÈËÔ±£¬¾¡¿ÉÄÜÔÚÖжϷþÎñỊ̈߳¨IST£©ÖÐÖÃÈë¸ü¶àµÄÓ¦ÓôúÂë¡£ÕâʹOMAC¶¶¶¯¶¨Òå±äΪÕë¶Ô²»³¬¹ý100 ¦ÌsµÄISTÑÓ³ÙµÄʱ¼äÏÞÖÆ¡£ÆäÓà±»ÆÀ¹ÀµÄÓ¦ÓÃʹÓüÆʱÆ÷´´½¨ÆäÖÜÆÚ¡£Õâ¾ÍÐèҪһ̨ÑÓ³Ù»ò¶¶¶¯²»³¬¹ý100 ¦ÌsµÄ1ºÁÃë¼ÆʱÆ÷¡£×ÜÖ®£¬OMAC¶¨ÒåÌá³öÒÔÏÂÉè¼ÆºÍ²âÊÔÒªÇó£º
¡¤Interrupt Service Thread (IST) latencies of no more than 100 ¦Ìs latency.
¡¤1 millisecond timers with maximum of 100 ¦Ìs latency.
¡¤ÖжϷþÎñỊ̈߳¨IST£©ÑÓ³Ù²»³¬¹ý100 ¦Ìs¡£
¡¤1ºÁÃë¼ÆʱÆ÷µÄÑÓ³Ù×Ϊ100 ¦Ìs¡£
ÔÚÁ˽âÁËOMACµÄÉè¼ÆºÍ²âÊÔÒªÇóºó£¬½ÓÏÂÀ´ÈÃÎÒÃÇ¿´¿´Windows CEÖа²×°µÄ¹¤¾ß¡£ÕâЩ¹¤¾ßµÄÓÃ;ÊÇÈ·¶¨Öж϶¨Ê±¡¢Ó¦ÓÃÖ´Ðж¯×÷¡¢²Ù×÷ϵͳ¹¦Äܶ¨Ê±ºÍʱÐò°²ÅŶ¨Ê±¡£
Çø·ÖʵʱϵͳºÍʵʱ²Ù×÷ϵͳҲºÜÖØÒª¡£ÊµÊ±ÏµÍ³°üº¬Ó²¼þ¡¢²Ù×÷ϵͳºÍÓ¦ÓõÈËùÓÐÔªËØ¡£ÊµÊ±²Ù×÷ϵͳ½ö½öÊǹ¹³ÉʵʱϵͳµÄÆäÖÐÒ»¸öÔªËØ¡£ÈçÐèÁ˽â¸ü¶àÐÅÏ¢£¬Çë²ÎÔÄ΢ÈíWindows CEʵʱÐÔÄÜÉè¼ÆºÍÓÅ»¯¡£
ÎÒÃǽ«½éÉÜÖî¶à¹¤¾ßºÍÓÃ;£º
¡¤ILTiming¡£¸Ã¹¤¾ßÓÃÓÚÈ·¶¨Æ½Ì¨µÄÖжϷþÎñÀý³Ì£¨ISR£©ºÍÖжϷþÎñỊ̈߳¨IST£©ÑÓ³Ù¡£ISRÑÓ³ÙÊÇÖ¸´ÓÓ²¼þÖжϵ½µÚÒ»´ÎÖжϷþÎñÀý³ÌÖ¸ÁîÖ®¼äµÄʱ¼ä¼ä¸ô¡£¶øISTÑÓ³ÙÊÇÖ¸´ÓÏÖÓÐISRµ½ÖжϷþÎñÏ߳̿ªÊ¼Ö®¼äµÄʱ¼ä¼ä¸ô¡£
ÄÚºËʵʱÐÔÄÜ×îÖØÒªµÄÌØÐÔÖ®Ò»£¬¾ÍÊÇ¿ÉÒÔÔÚÖ¸¶¨µÄʱ¼äÄÚʵʩÖжϡ£ÖжÏÑÓ³ÙÖ÷ÒªÖ¸Èí¼þÖжϴ¦ÀíÑÓ³Ù£¬¼´´ÓÍⲿÖжϵ½´ï´¦ÀíÆ÷Ö±µ½Öжϴ¦Àí¿ªÊ¼Ö®¼äµÄʱ¼ä¼ä¸ô¡£
Èç¹û²»·¢Éú·ÖÒ³²Ù×÷£¬Windows CEÖжÏÑÓ³Ùʱ¼ä±»ÏÞÖÆÓÚÄÚ´æÖÐËø¶¨µÄÏ̡߳£ÕâÑù¾Í¿ÉÒÔ¼ÆËã×îÔã¸âÇé¿öϵÄÑÓ³Ùʱ¼ä ¡ª µ½ISRµÄÆô¶¯ºÍµ½ISTµÄÆô¶¯µÄ×ÜÓÃʱ¡£Í¨¹ý¼ÆËãISRºÍISTËùÐèʱ¼ä£¬¿ÉÒÔÈ·¶¨Öжϴ¦ÀíÒÔÇ°µÄ×ÜÓÃʱ¡£
ISRÑÓ³Ù
ISRÑÓ³ÙÊÇÖ¸´ÓIRQÔÚCUPÖб»ÉèÖõ½ISR¿ªÊ¼ÔËÐÐʱµÄʱ¼ä¡£ÒÔÏÂÈý¸öÓëʱ¼äÏà¹ØµÄ±äÁ¿»áÓ°ÏìISRµÄÆô¶¯£º
A = ÖжÏÔÚÄÚºËÖйرյÄ×ʱ¼ä¡£Äں˺ÜÉٹرÕÖжϣ¬µ«Èç¹û½«ËüÃǹرգ¬Ôò¹Ø±ÕµÄʱ¼ä³¤¶È»áÊܵ½ÏÞÖÆ¡£
B = ÔÚÄں˵÷¶ÈÖжϺÍISR±»Êµ¼Êµ÷ÓÃÖ®¼äµÄʱ¼ä¡£ÄÚºËʹÓøÃʱ¼äÈ·¶¨ÒªÔËÐÐʲôISR£¬²¢±£´æÔÚ¼ÌÐø֮ǰ±ØÐë±£´æµÄÈκμĴæÆ÷¡£
C = ÔÚ ISR ·µ»Øµ½Äں˺ÍÄÚºËʵ¼ÊÍ£Ö¹´¦ÀíÖжÏÖ®¼äµÄʱ¼ä¡£ÕâÊÇÄÚºËͨ¹ý»¹ÔÔÚISR±»µ÷ÓÃ֮ǰ±»±£´æµÄÈκÎ״̬£¨ÀýÈç¼Ä´æÆ÷£©À´Íê³ÉISR²Ù×÷µÄʱ¼ä¡£
ÕýÔÚ²âÁ¿µÄISRµÄÆô¶¯Ê±¼ä¿ÉÒÔ»ùÓÚϵͳÖÐÆäËûÖжϵĵ±Ç°×´Ì¬½øÐмÆËã¡£Èç¹ûÖжÏÕýÔÚ½øÐУ¬Ôò¼ÆËãÒª²âÁ¿µÄÐÂ
ǶÈëʽÐÂΊǶÈëʽ×ÊÁÏ Ç¶ÈëʽÅàѵ ǶÈëʽlinux ǶÈëʽϵͳ ǶÈëʽ¿ª·¢ ǶÈëʽ Ïà¹ØÎÄÕ£º