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
相关文档:
网上看到到的方法,记录以备用。
在英文Locale下的Ubuntu
无法正常显示XP下GBK编码的中文
编辑/etc/environment文件
添加LC_CTYPE="zh_CN.GBK"一行
如下:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"
LANG="en_US.UTF-8"
LANGU ......
前 言
随着各种便携嵌入式设备性能的日益提高,功能日益丰富,其电源紧张的问题也日益突出,国内新推出的某些具有PDA等多种功能的智能电话在密集使用下只能维持半天,多数摄像机
和数码相机
在
一次充电后都只有一个小时左右的累积工作时间。Linux作为一个开放源代码的操作系统,拥有非常丰富的软件 ......
网络截包是一项很有意思的课题,可以有数据过滤,防火墙,流量控制,报文篡改等诸多应用,按照内核分层架构将一些截包方法不完全整理如下,欢迎补充。
1、 L1层驱动截包法
在驱动中下手应该可以说是最贴近底层的,网卡驱动中总有rx接收和xmit发送函数,参数总是sk_buffer,在这里修改很黄很暴力,而且 ......
原文网址: http://www.dbanotes.net/arch/unix_linux_load.html
几乎每个接触类 Unix 操作系统的工程师都知道如何查看系统负载。但这东西的工作机理到底是怎样的,可能没有多少能说清楚。对比了一些相关信息,加上自己的理解,做一下笔记。
什么是 Load ? 什么是 Load Average ......