linux process cycle
- As already discussed, a new process is created through fork() and if a new executable is to be run then exec() family of functions is called after fork(). As soon as this new process is created, it gets queued into the queue of processes that are ready to run.
- If only fork() was called then it is highly likely that new process runs in user mode but if exec() is called then the new process will run in kernel mode until a fresh process address space is created for it.
- While the process is running, a higher priority process can pre-empt it through an interrupt. In this case, the pre-empted process again goes into queue of processes that are ready to run. This process is picked up by the scheduler at some later stage.
- A process can enter into kernel mode while running. This is possible when it requires access some resource like text file which is kept on hard disk. As operations involving access to hardware may take time, it is highly likely that process will go to sleep and will wake up only when the requested data is available. When the process is awakened, it does not mean that it will start executing immediately, it will again queue up and will be picked for execution by scheduler at appropriate time.
- A process can be killed through many ways. It can call exit() function to exit or can process Linux signals to exit. Also, some signals cannot be caught and cause the process to terminate immediately.
- There are different types of Linux process. Once the process is killed, it does not get completely eliminated. An entry containing some information related to it is kept in the Kernel process address table till the parent process explicitly calls wait() or waitpid() functions to get the exit status of child process. Until parent process does this, the terminated process is known as zombie process.
linux process cycle的更多相关文章
- Linux process vs thread
Linux process vs thread Question I have a query related to the implementation of threads in Linux. L ...
- Linux Process VS Thread VS LWP
Process program program==code+data; 一个进程可以对应多个程序,一个程序也可以变成多个进程.程序可以作为一种软件资源长期保存,以文件的形式存放在硬盘 process: ...
- Shell script for logging cpu and memory usage of a Linux process
Shell script for logging cpu and memory usage of a Linux process http://www.unix.com/shell-programmi ...
- Performance Tuning Using Linux Process Management Commands
[root@bigdata-server-02 /]# ps --help all Usage: ps [options] Basic options: -A, -e all processes -a ...
- Linux process authority、the security risks in running process with high authority
catalog . Linux进程权限原理 . 最小权限原则 - 进程降权运行最佳实践 . 进程权限控制包含的攻防向量 . 进程高权限安全风险检查技术方案 1. Linux进程权限原理 我们知道,Li ...
- Linux Process Virtual Memory
目录 . 简介 . 进程虚拟地址空间 . 内存映射的原理 . 数据结构 . 对区域的操作 . 地址空间 . 内存映射 . 反向映射 .堆的管理 . 缺页异常的处理 . 用户空间缺页异常的校正 . 内核 ...
- Linux Process Management && Process Scheduling Principle
目录 . 引言 . 进程优先级 . 进程的生命周 . 进程表示 . 进程管理相关的系统调用 . 进程调度 . 完全公平调度类 . 实时调度类 . 调度器增强 . 小结 1. 引言 在多处理器系统中,可 ...
- Linux进程状态 ( Linux Process State Codes)
进程状态代码及说明: STATE代码 说明 D 不可中断的睡眠. 通常是处于I/O之中. R 运行中/可运行. 正处于运行队列中. S 可中断的睡眠. 等待某事件发生. T 已停止. 可能是因为she ...
- The Linux Process Principle,NameSpace, PID、TID、PGID、PPID、SID、TID、TTY
目录 . 引言 . Linux进程 . Linux命名空间 . Linux进程的相关标识 . 进程标识编程示例 . 进程标志在Linux内核中的存储和表现形式 . 后记 0. 引言 在进行Linux主 ...
随机推荐
- kvm第三章--虚拟化存储管理
- wepy框架 怎么在template模板中使用函数
呵呵.介绍说是类似vue,用起来真累人,就想在模板中使用个函数都要查N久的文档才知道. 具体要怎么操作呢? 要先创建个wxs脚本文件,在里面定义函数或其它的,然后在页面或组件中引入这文件,就可以在模板 ...
- hive分区理念介绍
一.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...
- Typora数学公式
LaTeX编辑数学公式基本语法元素 LaTeX中的数学模式有两种形式: inline 和 display. 前者是指在正文插入行间数学公式,后者独立排列,可以有或没有编号. 行间公式(inline) ...
- Computer Vision_33_SIFT:LIFT: Learned Invariant Feature Transform——2016
此部分是计算机视觉部分,主要侧重在底层特征提取,视频分析,跟踪,目标检测和识别方面等方面.对于自己不太熟悉的领域比如摄像机标定和立体视觉,仅仅列出上google上引用次数比较多的文献.有一些刚刚出版的 ...
- 异常-java.util.concurrent.TimeoutException: Futures timed out after [100000 milliseconds]
1 详细异常 java.util.concurrent.TimeoutException: Futures timed out after [100000 milliseconds] at scala ...
- windows和linux下的spice客户端使用方法
1.Linux客户端 安装spice yum install virt-viewer 连接远程虚拟机 #remote-viewer spice://IP:PORTremote-viewer spice ...
- MySQL 数据库的高可用性分析
MySQL数据库是目前开源应用最大的关系型数据库,有海量的应用将数据存储在MySQL数据库中.存储数据的安全性和可靠性是生产数据库的关注重点.本文分析了目前采用较多的保障MySQL可用性方案. MyS ...
- Nginx突破高并发的性能优化 - 运维笔记
在日常的运维工作中,经常会用到nginx服务,也时常会碰到nginx因高并发导致的性能瓶颈问题.今天这里简单梳理下nginx性能优化的配置(仅仅依据本人的实战经验而述,如有不妥,敬请指出~) 一.这里 ...
- linux使用文本编辑器vi常用命令
一:翻页 ctrl+u向上翻半页 ctrl+d 向下翻半页 ctrl+f/page up向上翻一页 ctrl+b/page on 向下翻一页 H光标移到当前页的第一个字符 M光标移到当前页的中 ...