lec11

lec11 - Threads CS 2022: Introduction to C Instructor:...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Threads CS 2022: Introduction to C Instructor: Hussam Abu-Libdeh Cornell University (based on slides by Saikat Guha) Fall 2009, Lecture 11 Threads CS 2022, Fall 2009, Lecture 11
Background image of page 1

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

View Full DocumentRight Arrow Icon
Processes vs. Threads Processes . . . I Multiple simultaneous programs I Independent memory space I Independent open file-descriptors Threads . . . I Multiple simultaneous functions I Share the same memory I Share the same open file-descriptors Threads CS 2022, Fall 2009, Lecture 11
Background image of page 2
Threads Examples I Graphical User Interfaces (GUIs) I The GUI is usually put on a separate thread from the “app engine” I GUI remains responsive even if app blocks for processing I Web Browser Tabs I Each tab is managed by a separate thread for rendering I Web pages render “simultaneously” I Note: Google Chrome actually uses a separate process per tab Threads CS 2022, Fall 2009, Lecture 11
Background image of page 3

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

View Full DocumentRight Arrow Icon
Threads I One copy of the heap I One copy of the code I Multiple stacks Threads CS 2022, Fall 2009, Lecture 11
Background image of page 4
Threads #include <pthread.h>
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

lec11 - Threads CS 2022: Introduction to C Instructor:...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online