Ch'04 Outline - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Ch'04 Outline

Description:

Fork & exec calls. Duplication & replacement. cancellation ... Exec replaces entire process. Cancellation (target thread) Asynchronous ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 14
Provided by: top1
Category:
Tags: exec | outline

less

Transcript and Presenter's Notes

Title: Ch'04 Outline


1
Ch.04 Outline
  • Motivation
  • Web browser, word processor
  • Benefits
  • Responsiveness, resource sharing, economy,
    utilization of multiprocessor
  • User kernel threads

2
Ch.05 Outline (cont)
  • Multithreading models
  • Many-to-one
  • One-to-one
  • Many-to-many
  • Threading issues
  • Fork exec calls
  • Duplication replacement

3
Ch.05 Outline (cont)
  • Threading issues (cont)
  • cancellation
  • Asynchronous or deferred(cancellation pts)
  • Signal handling
  • Handling
  • Default or user defined handler
  • Signal delivery in multithreaded program
  • Applied, every, certain, specific

4
Ch.05 Outline (cont)
  • Threading issues (cont)
  • Thread pools
  • Time required for creation of threads
  • Bound on number of threads
  • Thread pools solves above problems
  • Thread-specific data
  • Thread examples

5
PRESENTATION
  • Threading issues (?4.4)
  • Fork exec calls
  • Duplication replacement
  • cancellation
  • Asynchronous or deferred(cancellation pts)
  • Signal handling
  • Handling
  • Default or user defined handler
  • Signal delivery in multithreaded program

6
PRESENTATION
  • Threading issues (cont)
  • Thread pools
  • Problems in multithreading
  • Benefits
  • Thread-specific data
  • PP. 132 138 in the text

7
threads
  • Motivation
  • Context switching overhead in HWP
  • Other benefits
  • User vs kernel threads
  • Efficient, fast, easy to manage
  • A thread can block the entire threads

8
Threads (cont.)
  • Many-to-one model
  • User threads
  • One-to-one model
  • No entire blocking, MP utilization
  • Overhead in kernel thread creation
  • thus limit the of threads
  • Many-to-many
  • Strong points of above models

9
Threading issues
  • Fork exec
  • Fork either duplicates all threads or one
  • Exec replaces entire process
  • Cancellation (target thread)
  • Asynchronous
  • reclaim of resources can be faulty
  • Deferred
  • cancellation points

10
Threading issues(cont.)
  • Signal handling
  • Definition
  • Asynchronous vs synchronous
  • Default or user-defined signal handler
  • Signal delivery
  • one ( applied or specific), all, certain
  • synchronous obvious

11
Threading issues(cont.)
  • Signal handling (cont.)
  • Signal delivery (cont.)
  • Asynchronous signals
  • ex. Process termination to all
  • to non-blocking threads
  • first one directly or thru a specific
  • thread

12
Threading issues(cont.)
  • Thread pools
  • two problems
  • time of threads
  • Create a thread pool at start up time solves
    above problems
  • Thread specific data
  • Copy not sharing (eg. Transaction proc.)

13
homework
  • What are the 5 issues in threading? List and
    explain them.
  • Solve exercise 5.1.
  • Solve exercise 5.2.
  • Solve exercise 5.8.
Write a Comment
User Comments (0)
About PowerShow.com