???????????????
????1????滮?????????????????
????1???????????????е???????????????????????????
????2??????????????е??????????????????????????
????????????????????????????????????
????Linux??kernel???????????????????????
????????????
????1.??cpu???е??????
????2.???????й???
????3.???????й???
????4.??????????й???
????5.???????????????
????2????????????????????????????????????????????????

????????????
????process??????????????????????????????????????????л??????????????????(??楨CPU)??????????????????λ??
????1?????????饗PCB??
????????????????????????????????????????
????2????????????
????1???????????й????????????????????????????е????????????
????2?????????????е???????????????????????е??????
????3???????????е???????????????????????е??????
???????????????л???
??????????????У?CPU???????????????????????????????????????????????????????????????????????????????????????????????????????????
????3?????
????thread??????????????????????????y???????е???????????????????????????y??????????????????????????????????
????????????
????1???????????????????????????????????????????
????2???????????С????????????????????????
????3??????????й???????ж???????浥????????????????棬?????????????????????Ч???

????shell> echo $PPID    //????????ID
????2100
????shell> echo $$    //?????????ID
????2102
????????ps????
?????????os?????????
????1??ps???????Щ????
????1???????????pid ?????? ????shell?????????
????2????????????????????????????????
????3?????????????????????棬?????????????
????4??cpu?????????
???????ps?????????????????????
????2??????ps????
????shell> ps aux ?? ps -elf
????a???????????????????
????u???????????????????
????x????????н??????
????-e?????????????н??????
????-l????ó??????????????
????-f???????????????????????
????[root@localhost ~]# ps aux
????USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
??????????
????PID   ?????ID??
????%CPU  ????????CPU?????
????%MEM  ???????????
????COMMAND ?????????????
????[root@localhost ~]# ps -elf
????F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
??????????
????R ???????У?????ж??????(????)??
????S ???????????????????
????Z ?????????????????????????
???????top????
???????????????????????
????1???????????top????
????[root@localhost ~]# top

???????????……
????h??e???
????1???????CPU???
????P????%CPU????
????M????%MEM????
?????????????£????3??
????q???????????top?????????????
??????????load average: 0.06?? 0.60?? 0.48
??????????????????????е?????????
??????????????? 1?????5?????15????????????????????w??uptime??????top?????????
????2??top?????????
????[root@localhost ~]# top -d 1 -n 5 -p 1
????-d 1    ????????????1??
????-n 5    ??′???
????-p 1    ??????PID?1????????????????????PID?????????