PDF Google Drive Downloader v1.1


Báo lỗi sự cố

Nội dung text Process Management.pdf

BCA Fourth Semester Operating Systems Unit -3 Process Management [15 Hrs] 1
Introduction to Process • A process is an instance of a program in execution. • A program by itself is not a process; a program is a passive entity, such as a file containing a list of instructions stored on disks. (often called an executable file), whereas a process is an active entity, with a program counter specifying the next instruction to execute and a set of associated resources. • A program becomes a process when an executable file is loaded into memory. Program: A set of instructions a computer can interpret and execute. 2 Process: – Dynamic – Part of a program in execution – a live entity, it can be created, executed and terminated. – It goes through different states wait running Ready etc – Requires resources to be allocated by the OS – one or more processes may be executing the same code. Program: – static – no states
Introduction to Process (contd..) This example illustrate the difference between a process and a program: main () { int i , prod =1; for (i=0;i<100;i++) prod = pord*i; } • It is a program containing one multiplication statement (prod = prod * i) but the process will execute 100 multiplication, one at a time through the 'for' loop. • Although two processes may be associated with the same program, they are nevertheless considered two separate execution sequences. • For instance several users may be running different copies of mail program, or the same user may invoke many copies of web browser program. • Each of these is a separate process, and although the text sections are equivalent, the data, heap and stack section may vary. 3
The Process Model 4 Fig: (a) Multiprogramming of four programs. (b) Conceptual model of four independent, sequential processes. (c) Only one program is active at any instant. • A process is just an executing program, including the current values of the program counter, registers, and variables. • Conceptually, each process has its own virtual CPU. In reality, of course, the real CPU switches back and forth from process to process, but to understand the system, it is much easier to think about a collection of processes running in (pseudo) parallel, than to try to keep track of how the CPU switches from program to program. • This rapid switching back and forth is called multiprogramming.

Tài liệu liên quan

x
Báo cáo lỗi download
Nội dung báo cáo



Chất lượng file Download bị lỗi:
Họ tên:
Email:
Bình luận
Trong quá trình tải gặp lỗi, sự cố,.. hoặc có thắc mắc gì vui lòng để lại bình luận dưới đây. Xin cảm ơn.