操作系统两大功能及其含义_过程及其状态| 操作系统

操作系统两大功能及其含义

The process is the running instance of the running instance of a program which occupies space in memory (RAM), a program is a passive entity and process is an active entity.

进程是程序的运行实例的运行实例,该程序正在占用内存(RAM)中的空间,程序是被动实体,而进程是主动实体。

When a process is created it passes through some states,

流程创建后会经过某些状态,

  1. New

  2. Ready

    准备

  3. Running

    跑步

  4. Waiting

    等候

  5. Suspended

    已暂停

  6. Terminated

    已终止

process 1

1)新状态 (1) New State)

When a program is double-clicked like a program.exe file in windows, the process comes in new state and a process ID is provided to it and it starts loading in memory. The process of selecting a process for loading in memory is done by Long Term Scheduler.

当像在Windows中的program.exe文件一样双击程序时,进程进入新状态,并为其提供进程ID,并开始加载到内存中。 选择要加载到内存中的进程的过程由Long Term Scheduler完成。

2)就绪状态 (2) Ready State)

When a program is double-clicked like a program.exe file in windows, the process comes in new state and a process ID is provided to it and it starts loading in memory. The process of selecting a process for loading in memory is done by Long Term Scheduler.

当像在Windows中的program.exe文件一样双击程序时,进程进入新状态,并为其提供进程ID,并开始加载到内存中。 选择要加载到内存中的进程的过程由Long Term Scheduler完成。

3)运行状态 (3) Running State)

The Short-term scheduler selects a process from ready queue to run (i.e provide CPU), then process state become running. At this moment instruction of the program is executing.

短期调度程序从就绪队列中选择要运行的进程(即提供CPU),然后进程状态变为正在运行。 这时正在执行程序指令。

4)等待状态 (4) Waiting State)

The process often requires input/output from various devices for that purpose process move to a new state called waiting for a state where the process performs input and output from devices like monitor, keyboard etc. If a process is already performing I/O then other process wait for their turn in device waiting queue.

该过程通常需要为此目的而从各种设备输入/输出的过程进入一个新状态,称为等待状态,在该状态下该过程从监视器,键盘等设备执行输入和输出。如果某个进程已经在执行I / O,则其他进程进程等待他们进入设备等待队列。

5)暂停状态 (5) Suspended State)

As the memory is limited it cannot contain multi-process at any instance, suppose a new process want to come in memory but there is required space available, and this process has high priority so mid-term scheduler will select a process of low priority and place it in swap area of hard disk, so that when space is available it can again be called out . This state of a process is suspended.

由于内存有限,因此在任何情况下都不能包含多进程,假设有一个新进程要进入内存,但有所需的可用空间,并且此进程具有较高的优先级,因此中期调度程序将选择一个低优先级的进程,然后将其放在硬盘的交换区域中,以便在有可用空间时可以再次调用它。 进程的此状态被挂起。

6)终止国 (6) Terminated State)

When a process performs all the task then PCB of the process is deleted and a process is removed from the memory.

当一个进程执行所有任务时,将删除该进程的PCB,并从内存中删除一个进程。

翻译自: https://www.includehelp.com/operating-systems/process-and-its-states.aspx

操作系统两大功能及其含义

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值