linux内核读书笔记(进程数据结构分析)一
include/linux/sched.h
384 struct task_struct {
385 volatile long state;
386 struct thread_info *thread_info;
387 atomic_t usage;
388 unsigned long flags;
389 unsigned long ptrace;
390
391 int lock_depth;
392
393 int prio, static_prio;
394 struct list_head run_list;
395 prio_array_t *array;
396
397 unsigned long sleep_avg;
398 long interactive_credit;
399 unsigned long long timestamp;
400 int activated;
401
302 unsigned long policy;
403 cpumask_t cpus_allowed;
404 unsigned int time_slice, first_time_slice;
405
406 struct list_head tasks;
407 struct list_head ptrace_children;
408 struct list_head ptrace_list;
409
410 struct mm_struct *mm, *active_mm;
...
413 struct linux_binfmt *binfmt;
414 int exit_code, exit_signal;
415 int pdeath_signal;
...
419 pid_t pid;
420 pid_t tgid;
...
426 struct task_struct *real_parent;
427 struct task_struct *parent;
428 struct list_head children;
429 struct list_head sibling;
430 struct task_struct *group_leader;
...
433 struct pid_link pids[PIDTYPE_MAX];
434
435 wait_queue_head_t wait_chldexit;
436 struct completion *vfork_done;
437 int __user *set_child_tid;
438 &nb
相关文档:
前 言
随着各种便携嵌入式设备性能的日益提高,功能日益丰富,其电源紧张的问题也日益突出,国内新推出的某些具有PDA等多种功能的智能电话在密集使用下只能维持半天,多数摄像机
和数码相机
在
一次充电后都只有一个小时左右的累积工作时间。Linux作为一个开放源代码的操作系统,拥有非常丰富的软件 ......
http://www.ic37.com/htm_tech/2008-1/7319_150547.htm
http://www.lupaworld.com/26540/viewspace-114142.html
http://www.lupaworld.com/viewnews-17909.html
http://www.lupaworld.com/26540/viewspace-117210.html
http://www.lupaworld.com/26540/spacelist-blog-itemtypeid-2105.html
http://www.lupaworld.com/ ......
Name
times - get process times
Synopsis
#include <sys/times.h>
clock_t times(struct tms *buf);
Description
times() stores the current process times in the
struct tms that buf points to. The struct tms is as defined
in <sys/times.h>
:
struct tms {
clock_t tms_utime; /* us ......
一、准备工作
首先说明,下面带#号的行都是要输入的命令行,且本文提到的所有命令行都在终端里输入。启动Linux系统,并用根用户登录,进入终端模式下。
1、查看Linux内核版本
# uname -a
如果屏幕显示的是2.6.x,说明你的已经是2.6的内核,也用不着看下文了,该干什么干什么去吧!~~~如果显示的是2.4.x,那恭喜你,闯关 ......
Linux 2.6内核的一个重要特色是提供了统一的内核设备模型。随着技术的不断进步,系统的拓扑结构越来越复杂,对智能电源管理、热插拔以及plug and play的支持要求也越来越高,2.4内核已经难以满足这些需求。为适应这种形势的需要,2.6内核开发了全新的设备模型。
2.6 ......