Upcoming Presentations ILM Professional Service – Proprietary and Confidential (http://www.ilmservice.com) DateTimeTopicPresenter March 124-6 PM Distributed.

Slides:



Advertisements
Similar presentations
How to Build Multi- threaded Applications in.NET Mazen S. Alzogbi Technology Specialist Microsoft Corporation.
Advertisements

Processes Management.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Lecture 5 Concurrency and Process/Thread Synchronization     Mutual Exclusion         Dekker's Algorithm         Lamport's Bakery Algorithm.
CS 5704 Fall 00 1 Monitors in Java Model and Examples.
Chapter 14 Multithreading Yingcai Xiao. Multithreading is a mechanism for performing two or more tasks concurrently.  In the managed world of the common.
Lecture 4 Thread Concepts. Thread Definition A thread is a lightweight process (LWP) which accesses a shared address space provided by by the parent process.
Concurrency…leading up to writing a web crawler. Web crawlers.
CS220 Software Development Lecture: Multi-threading A. O’Riordan, 2009.
Multithreading in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
Fundamentals of Python: From First Programs Through Data Structures
Parallel Processing (CS526) Spring 2012(Week 8).  Thread Status.  Synchronization in Shared Memory Programming(Java threads ) ◦ Locks ◦ Barriars.
Windows Programming Using C# Threading. 2 Contents Threading Thread class Interlocked class Monitor class Semaphore class Thread Pools.
Object Oriented Analysis & Design SDL Threads. Contents 2  Processes  Thread Concepts  Creating threads  Critical sections  Synchronizing threads.
Overview of Threading with the.NET Framework  Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform.
Threads. Overview Problem Multiple tasks for computer Draw & display images on screen Check keyboard & mouse input Send & receive data on network Read.
Today’s Agenda  Quick Review  Finish Java Threads  The CS Problem Advanced Topics in Software Engineering 1.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Java Threads. What is a Thread? A thread can be loosely defined as a separate stream of execution that takes place simultaneously with and independently.
C# I 1 CSC 298 Threads. C# I 2 Introducing Threads  A thread is a flow of control within a program  A piece of code that runs on its own. The execution.
Copyright ©: University of Illinois CS 241 Staff1 Threads Systems Concepts.
1 Program5 Due Friday, March Prog4 user_thread... amount = … invoke delegate transact (amount)... mainThread... Total + = amount … user_thread...
15.1 Threads and Multi- threading Understanding threads and multi-threading In general, modern computers perform one task at a time It is often.
Concurrency Control 1 Fall 2014 CS7020: Game Design and Development.
SurfaceView.
CS399 New Beginnings Jonathan Walpole. 2 Concurrent Programming & Synchronization Primitives.
C H A P T E R E L E V E N Concurrent Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Lecture 20 Threads Richard Gesick. Threads Makes use of multiple processors/cores if available Share memory within the program (as opposed to processes.
Multithreading. Multitasking The multitasking is the ability of single processor to perform more than one operation at the same time Once systems allowed.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Unit 4: Processes, Threads & Deadlocks June 2012 Kaplan University 1.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
1 5-High-Performance Embedded Systems using Concurrent Process (cont.)
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
CIS NET Applications1 Chapter 8 – Multithreading and Concurrency Management.
Concurrency in Java MD. ANISUR RAHMAN. slide 2 Concurrency  Multiprogramming  Single processor runs several programs at the same time  Each program.
Concurrent Programming in Java Based on Notes by J. Johns (based on Java in a Nutshell, Learning Java) Also Java Tutorial, Concurrent Programming in Java.
Demonstrating Multithreading Concepts. Overvie w Multithreading or free-threading is the ability of an operating system to concurrently run programs that.
Java Thread Programming
Tutorial 2: Homework 1 and Project 1
Multithreading The objectives of this chapter are:
Threading Lecture 11 M. Ipalakova.
Processes and threads.
Process concept.
Process Management Process Concept Why only the global variables?
PROCESS MANAGEMENT IN MACH
Multi Threading.
Async or Parallel? No they aren’t the same thing!
Computer Engg, IIT(BHU)
Chapter 4 Multithreading programming
Multithreading.
Multithreading.
Threading using C# and .Net
Multithreaded Programming
Threads Chapter 4.
Multithread Programming
Multithreading in java.
CS333 Intro to Operating Systems
Multithreading Dr. John P. Abraham.
CS703 – Advanced Operating Systems
Lecture 19 Threads CSE /6/2019.
Multithreading The objectives of this chapter are:
Chapter 3: Process Management
Java Chapter 3 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Upcoming Presentations ILM Professional Service – Proprietary and Confidential ( DateTimeTopicPresenter March PM Distributed Programming Using.NET Remoting Lester Temple of Landl Softwares April 44-6 PM Reflection in.NETAndrew Troelson of Intertech May 24-6 PM C# and FlashRick Waldvogel of Motivaction June 64-6 PM Mobil web development with ASP.NET Umer Faruq

User Group’s Web Site New web site for the user group. – –Bunch of new features List of latest news and events Details of upcoming presentations Code Zone – code download area Presentations submitted by the user group’s members Threaded discussion lists. The more you use it, the better it gets –Volunteers needed to provide content. Send to ILM Professional Service – Proprietary and Confidential (

Attend Get.NET! For Free Drawing for a free Get.NET! seminar –Remember to turn-in your evaluation form –Drawing will be conducted after the presentation –One lucky person will walk away with free registration to the Get.NET! seminar on March 6 th –Everyone else gets a 25% discount by using the coupon code “tcnug” during registration ILM Professional Service – Proprietary and Confidential (

Multi Threading What is multi threaded programming –Allows you to run several sections of your code simultaneously –On a single CPU machine Operating system balances the use of processor among all threads Operating system simulates parallel processing by constantly switching between threads ILM Professional Service – Proprietary and Confidential (

Multi Threading When to use multi threading ? –When you need to quickly respond to users’ interactions You can leverage.NET Remoting or ASP.NET web service to distribute processing load to multiple computers –Consider multi threading when you need to process several independent transactions ILM Professional Service – Proprietary and Confidential (

Multi Threading Meet Minne-500 –Simple car racing game. –An old car “Oldie” races with a new car “newbie” –Shows multi-threaded programming –Change thread priorities and watch its effect ILM Professional Service – Proprietary and Confidential (

Multi Threading Considerations while using multiple threads –Creates memory overhead because the context for each thread needs to be saved separately –Creates more work for the processor because it needs to switch frequently between multiple threads of execution –Can slow down your application if operated in a single processor environment –Multi threading works best in parallel processor systems, or in a distributed computing environment ILM Professional Service – Proprietary and Confidential (

Multi Threading Creating threads –Using ThreadPool class Contained inside System.Threading namespace Only contains static methods By default, contains a pool of 25 threads Processing can not be aborted after its started Can not set priority on the thread Use “QueueUserWorkItem” method to start parallel processing “QueueUserWorkItem” receives a “WaitCallBack” delegate. “WaitCallBack” delegate receives an object as a parameter, which can be used to pass state info. ILM Professional Service – Proprietary and Confidential (

Multi Threading Creating threads –Creating custom threads Threads are created by instantiating Thread class Contained in System.Threading namespace Complete control over prioritizing, aborting threads. Thread class receives a “ThreadStart” delegate as a parameter to the constructor “ThreadStart” delegate does not receive any parameter and does not return any value ILM Professional Service – Proprietary and Confidential (

Multi Threading Starting a thread –Use the Start method of the Thread class to start its execution Stopping a thread –Use the Abort method of the Thread class to stop its execution Handling thread abortion –When a thread is aborted,.NET runtime throws “ThreadAbortException” –This exception can be handled to perform any necessary cleanup ILM Professional Service – Proprietary and Confidential (

Multi Threading Suspending a thread –Use the “Suspend” method of the Thread class to halt its execution. Its like pushing the pause button on VCR. Resuming a thread –Use the “Resume method of the Thread to resume its execution. Sleeping a thread –Use the static method “Sleep” of the Thread class to cause the thread to become dormant for a specified period of time. ILM Professional Service – Proprietary and Confidential (

Multi Threading Waiting for another thread –Use the “Join” method of the Thread class to specify that you intend to wait for another thread to finish running. Synchronizing threads –Meet the “Thread Pull”, designed to simulate multiple threads working together –Use Interlocked class for simple increment and decrement operations –Use “lock” keyword to synchronize access to a code block. –This keyword will cause all threads accessing the code block to queue up and execute in a sequence ILM Professional Service – Proprietary and Confidential (

Multi Threading Synchronizing threads –Using Monitor Use the “Wait” method of the Monitor class to suspend a thread until another event occurs in the system. Use the “Pulse” or “PulseAll” method of the Monitor class to activate thread(s) sitting in wait mode. ILM Professional Service – Proprietary and Confidential (