C C T B H P N

Lecture #10 - Processes and Threads

More examples

Web Resourses:

UML XML, HTML Code Project Microsoft Developer's Network XML Sells Brothers C# Corner Mono Project Performance Counters

Content:

This lecture continues discussion of threading models and locking with more examples. Class text chapter 22.
  1. The Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Grievance Session:

    Grading Grievance Session for Project #1 will be held in CST 4-201 at 5:00pm on Friday, 10/5.
  3. Projects:

    Project #1, Project #2, Project #3, Project #4, Project #5, Project2HelpF2018 Find Visual Studio Command Window used to test Compile.bat and Run.bat files Project #1 Grades, Project #2 Packages, Project #2 Activities
  4. Basic Windows Concepts

    If you understand these diagrams, you have a good understanding of how Windows OS works.
  5. Windows Processes

  6. Threads

  7. Code Demos:

    Starting Threads
    Starting threads with ThreadStart and ParameterizedThreadStart delegates Basic Thread Demos
    Creating threads, locking with Lock, Monitor, and Mutex locks, another illustration of lambda closure Blocking Queue using Monitor
    Thread-safe blocking queue using preferred method of synchronization with Monitor BlockingCollection<T>
    We won't use this and won't discuss Queued Messages with BlockingQueue
    Communication between threads by passing messages throught BlockingQueue. Queued Messages with synchronized methods
    C#, like Java, has synchronized methods. We won't use them in this class. Wait For Event
    Use interlocked to signal type of action, Monitor to wait for a keyboard event Threads and Tasks
    Creation and use of threads, several threads running concurrently, threads sharing data, creation and use of Tasks, Tasks with Continuations.
    Tasks and Continuations
    Task with no result, Task with no result and continuation, Task with result, Task with result and Continuation, Task taking lambda, Task using asynch - await WPF Thread Demos
    Compares use of Dispatcher.Invoke and Async Await pattern for concurrency with Windows. WPF Dispatcher Invoke Demo
    Illustrates use of Dispatcher to marshal call from child thread to main UI thread. Threads-SMA-MTF15
    Thread with enqueued tasks, asynchronous function with callback, asynchronous notifier, stoppable asynchronous function Form's BackgroundWorker
    .Net FormInvoke Demo
    ThreadPool Demo
  8. Software Design Blog:
  9. System Structure