tailieunhanh - Lecture Operating system concepts - Lecture 6

In previous chapter, we introduced threads to the process model. On operating systems that support them, it is kernel-level threads not processes that are in fact being scheduled by the operating system. However, the terms "process scheduling" and "thread scheduling" are often used interchangeably. In this chapter, we use process scheduling when discussing general scheduling concepts and thread scheduling to refer to thread-specific ideas. | CSC 322 Operating Systems Concepts Lecture - 6: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-1) Ahmed Mumtaz Mustehsan, CIIT, Islamabad 1 Process: is an abstraction of a running program. Multitasking /Multiprogramming: The ability of OS to handle concurrent operation with only one CPU. Example: Web server: Serving Web pages to many clients. If requested page is available in the cache it is sent otherwise start a disk process to read page. When the system is booted, many processes are created, a process for incoming e-mail, process for up dating virus definitions of antivirus, process for printing files and process for burning a CD­ ROM, etc. What is a process? Lecture-6 2 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Process is an instance of a program, associated with registers, variables, and a program counter. It has a program, input, output and a state A computer manages many computations concurrently . | CSC 322 Operating Systems Concepts Lecture - 6: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-1) Ahmed Mumtaz Mustehsan, CIIT, Islamabad 1 Process: is an abstraction of a running program. Multitasking /Multiprogramming: The ability of OS to handle concurrent operation with only one CPU. Example: Web server: Serving Web pages to many clients. If requested page is available in the cache it is sent otherwise start a disk process to read page. When the system is booted, many processes are created, a process for incoming e-mail, process for up dating virus definitions of antivirus, process for printing files and process for burning a CD­ ROM, etc. What is a process? Lecture-6 2 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Process is an instance of a program, associated with registers, variables, and a program counter. It has a program, input, output and a state A computer manages many computations concurrently need an abstraction to describe how it does that, In multiprogramming system, CPU switches from process to process quickly, running each process for tens or hundreds of milliseconds. However at any instant of time, the CPU is running only one process, but giving the illusion of parallelism Some times called pseudo parallelism Multiprogramming Lecture-6 3 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Multiprogramming of four programs. Conceptual model of four independent, sequential processes. Only one program is active at once. Multiprogramming Lecture-6 4 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Events which can cause process creation: System initialization, while booting operating system. Execution of a process creation system call by a running process. A user request to create a new process. Initiation of a batch job. List the current processes use: ps command in UNIX Task Manager in windows Process Creation Lecture-6 5 Ahmed Mumtaz Mustehsan, CIIT, Islamabad When an operating system is .