http://blog.csdn.net/qq_26768741/article/details/54348586

  1. struct task_struct {
  2. volatile long state;    /* -1 unrunnable, 0 runnable, >0 stopped */
  3. struct thread_info *thread_info;
  4. atomic_t usage;
  5. unsigned long flags;    /* per process flags, defined below */
  6. unsigned long ptrace;
  7. int lock_depth;     /* Lock depth */
  8. int prio, static_prio;
  9. struct list_head run_list;
  10. prio_array_t *array;
  11. unsigned long sleep_avg;
  12. long interactive_credit;
  13. unsigned long long timestamp;
  14. int activated;
  15. unsigned long policy;
  16. cpumask_t cpus_allowed;
  17. unsigned int time_slice, first_time_slice;
  18. struct list_head tasks;
  19. struct list_head ptrace_children;
  20. struct list_head ptrace_list;
  21. struct mm_struct *mm, *active_mm;
  22. /* task state */
  23. struct linux_binfmt *binfmt;
  24. int exit_code, exit_signal;
  25. int pdeath_signal;  /*  The signal sent when the parent dies  */
  26. /* ??? */
  27. unsigned long personality;
  28. int did_exec:1;
  29. pid_t pid;
  30. pid_t __pgrp;       /* Accessed via process_group() */
  31. pid_t tty_old_pgrp;
  32. pid_t session;
  33. pid_t tgid;
  34. /* boolean value for session group leader */
  35. int leader;
  36. /*
  37. * pointers to (original) parent process, youngest child, younger sibling,
  38. * older sibling, respectively.  (p->father can be replaced with
  39. * p->parent->pid)
  40. */
  41. struct task_struct *real_parent; /* real parent process (when being debugged) */
  42. struct task_struct *parent; /* parent process */
  43. struct list_head children;  /* list of my children */
  44. struct list_head sibling;   /* linkage in my parent's children list */
  45. struct task_struct *group_leader;   /* threadgroup leader */
  46. /* PID/PID hash table linkage. */
  47. struct pid_link pids[PIDTYPE_MAX];
  48. wait_queue_head_t wait_chldexit;    /* for wait4() */
  49. struct completion *vfork_done;      /* for vfork() */
  50. int __user *set_child_tid;      /* CLONE_CHILD_SETTID */
  51. int __user *clear_child_tid;        /* CLONE_CHILD_CLEARTID */
  52. unsigned long rt_priority;
  53. unsigned long it_real_value, it_prof_value, it_virt_value;
  54. unsigned long it_real_incr, it_prof_incr, it_virt_incr;
  55. struct timer_list real_timer;
  56. struct list_head posix_timers; /* POSIX.1b Interval Timers */
  57. unsigned long utime, stime, cutime, cstime;
  58. unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; /* context switch counts */
  59. u64 start_time;
  60. /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
  61. unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
  62. /* process credentials */
  63. uid_t uid,euid,suid,fsuid;
  64. gid_t gid,egid,sgid,fsgid;
  65. int ngroups;
  66. gid_t   groups[NGROUPS];
  67. kernel_cap_t   cap_effective, cap_inheritable, cap_permitted;
  68. int keep_capabilities:1;
  69. struct user_struct *user;
  70. /* limits */
  71. struct rlimit rlim[RLIM_NLIMITS];
  72. unsigned short used_math;
  73. char comm[16];
  74. /* file system info */
  75. int link_count, total_link_count;
  76. struct tty_struct *tty; /* NULL if no tty */
  77. /* ipc stuff */
  78. struct sysv_sem sysvsem;
  79. /* CPU-specific state of this task */
  80. struct thread_struct thread;
  81. /* filesystem information */
  82. struct fs_struct *fs;
  83. /* open file information */
  84. struct files_struct *files;
  85. /* namespace */
  86. struct namespace *namespace;
  87. /* signal handlers */
  88. struct signal_struct *signal;
  89. struct sighand_struct *sighand;
  90. sigset_t blocked, real_blocked;
  91. struct sigpending pending;
  92. unsigned long sas_ss_sp;
  93. size_t sas_ss_size;
  94. int (*notifier)(void *priv);
  95. void *notifier_data;
  96. sigset_t *notifier_mask;
  97. void *security;
  98. /* Thread group tracking */
  99. u32 parent_exec_id;
  100. u32 self_exec_id;
  101. /* Protection of (de-)allocation: mm, files, fs, tty */
  102. spinlock_t alloc_lock;
  103. /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */
  104. spinlock_t proc_lock;
  105. /* context-switch lock */
  106. spinlock_t switch_lock;
  107. /* journalling filesystem info */
  108. void *journal_info;
  109. /* VM state */
  110. struct reclaim_state *reclaim_state;
  111. struct dentry *proc_dentry;
  112. struct backing_dev_info *backing_dev_info;
  113. struct io_context *io_context;
  114. unsigned long ptrace_message;
  115. siginfo_t *last_siginfo; /* For ptrace use.  */
  116. };

进程控制块 与 task_struct的更多相关文章

  1. 进程控制块的task_struct结构

    >进程控制块 在linux中进程信息存放在叫做进程控制块的数据结构中,每个进程在内核中都有⼀个进程控制块(PCB)来维护进程相关的信息,Linux内核的 进程控制块是task_struct结构体 ...

  2. Linux下进程描述(1)—进程控制块

    进程概念介绍 进程是操作系统对运行程序的一种抽象. • 一个正在执行的程序: • 一个正在计算机上执行的程序实例: • 能分配给处理器并由处理器执行的实体: • 一个具有普以下特征的活动单元:一组指令 ...

  3. Linux-进程描述(1)—进程控制块

    进程概念介绍 进程是操作系统对运行程序的一种抽象. • 一个正在执行的程序: • 一个正在计算机上执行的程序实例: • 能分配给处理器并由处理器执行的实体: • 一个具有普以下特征的活动单元:一组指令 ...

  4. Linux下进程描述(1)—进程控制块【转】

    转自:http://www.cnblogs.com/33debug/p/6705391.html 进程概念介绍 进程是操作系统对运行程序的一种抽象. • 一个正在执行的程序: • 一个正在计算机上执行 ...

  5. 进程控制块(PCB)

    进程控制块PCB 我们知道,每个进程在内核中都有一个进程控制块(PCB)来维护进程相关的信息,Linux内核的进程控制块是task_struct结构体. /usr/src/linux-headers- ...

  6. 进程控制块PCB结构体 task_struct 描述

    进程控制块,英文名(Processing Control Block),简称 PCB . 进程控制块是系统为了管理进程设置的一个专门的数据结构,主要表示进程状态. 每一个进程都对应一个PCB来维护进程 ...

  7. 进程控制块PCB结构 task_struct 描述

    注:本分类下文章大多整理自<深入分析linux内核源代码>一书,另有参考其他一些资料如<linux内核完全剖析>.<linux c 编程一站式学习>等,只是为了更好 ...

  8. 进程控制块PCB学习

    参考这篇文章:http://blog.csdn.net/shuizhilan/article/details/6642040 PCB(process control block),进程控制块,是我们学 ...

  9. 进程控制块(PCB)结构

    一.进程控制块(PCB)结构 进程控制块(PCB)是系统为了管理进程设置的一个专门的数据结构.系统用它来记录进程的外部特征,描述进程的运动变化过程.同时,系统可以利用PCB来控制和管理进程,所以说,P ...

随机推荐

  1. xunsearch搜索测试

    1.导入测试数据 cd $prefix/sdk/php util/Indexer.php --source=csv --clean demo 然后出现 初始化数据源 ... csv WARNING: ...

  2. 『正睿OI 2019SC Day5』

    网络流 网络流的定义 一个流网络\(G=(V,E)\)为一张满足以下条件的有向图: 每一条边有一个非负容量,即对于任意\(E\)中的\((u,v)\) , 有\(c(u,v)\geq0\). 如果\( ...

  3. The instance of entity type 'Menu' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked.

    这里记录一个在使用.net core中ef core执行数据库操作时遇到的问题: 我在代码中使用DbContext下的Update方法准备将更改后的数据像这样步到数据库: _context.Menus ...

  4. Vue传递方法给页面调用

    很多人在使用vue的时候苦于在vue中写方法,但是在外部甚至在另一个js该如何调用呢? 这个方法就是显示了vue的可以传递方法到页面使得页面任何地方都可以调用 前提得引用文件 这个方法一般多用于加载周 ...

  5. 前端开发常用 JS 方法

    1,获取文件本地url,在上传之前预览 /** * 获取图片嗯滴url,在上传之前预览 * @param file 选择的图片文件 * @returns {*} url */ getFileLocat ...

  6. 《JavaEE开发的颠覆者——Spring Boot实战》是一本好书

    这本书的风格非常好.每一节都是先点明这一块知识的要点,随后就手把手的做出一个最简明.但有能体现核心的实例(大多只有几个Class) 这样的书用来熟悉一门框架,实在是再好不过.

  7. ASP.NET SignalR 系列(七)之服务端触发推送

    前面几章讲的都是从客户端触发信息推送的,但在实际项目中,很多信息可能是由系统服务端推送的,下面2图分别展示两种通道 客户端触发推送 服务端推送 下面我们就重点介绍下服务端如何调用集线器的对象进行推送 ...

  8. codeforces#566(Div.2)B

    B.Plus from Picture You have a given picture with size w×hw×h. Determine if the given picture has a ...

  9. HTML列表简单介绍

    1.无序列表 使用标签:<ul>,<li> 属性:disc,circle,square 2.有序列表 使用标签:<ol>,<li> 属性:A,a,I,i ...

  10. 31、splice()用法

    改变数组,向数组中添加/删除元素: eg: 1.删除元素: let arr=['bob','lily','bike','sam']; arr.splice(2,1) console.log(arr) ...