资料介绍
linux 笔记 - 内核分析 - 进程进程
一 进程调度 进程的状态([include/linux.h]): TASK_RUNNING, it means that it is in the "Ready List" TASK_INTERRUPTIBLE, task waiting for a signal or a resource (sleeping) TASK_UNINTERRUPTIBLE, task waiting for a resource (sleeping), it is in same "Wait Queue" TASK_ZOMBIE, task child without father TASK_STOPPED, task being debugged ______________ | | | TASK_RUNNING | |______________| CPU Available ----------------> <---------------______________ | | | Real Running | |______________|
CPU Busy | /|\ Waiting for | | Resource Resource | | Available \|/ | ______________________ | | | TASK_INTERRUPTIBLE / | | TASK-UNINTERRUPTIBLE | |______________________| Main Multitasking Flow 从系统内核的角度看来,一个进程仅仅是进程控制表(process table)中的一项。进程控制表中的每 一项都是一个 task_struct 结构,而 task_struct 结构本身是在 include/linux/sched.h 中定义的。在 tas