guoqian视频3内核知识线程进程process1.pdfVIP

  • 1
  • 0
  • 约4.86万字
  • 约 52页
  • 2021-02-24 发布于北京
  • 举报
Linux 源码分析 系列之 进程 进程 张文力 张文力 zhangwl@ 智 中心ASL 004.3 1 讲述提纲 讲述提纲 概述 相关数据结构(task_struct ) 进程的调度 进程的控制 2 概述 相关概念 相关概念 进程在整个内核中的功能位置 进程在整个内核中的功能位置 源代码中进程相关的文件 源代码中进程相关的文件 Linux进程的四个要素 Linux进程的四个要素 3 相关概念 相关概念 Linux核心是多任 的 运行 程序称作 (process ) 线程(Thread) 为单一进程提供了做多件事的可能 Threads within a thread group share all their global variables and have the same heap. But the threads have different stacks ( they don’t share local variable ) Threads are processes that happen to share the global memory space. Linux内核中赋予二者更通用的名称——任务(task) 4 相关概念 相关概念 调度scheduling –对CPU访问的仲裁 – divides time into “slices” – allocates the slices to processes according to some algorithm 调度算法–软件实时soft realtime 优先级– Static(priority), Dynamic(counter), Realtime(rt_priority) 进程ID (PIDs) – Every Linux process has a unique identifier which is called its process identifier (PID) 引用计数Reference Counting – In general terms, one or more “holder” objects carry a pointer to a shared data object that includes an integer called its reference count 权能weight –精确的定义经授权的进程所允许处理的事情 5 进程在整个内核中的功能位置 进程在整个内核中的功能位置 6 源代码中进程相关的文件 源代码中进程相关的文件 include/linux/ ipc/ sched.h * msg.c interrupt.h:

文档评论(0)

1亿VIP精品文档

相关文档