The abstraction provided by the OS of a running programis something
we will call a process. As we said above, a process is simply a running
program; at any instant in time, we can summarize a process by taking an
inventory of the different pieces of the systemit accesses or affects during
the course of its execution.
To understand what constitutes a process,we thus have to understand
its machine state: what a programcan read or update when it is running.
At any given time, what parts of the machine are important to the execution
of this program?
One obvious component of machine state that comprises a process is
its memory. Instructions lie in memory; the data that the running program
reads and writes sits in memory as well. Thus the memory that the
process can address (called its address space) is part of the process.
Also part of the process’smachine state are registers;many instructions
explicitly read or update registers and thus clearly they are important to
the execution of the process.
Note that there are some particularly special registers that form part
of this machine state. For example, the programcounter (PC) (sometimes
called the instruction pointer or IP) tells us which instruction of the programis currently being executed; similarly a stack pointer and associated
frame pointer are used tomanage the stack for function parameters, local
variables, and return addresses.
Finally, programs often access persistent storage devices too. Such I/O
informationmight include a list of the files the process currently has open.
The abstraction provided by the OS of a running programis something
we will call a process. As we said above, a process is simply a running
program; at any instant in time, we can summarize a process by taking an
inventory of the different pieces of the systemit accesses or affects during
the course of its execution.
To understand what constitutes a process,we thus have to understand
its machine state: what a programcan read or update when it is running.
At any given time, what parts of the machine are important to the execution
of this program?
One obvious component of machine state that comprises a process is
its memory. Instructions lie in memory; the data that the running program
reads and writes sits in memory as well. Thus the memory that the
process can address (called its address space) is part of the process.
Also part of the process’smachine state are registers;many instructions
explicitly read or update registers and thus clearly they are important to
the execution of the process.
Note that there are some particularly special registers that form part
of this machine state. For example, the programcounter (PC) (sometimes
called the instruction pointer or IP) tells us which instruction of the programis currently being executed; similarly a stack pointer and associated
frame pointer are used tomanage the stack for function parameters, local
variables, and return addresses.
Finally, programs often access persistent storage devices too. Such I/O
informationmight include a list of the files the process currently has open.
การแปล กรุณารอสักครู่..
