CO – 2 : Processes
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
CO – 2 : Processes
3.2
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Concept
3.3
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Concept (Cont.)
3.4
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process in Memory
3.5
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process State
3.6
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Diagram of Process State
3.7
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Control Block (PCB)
Information associated with each process
(also called task control block)
3.8
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
CPU Switch From Process to Process
3.9
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Threads
3.10
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Representation in Linux
Represented by the C structure task_struct
�pid t_pid; /* process identifier */ �long state; /* state of the process */ �unsigned int time_slice /* scheduling information */ �struct task_struct *parent; /* this process’s parent */ �struct list_head children; /* this process’s children */ �struct files_struct *files; /* list of open files */ �struct mm_struct *mm; /* address space of this process */
3.11
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Scheduling
3.12
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Ready Queue And Various I/O Device Queues
3.13
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Representation of Process Scheduling
3.14
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Schedulers
3.15
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Addition of Medium Term Scheduling
3.16
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Multitasking in Mobile Systems
3.17
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Context Switch
3.18
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Operations on Processes
3.19
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Creation
3.20
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
A Tree of Processes in Linux
3.21
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Creation (Cont.)
3.22
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
C Program Forking Separate Process
3.23
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Creating a Separate Process via Windows API
3.24
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Termination
3.25
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Process Termination
pid = wait(&status);
3.26
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Multiprocess Architecture – Chrome Browser
3.27
Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition