进程控制块 与 task_struct
http://blog.csdn.net/qq_26768741/article/details/54348586
- struct task_struct {
- volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
- struct thread_info *thread_info;
- atomic_t usage;
- unsigned long flags; /* per process flags, defined below */
- unsigned long ptrace;
- int lock_depth; /* Lock depth */
- int prio, static_prio;
- struct list_head run_list;
- prio_array_t *array;
- unsigned long sleep_avg;
- long interactive_credit;
- unsigned long long timestamp;
- int activated;
- unsigned long policy;
- cpumask_t cpus_allowed;
- unsigned int time_slice, first_time_slice;
- struct list_head tasks;
- struct list_head ptrace_children;
- struct list_head ptrace_list;
- struct mm_struct *mm, *active_mm;
- /* task state */
- struct linux_binfmt *binfmt;
- int exit_code, exit_signal;
- int pdeath_signal; /* The signal sent when the parent dies */
- /* ??? */
- unsigned long personality;
- int did_exec:1;
- pid_t pid;
- pid_t __pgrp; /* Accessed via process_group() */
- pid_t tty_old_pgrp;
- pid_t session;
- pid_t tgid;
- /* boolean value for session group leader */
- int leader;
- /*
- * pointers to (original) parent process, youngest child, younger sibling,
- * older sibling, respectively. (p->father can be replaced with
- * p->parent->pid)
- */
- struct task_struct *real_parent; /* real parent process (when being debugged) */
- struct task_struct *parent; /* parent process */
- struct list_head children; /* list of my children */
- struct list_head sibling; /* linkage in my parent's children list */
- struct task_struct *group_leader; /* threadgroup leader */
- /* PID/PID hash table linkage. */
- struct pid_link pids[PIDTYPE_MAX];
- wait_queue_head_t wait_chldexit; /* for wait4() */
- struct completion *vfork_done; /* for vfork() */
- int __user *set_child_tid; /* CLONE_CHILD_SETTID */
- int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */
- unsigned long rt_priority;
- unsigned long it_real_value, it_prof_value, it_virt_value;
- unsigned long it_real_incr, it_prof_incr, it_virt_incr;
- struct timer_list real_timer;
- struct list_head posix_timers; /* POSIX.1b Interval Timers */
- unsigned long utime, stime, cutime, cstime;
- unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; /* context switch counts */
- u64 start_time;
- /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
- unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
- /* process credentials */
- uid_t uid,euid,suid,fsuid;
- gid_t gid,egid,sgid,fsgid;
- int ngroups;
- gid_t groups[NGROUPS];
- kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
- int keep_capabilities:1;
- struct user_struct *user;
- /* limits */
- struct rlimit rlim[RLIM_NLIMITS];
- unsigned short used_math;
- char comm[16];
- /* file system info */
- int link_count, total_link_count;
- struct tty_struct *tty; /* NULL if no tty */
- /* ipc stuff */
- struct sysv_sem sysvsem;
- /* CPU-specific state of this task */
- struct thread_struct thread;
- /* filesystem information */
- struct fs_struct *fs;
- /* open file information */
- struct files_struct *files;
- /* namespace */
- struct namespace *namespace;
- /* signal handlers */
- struct signal_struct *signal;
- struct sighand_struct *sighand;
- sigset_t blocked, real_blocked;
- struct sigpending pending;
- unsigned long sas_ss_sp;
- size_t sas_ss_size;
- int (*notifier)(void *priv);
- void *notifier_data;
- sigset_t *notifier_mask;
- void *security;
- /* Thread group tracking */
- u32 parent_exec_id;
- u32 self_exec_id;
- /* Protection of (de-)allocation: mm, files, fs, tty */
- spinlock_t alloc_lock;
- /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */
- spinlock_t proc_lock;
- /* context-switch lock */
- spinlock_t switch_lock;
- /* journalling filesystem info */
- void *journal_info;
- /* VM state */
- struct reclaim_state *reclaim_state;
- struct dentry *proc_dentry;
- struct backing_dev_info *backing_dev_info;
- struct io_context *io_context;
- unsigned long ptrace_message;
- siginfo_t *last_siginfo; /* For ptrace use. */
- };
进程控制块 与 task_struct的更多相关文章
- 进程控制块的task_struct结构
>进程控制块 在linux中进程信息存放在叫做进程控制块的数据结构中,每个进程在内核中都有⼀个进程控制块(PCB)来维护进程相关的信息,Linux内核的 进程控制块是task_struct结构体 ...
- Linux下进程描述(1)—进程控制块
进程概念介绍 进程是操作系统对运行程序的一种抽象. • 一个正在执行的程序: • 一个正在计算机上执行的程序实例: • 能分配给处理器并由处理器执行的实体: • 一个具有普以下特征的活动单元:一组指令 ...
- Linux-进程描述(1)—进程控制块
进程概念介绍 进程是操作系统对运行程序的一种抽象. • 一个正在执行的程序: • 一个正在计算机上执行的程序实例: • 能分配给处理器并由处理器执行的实体: • 一个具有普以下特征的活动单元:一组指令 ...
- Linux下进程描述(1)—进程控制块【转】
转自:http://www.cnblogs.com/33debug/p/6705391.html 进程概念介绍 进程是操作系统对运行程序的一种抽象. • 一个正在执行的程序: • 一个正在计算机上执行 ...
- 进程控制块(PCB)
进程控制块PCB 我们知道,每个进程在内核中都有一个进程控制块(PCB)来维护进程相关的信息,Linux内核的进程控制块是task_struct结构体. /usr/src/linux-headers- ...
- 进程控制块PCB结构体 task_struct 描述
进程控制块,英文名(Processing Control Block),简称 PCB . 进程控制块是系统为了管理进程设置的一个专门的数据结构,主要表示进程状态. 每一个进程都对应一个PCB来维护进程 ...
- 进程控制块PCB结构 task_struct 描述
注:本分类下文章大多整理自<深入分析linux内核源代码>一书,另有参考其他一些资料如<linux内核完全剖析>.<linux c 编程一站式学习>等,只是为了更好 ...
- 进程控制块PCB学习
参考这篇文章:http://blog.csdn.net/shuizhilan/article/details/6642040 PCB(process control block),进程控制块,是我们学 ...
- 进程控制块(PCB)结构
一.进程控制块(PCB)结构 进程控制块(PCB)是系统为了管理进程设置的一个专门的数据结构.系统用它来记录进程的外部特征,描述进程的运动变化过程.同时,系统可以利用PCB来控制和管理进程,所以说,P ...
随机推荐
- ubuntu docker 下mongodb集群和分片
首先我们计划启动了三个mongo服务:master,salve,arbiter 1.准备工作 新建文件夹如图(每个文件夹下面有db和configdb文件夹): 生成认证文件并修改权限 openssl ...
- 【题解】分离与合体 [Loj10151]
[题解]分离与合体 [Loj10151] 传送门:分离与合体 \([Loj10151]\) [题目描述] 给定一个长度为 \(n\) 的序列,如果从某个点 \(k\) 处将区间 \([l,r]\) 断 ...
- Ubuntu 下安装zsh和oh-my-zsh
注意:安装前先备份/etc/passwd 一开始装oh-my-zsh我是拒绝的,因为这东西安装容易,卸载难,真的很难. Mac安装参考:http://www.cnblogs.com/EasonJim/ ...
- prometheus搜索指标显示No datapoints found.
在指标能够在下拉框可以选择到的情况下,还有No datapoints found. 则考虑是时区的问题,详见官方issue https://github.com/prometheus/promethe ...
- 人脸跟踪开源项目HyperFT代码算法解析及改进
一.简介 人脸识别已经成为计算机视觉领域中最热门的应用之一,其中,人脸信息处理的第一个环节便是人脸检测和人脸跟踪.人脸检测是指在输入的图像中确定所有人脸的位置.大小和姿势的过程.人脸跟踪是指在图像序列 ...
- SpringBoot与SpringDateJPA和Mybatis的整合
一.SpringBoot与SpringDateJPA的整合 1-1.需求 查询数据库---->得到数据------>展示到页面上 1-2.整合步骤 1-2-1.创建SpringBoot工程 ...
- Spring Security 解析(三) —— 个性化认证 以及 RememberMe 实现
Spring Security 解析(三) -- 个性化认证 以及 RememberMe 实现 在学习Spring Cloud 时,遇到了授权服务oauth 相关内容时,总是一知半解,因此决定先把 ...
- react,react-router,redux+react-redux 构建一个React Demo
创建初始化应用 加速我们的npm. npm install -g cnpm --registry=https://registry.npm.taobao.org 利用create-react-app ...
- 3.Javascript实现instanceof
instanceof instanceof 用于判断某个对象是否是另一个对象(构造方法)的实例.instanceof会查找原型链,直到null如果还不是后面这个对象的实例的话就返回false,否则就返 ...
- linux cgroups简介(下)Cgroups 与 Systemd
Cgroups 是 linux 内核提供的一种机制,如果你还不了解 cgroups,请参考前文<Linux cgroups 简介>先了解 cgroups.当 Linux 的 init 系统 ...