GWU CSCI 210 - Concurrency (27 pages)

Previewing pages 1, 2, 3, 25, 26, 27 of 27 page document View the full content.
View Full Document

Concurrency



Previewing pages 1, 2, 3, 25, 26, 27 of actual document.

View the full content.
View Full Document
View Full Document

Concurrency

21 views

Other


Pages:
27
School:
The George Washington University
Course:
Csci 210 - Advanced Software Paradigms

Unformatted text preview:

Concurrency 1 2 3 4 5 6 7 8 9 10 Why concurrent programming 2 Evolution 2 Definitions 4 Concurrent languages 6 Problems with concurrency 6 Process Interactions 8 Synchronization 14 Example 17 Concurrency in Java 20 Java Thread Life Cycle Deitel Deitel 21 1 1 Why concurrent programming Performance Throughput Utilization of system resources 2 Evolution Single user system o First systems supported one single activity at a time o Late 1950s One general purpose processor and one or more specialpurpose processors for input and output operations Multiprocessing systems These systems use the CPU while an input output operation is being performed Note that programmers cannot control this task explicitly Multitasking systems These systems give the impression that there are several CPUs serving different users at the same time Programmers cannot control task scheduling This is done by the operating system 2 Multithreading systems This is becoming very popular with Java Programmers can split their programs into several threads and schedule them Multiprocessor systems o These are systems with several processing elements PEs and programmers can concurrently use all these PEs o Single Instruction Multiple Data SIMD machines The same instruction goes to all processors each with different data e g vector processors Multiple Instruction Multiple Data MIMD machines Independent processors that can be synchronized unit level concurrency 3 3 Definitions Concurrency or Parallelism 9 Concurrency Logically simultaneous processing Does not require multiple processing elements Requires interleaved execution on a single processing element 9 Parallelism Physically simultaneous processing It does involve several processing elements 9 9 Both concurrency and parallelism require controlled access to shared resources In general people use the word concurrent and parallel interchangeably A concurrent program It is a program that has multiple threads or tasks of control allowing it perform multiple



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Concurrency and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Concurrency and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?