
C# 2008 and 2005 Threaded Programming : Beginner's Guide.
Title:
C# 2008 and 2005 Threaded Programming : Beginner's Guide.
Author:
Hillar, Gastón C.
ISBN:
9781847197115
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (455 pages)
Contents:
C# 2008 and 2005 Threaded Programming -- Table of Contents -- C# 2008 and 2005 Threaded Programming -- Credits -- About the Author -- Acknowledgement -- About the Reviewers -- Preface -- What this book covers -- What you need for this book -- Who is this book for -- Conventions -- Time for action - Uploading a document -- What just happened? -- Pop quiz -- Have a go hero -- Reader feedback -- Customer support -- Downloading the example code for the book -- Errata -- Piracy -- Questions -- 1. Taking Advantage of Multiprocessing and Multiple Cores -- Mono-processor systems: The old gladiators -- Single core: Only one warrior to fight against everybody -- Doing a tiny bit of each task -- The performance waterfall -- Have a go hero - Researching micro-architectures and applications -- Multi-processor systems: Many warriors to win a battle -- Have a go hero - Multi-processing systems -- Estimating performance improvements -- Have a go hero - Calculating an estimated performance improvement -- Avoiding bottlenecks -- Have a go hero - Detecting bottlenecks -- Taking advantage of multiple execution cores -- Have a go hero - Counting cores -- Scalability -- Have a go hero - Detecting scalability problems -- Load balancing: Keeping everybody happy -- Have a go hero - Thinking about load balancing -- Operating systems and virtual machines -- Parallelism is here to stay -- Have a go hero - Preparing minds for parallelism -- Summary -- 2. Processes and Threads -- Processes-any running program -- Time for action - Coding a simple CPU-intensive loop -- What just happened? -- Time for action - Changing the cores available for a process -- What just happened? -- Relating processes to cores -- Time for action - Changing a process priority -- What just happened? -- Linear code problems in multiprocessing systems.
Time for action - Running many processes in parallel -- What just happened? -- Time for action - Testing parallelism capabilities with processes -- What just happened? -- Time for action - Using the Process Explorer -- Threads-Independent parts of a process -- Time for action - Listing threads with Process Explorer -- Have a go hero - Searching multithreaded applications -- Time for action - Analyzing context switches with Process Explorer -- What just happened? -- Multiple threads in servers -- Multiple threads in clients -- Have a go hero - Redesigning algorithms using pseudo-code -- Summary -- 3. BackgroundWorker-Putting Threads to Work -- RTC: Rapid thread creation -- Time for action - Breaking a code in a single thread -- What just happened? -- Time for action - Defining the work to be done in a new thread -- What just happened? -- Have a go hero - Adding UI elements and monitoring the application -- Asynchronous execution -- Time for action - Understanding asynchronous execution step-by-step -- What just happened? -- Synchronous execution -- Showing the progress -- Time for action - Using a BackgroundWorker to report progress in the UI -- What just happened? -- Have a go hero - Reporting progress in many ways -- Cancelling the job -- Time for action - Using a BackgroundWorker to cancel the job -- What just happened? -- Time for action - Using a BackgroundWorker to detect a job completed -- What just happened? -- Time for action - Working with parameters and results -- What just happened? -- Have a go hero - Enhancing the application -- Working with multiple BackgroundWorker components -- Time for action - Using many BackgroundWorker components to break the code faster -- What just happened? -- Have a go hero - Monitoring and enhancing the application -- BackgroundWorker and Timer -- BackgroundWorker creation on the fly.
Time for action - Creating BackgroundWorker components in run-time -- What just happened? -- Have a go hero - Enhancing the code -- Pop quiz -- Summary -- 4. Thread Class-Practical Multithreading in Applications -- Creating threads with the Thread class -- Time for action - Defining methods for encryption and decryption -- What just happened? -- Time for action - Running the encryption in a new thread using the Thread class -- What just happened? -- Decoupling the UI -- Creating a new thread -- Retrieving data from threads -- Sharing data between threads -- Time for action - Updating the UI while running threads -- What just happened? -- Sharing some specific data between threads -- A BackgroundWorker helping a Thread class -- Time for action - Executing the thread synchronously -- What just happened? -- Main and secondary threads -- Have a go hero - Concurrent encryption algorithms -- Passing parameters to threads -- Time for action - Using lists for thread creation on the fly I -- What just happened? -- Time for action - Using lists for thread creation on the fly II -- What just happened? -- Creating as many threads as the number of cores -- Receiving parameters in the thread method -- Have a go hero - Concurrent UI feedback -- Pop quiz -- Summary -- 5. Simple Debugging Techniques with Multithreading -- Watching multiple threads -- Time for action - Understanding the difficulty in debugging concurrent threads -- What just happened? -- Debugging concurrent threads -- Time for action - Finding the threads -- What just happened? -- Understanding the information shown in the Threads window -- Time for action - Assigning names to threads -- What just happened? -- Identifying the current thread at runtime -- Debugging multithreaded applications as single-threaded applications -- Time for action - Leaving a thread running alone -- What just happened?.
Freezing and thawing threads -- Viewing the call stack for each running thread -- Have a go hero - Debugging and enhancing the encryption algorithm -- Showing partial results in multithreaded code -- Time for action - Explaining the encryption procedure -- What just happened? -- Showing thread-safe output -- Time for action - Isolating results -- What just happened? -- Understanding thread information in tracepoints -- Have a go hero - Concurrent decryption -- Pop quiz -- Summary -- 6. Understanding Thread Control with Patterns -- Starting, joining, pausing, and restarting threads -- Time for action - Defining methods for counting old stars -- What just happened? -- Avoiding conflicts -- Splitting image processing -- Understanding the pixels' color compositions -- Time for action - Running the stars counter in many concurrent threads -- What just happened? -- Creating independent blocks of concurrent code -- Using flags to enhance control over concurrent threads -- Rebuilding results to show in the UI -- Testing results with Performance Monitor and Process Explorer -- Time for action - Waiting for the threads' signals -- What just happened? -- Using the AutoResetEvent class to handle signals between threads -- Using the WaitHandle class to check for signals -- Have a go hero - Pausing and restarting threads with flags -- Pop quiz -- Summary -- 7. Dynamically Splitting Jobs into Pieces-Avoiding Problems -- Running split jobs many times -- Time for action - Defining new methods for running many times -- What just happened? -- Time for action - Running a multithreaded algorithm many times -- What just happened? -- Using classes, methods, procedures, and functions with multithreading capabilities -- Time for action - Analyzing the memory usage -- What just happened? -- Understanding the garbage collector with multithreading.
Time for action - Collecting the garbage at the right time -- What just happened? -- Controlling the system garbage collector with the GC class -- Avoiding garbage collection problems -- Avoiding inefficient processing usage problems -- Have a go hero - Queuing threads and showing progress -- Retrieving the total memory thought to be allocated -- Generalizing the algorithms for segmentation with classes -- Time for action - Creating a parallel algorithm piece class -- What just happened? -- Time for action - Using a generic method in order to create pieces -- What just happened? -- Creating the pieces -- Time for action - Creating a parallel algorithm coordination class -- What just happened? -- Starting the threads associated to the pieces -- Accessing instances and variables from threads' methods -- Time for action - Adding useful classic coordination methods -- What just happened? -- Have a go hero - Splitting algorithms specializing classes -- Pop quiz -- Summary -- 8. Simplifying Parallelism Complexity -- Specializing the algorithms for segmentation with classes -- Time for action - Preparing the parallel algorithm classes for the factory method -- What just happened? -- Defining the class to instantiate -- Preparing the classes for inheritance -- Time for action - Creating a specialized parallel algorithm piece subclass -- What just happened? -- Creating a complete piece of work -- Writing the code for a thread in an instance method -- Time for action - Creating a specialized parallel algorithm coordination subclass -- What just happened? -- Creating simple constructors -- Time for action - Overriding methods in the coordination subclass -- What just happened? -- Programming the piece creation method -- Programming the results collection method -- Time for action - Defining a new method to create an algorithm instance -- What just happened?.
Forgetting about threads.
Abstract:
Exploit the power of multiple processors for faster, more responsive software.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Genre:
Electronic Access:
Click to View