进程在内核中的组织
发布时间:2020-12-13 23:46:54 所属栏目:Linux 来源:网络整理
导读:进程与程序 程序是包含可执行代码以及执行代码需要的数据等信息的文件,存放在磁盘等介质上。 当程序被操作系统装载到内存并分配给它一定 资源后,此时可称为 进程 。 程序 是 静态 概念, 进程 是 动态 概念 进程在内核中的组织形式:进程控制块(PCB) Linu
进程与程序
进程在内核中的组织形式:进程控制块(PCB) Linux 进程控制块: task_struct 结构 pid_t pid; uid_t uid,euid; gid_t gid,egid; volatile long state; int exit_state; unsigned int rt_priority; unsigned int policy; struct list_head tasks; struct task_struct *real_parent; struct task_struct *parent; struct list_head children,sibling; struct fs_struct *fs; struct files_struct *files; struct mm_struct *mm; struct signal_struct *signal; struct sighand_struct *sighand; cputime_t utime,stime; struct timespec start_time; struct timespec real_start_time;
volatile long state;
进程状态切换 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |