{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter-02 - Chapter 2 Processes and Threads 2.1 Processes...

Info icon This preview shows pages 1–19. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Processes and Threads Chapter 2 2.1 Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Agenda 2.1 Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling
Image of page 2
3 Process The most central concept in any OS An abstraction of a running program Modern Computers Can do more than one thing at the same time Can run user programs Can read disk and work with user terminal In a multiprogramming system More than one user program can be scheduled Each may run for tens of msecs.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Processes The Process Model Multiprogramming of four programs Conceptual model of 4 independent, sequential processes Only one program active at any instant
Image of page 4
5 Process Creation Principal events that cause process creation 1. System initialization 2. Execution of a process creation system 3. User request to create a new process 4. Initiation of a batch job
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Process Termination Conditions which terminate processes 1. Normal exit (voluntary) 2. Error exit (voluntary) 3. Fatal error (involuntary) 4. Killed by another process (involuntary)
Image of page 6
7 Process Hierarchies Parent creates a child process, child processes can create its own process Forms a hierarchy UNIX calls this a "process group" Windows has no concept of process hierarchy all processes are created equal
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 Process States (1) Possible process states running blocked ready Transitions between states shown
Image of page 8
9 Process States (2) Lowest layer of process-structured OS handles interrupts, scheduling Above that layer are sequential processes
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10 Implementation of Processes (1) Fields of a process table entry
Image of page 10
11 Implementation of Processes (2) Skeleton of what lowest level of OS does when an interrupt occurs
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
12 Agenda 2.1 Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling
Image of page 12
13 Threads In traditional OS, each process has An address space A single tread of control In modern OS, each process may have Multiple threads of control Same address spare Running in quasi-parallel Thread or a Lightweight Process has a program counter, registers, stack
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
14 Threads The Thread Model (1) (a) Three processes each with one thread (b) One process with three threads
Image of page 14
15 The Thread Model (2) Items shared by all threads in a process Items private to each thread
Image of page 15

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
16 The Thread Model (3) Each thread has its own stack
Image of page 16
17 Thread Usage (1) A word processor with three threads
Image of page 17

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
18 Thread Usage (2) A multithreaded Web server
Image of page 18
Image of page 19
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern