tailieunhanh - Lecture Operating systems: A concept-based approach: Chapter 5 - Dhananjay M. Dhamdhere
This chapter begins by discussing how an application creates processes through system calls and how the presence of many processes achieves concurrency and parallelism within the application. It then describes how the operating system manages a process - how it uses the notion of process state to keep track of what a process is doing and how it reflects the effect of an event on states of affected processes. The chapter also introduces the notion of threads, describes their benefits, and illustrates their features. | Chapter 5 Processes and Threads Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Introduction Processes and Programs Implementing Processes Threads Case Studies of Processes and Threads 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Processes and Programs What Is a Process? Relationships between Processes and Programs Child Processes Concurrency and Parallelism 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere What Is a Process? A process comprises six components: (id, code, data, stack, resources, CPU state) 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Relationships between Processes and Programs A program is a set of functions and procedures Functions may be separate processes, or they may constitute the code part of a single process 5. Operating Systems, by Dhananjay . | Chapter 5 Processes and Threads Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Introduction Processes and Programs Implementing Processes Threads Case Studies of Processes and Threads 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Processes and Programs What Is a Process? Relationships between Processes and Programs Child Processes Concurrency and Parallelism 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere What Is a Process? A process comprises six components: (id, code, data, stack, resources, CPU state) 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Relationships between Processes and Programs A program is a set of functions and procedures Functions may be separate processes, or they may constitute the code part of a single process 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Child Processes Kernel initiates an execution of a program by creating a process for it Primary process may make system calls to create other processes Child processes and parents create a process tree Typically, a process creates one or more child processes and delegates some of its work to each Multitasking within an application 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Child Processes (continued) 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Example: Child Processes in a Real-Time Application 5. Operating Systems, by Dhananjay Dhamdhere Copyright © 2008 Operating Systems, by Dhananjay Dhamdhere Concurrency and Parallelism Parallelism: quality of occurring at the same time Two tasks are parallel if they are performed at the same time Obtained by using multiple CPUs As in a .
đang nạp các trang xem trước