什么是存储过程_什么是过程?

什么是存储过程

A process is a program in execution. Process is not as same as program code but a lot more than it. A process is an 'active' entity as opposed to program which is considered to be a 'passive' entity. Attributes held by process include hardware state, memory, CPU etc.

进程是正在执行的程序。 流程与程序代码不同,但远不止于此。 与被认为是“被动”实体的程序相比,过程是“主动”实体。 进程拥有的属性包括硬件状态,内存,CPU等。

Process memory is divided into four sections for efficient working :

进程存储器分为四个部分,以提高工作效率:

  • The Text section is made up of the compiled program code, read in from non-volatile storage when the program is launched.

    文本部分由编译后的程序代码组成,在程序启动时从非易失性存储器中读取。

  • The Data section is made up the global and static variables, allocated and initialized prior to executing the main.

    数据部分由全局变量和静态变量组成,在执行主变量之前进行分配和初始化。

  • The Heap is used for the dynamic memory allocation, and is managed via calls to new, delete, malloc, free, etc.

    用于动态内存分配,并通过调用new,delete,malloc,free等进行管理。

  • The Stack is used for local variables. Space on the stack is reserved for local variables when they are declared.

    堆栈用于局部变量。 声明局部变量时,将在堆栈上保留空间。

不同的处理状态 (Different Process States)

Processes in the operating system can be in any of the following states:

操作系统中的进程可以处于以下任何状态:

  • NEW- The process is being created.

    NEW -正在创建过程。

  • READY- The process is waiting to be assigned to a processor.

    READY -进程正在等待分配给处理器。

  • RUNNING- Instructions are being executed.

    RUNNING -指令正在执行。

  • WAITING- The process is waiting for some event to occur(such as an I/O completion or reception of a signal).

    WAITING -进程正在等待某些事件发生(例如I / O完成或信号接收)。

  • TERMINATED- The process has finished execution.

    TERMINATED -进程已完成执行。

Different Process States

过程控制块 (Process Control Block)

There is a Process Control Block for each process, enclosing all the information about the process. It is a data structure, which contains the following:

每个过程都有一个过程控制块,其中包含有关该过程的所有信息。 它是一个数据结构,其中包含以下内容:

  • Process State: It can be running, waiting etc.

    进程状态 :可以运行,等待等

  • Process ID and the parent process ID.

    进程ID父进程ID

  • CPU registers and Program Counter. Program Counter holds the address of the next instruction to be executed for that process.

    CPU寄存器和程序计数器。 程序计数器保存该进程要执行的下一条指令的地址。

  • CPU Scheduling information: Such as priority information and pointers to scheduling queues.

    CPU调度信息:例如优先级信息和指向调度队列的指针。

  • Memory Management information: For example, page tables or segment tables.

    内存管理信息 :例如,页表或段表。

  • Accounting information: The User and kernel CPU time consumed, account numbers, limits, etc.

    记帐信息 :消耗的用户和内核CPU时间,帐号,限制等。

  • I/O Status information: Devices allocated, open file tables, etc.

    I / O状态信息 :分配的设备,打开的文件表等

Process Control Block

翻译自: https://www.studytonight.com/operating-system/operating-system-processes

什么是存储过程

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值