What is a process? What information does an operating system generally need to keep about running processes in order to execute them?


2 Answers

Natalie Holeman Profile
Natalie Holeman answered

A process is an executing computer program.

A process needs keep track of:

1.  The map of the locations your program is located in memory.

2.  Relative address for all instructions and data

3.  The value of all variables.

4.  The instruction location currently being executed.

5.  The instruction location of the next instruction to be executed.

6.  All register and counter values

7.  If at a condition statement it must keep track of:

a.  The location of each possible branch locations.

b.  The result of the condition test such that it can determine which branch to take.

8.  If at a call to a subprogram (I cannot remember what the new terminology is for a subprogram, including calls to the operating system to provide things like reading data, writing data, getting system time, ... While the program is executing these functions are just subroutine calls even if written by someone you have never met or heard of), it must keep track of:

a.  The argument stack location

b.  The return address

c.  All registers, counters,  and variables have to be stored prior to the executing the call

9.  Return address for the program upon termination

10.  Initial argument stack provided upon program start of execution

11.  Know how to terminate (there are programs designed never to terminate - they are usually on weapon systems and they stop running because the computer is destroyed -- weapon explodes).

I think this list is complete. 

Akhila Ramesh Profile
Akhila Ramesh answered

Lots of stuff; RAM, ROM, hard drive, CPU. All these and more work together in carrying out a computers functions. The CPU is the converter and the other things store the memory and instructions from the computer.

Answer Question