????1 ?????????

???????????????????????????????

???????????(?????????????)?????????????????????????????????????

?????????????????????????

????CPU

????Memory

????IO

????Network

?????????????????????????????磺

????1. ?????????д??????????????

????2. ?????????????£??????ζ????????CPU??????

???????????????????????????swapping????????????????????????

????2 ??ó???????

?????????????????????????ж??????ó??????????????????????????????ж????????????????????

????????????????????

????CPU bound – ???????cpu????????????????????????????????????????棬????CPU??????????????Web server??mail server????????????????????????

????I/O bound – ?????????????????????????????????????IO????IO????ó???????????cpu????IO????????????sleep?????????????IOWAIT????????????cache???????????????????????

????3 CPU

????3.1 ???????

????3.1.1 ???????????

?????????????????????????????????棬????????????????

????1. ????????CPU???????

????2. ???(????)CPU???????

????????CPU??????????????????????????????????CPU????????????????????????Pentium CPU?????????bug???????????????????????????????????????????С?????104??λ?????????????????????CPU????????????

???????ù????

????SUPER PI(π)

????Wprime ??SuperPI?????????????????CPU????????????

????FritzChess ????????????????????????????????????

???????CPU????????????????????????????????????????L1??L2 cache??????????????????CPU?????

????Core -> Nehalem(E55x????r710??dsc1100) -> Westmere –> Sandy Bridge

????3.1.2 ???????????

????CPU??????????????????????????????????????????棬CPU?????????????????????

????Load????????????????????

????IOWait???????????Load?????????????μ???????

????Context Switch?????????CPU??????????????????????(CPU Register)?????ж???(run queue)?????

??????ж?CPU???????

???????ж?CPU???????

?????????

?????????о??????????????????????????????????????????????????????????????????????????????CPU?????kernel????????????????CPU??

????3.2 ?????????

????3.2.1 ????????

????Load

????Load???CPU????????????????????????????????е??????????

??????????????(run queue)?е???????TASK_RUNNING ?? TASK_UNINTERRUPTIBLE????????????

????? ????????????????

????? ????????ж?????????

????????????????У??????????????????У?????????????run quque???У????load??6

????Nice%

???????????????????????nice??setpriority????????????????????CPU?????

????Iowait%

????CPU???IO?????????

????Idle%

????CPU???????

????Intr/s