电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第4讲 并发计算 Concurrent Computing

电子科技女学 Software Architecture Design Pattern Univers的aEe中onic Science and Technolopy时C■ Lecture 4 Concurrent Computing Concurrency vs.Parallism ·Threading Model Thread Synchronization ·案例:高并发网站架构解决方案 Software Architecture and Design Pattern
Software Architecture & Design Pattern Software Architecture and Design Pattern 1 Lecture 4 Concurrent Computing • Concurrency vs. Parallism • Threading Model • Thread Synchronization • 案例:高并发网站架构解决方案

电子特技女学 Concurrent Computing Aechitecture University af Electronic Science and Technoloryf Chim 222 Applications ● Programming paradigms Threads Interface Microkernel Operating System Multi-Processor Computing System Hardware P Processor Thread Process Software Architecture and Design Pattern 2
Concurrent Computing Aechitecture Software Architecture and Design Pattern 2 P P P P P .. P Microkernel Multi-Processor Computing System Threads Interface Hardware Operating System ProcessorThread Process P Applications Programming paradigms

电子科技女学 Software Architecture Design Pattern University Eectronic Scienceand ecol Parallel computing:using multiple processors in parallel to solve problems more quickly than with a single processor 。 Examples of parallel machines: -A cluster computer that contains multiple PCs combined together with a high speed network -A shared memory multiprocessor (SMP*)by connecting multiple processors to a single memory system -A Chip Multi-Processor (CMP)contains multiple processors(called cores)on a single chip Concurrent execution comes from desire for performance; unlike the inherent concurrency in a multi-user distributed system Technically,SMP stands for "Symmetric Multi-Processor" Software Architecture and Design Pattern 3
Software Architecture & Design Pattern Software Architecture and Design Pattern 3 • Parallel computing: using multiple processors in parallel to solve problems more quickly than with a single processor • Examples of parallel machines: – A cluster computer that contains multiple PCs combined together with a high speed network – A shared memory multiprocessor (SMP*) by connecting multiple processors to a single memory system – A Chip Multi-Processor (CMP) contains multiple processors (called cores) on a single chip • Concurrent execution comes from desire for performance; unlike the inherent concurrency in a multi-user distributed system * Technically, SMP stands for “Symmetric Multi-Processor

电子科技女学 Software Architecture Design Pattern University af Electronic Science and Technoloryf Chim Motivation for Concurrency Leverage hardware/software advances,e.g. multi-processors and OS thread support Increase performance,e.g.,overlap computation and communication Improve response-time,e.g.,GUIs and network servers Simplify program structure,e.g.,synchronous vs.asynchronous network IPC Software Architecture and Design Pattern 4
Software Architecture & Design Pattern Software Architecture and Design Pattern 4 Motivation for Concurrency • Leverage hardware/software advances, e.g. multi-processors and OS thread support • Increase performance, e.g., overlap computation and communication • Improve response-time, e.g., GUIs and network servers • Simplify program structure, e.g., synchronous vs. asynchronous network IPC

电子科技女学 Software Architecture Design Pattern University af Electronic Science and Technoloryf Chim Definitions 。Concurrency -"Logically"simultaneous processing Does not imply multiple processing elements ·Parallelism -"Physically"simultaneous processing Involves multiple processing elements and/or independent device operations Both concurrency and parallelism require controlled access to shared resources,e.g.I/O devices,files,database records,in-core data structures,consoles,etc. Software Architecture and Design Pattern 5
Software Architecture & Design Pattern Software Architecture and Design Pattern 5 Definitions • Concurrency - “Logically" simultaneous processing - Does not imply multiple processing elements • Parallelism - “Physically" simultaneous processing - Involves multiple processing elements and/or independent device operations Both concurrency and parallelism require controlled access to shared resources, e.g. I/O devices, files, database records, in-core data structures, consoles, etc

电子科技女学 Software Architecture Design Pattern nntE的aE中onic Science and Technolo时Ch■u Flynn's Classical Taxonomy Single Instruction,Single Data streams(SISD)-your single- core uni-processor PC 一 Single Instruction,Multiple Data streams(SIMD)-special purpose low-granularity multi-processor m/c w/a single control unit relaying the same instruction to all processors (w/different data)every cc (e.g.,nVIDIA graphic co- processor w/1000's of simple cores) - Multiple Instruction,Single Data streams(MISD)- pipelining is a major example Multiple Instruction,Multiple Data streams(MIMD)-the most prevalent model.SPMD(Single Program Multiple Data)is a very useful subset.Note that this is v.different from SIMD. Software Architecture and Design Pattern 6
Software Architecture & Design Pattern Software Architecture and Design Pattern 6 Flynn's Classical Taxonomy – Single Instruction, Single Data streams (SISD)—your singlecore uni-processor PC – Single Instruction, Multiple Data streams (SIMD)—special purpose low-granularity multi-processor m/c w/ a single control unit relaying the same instruction to all processors (w/ different data) every cc (e.g., nVIDIA graphic coprocessor w/ 1000’s of simple cores) – Multiple Instruction, Single Data streams (MISD)— pipelining is a major example – Multiple Instruction, Multiple Data streams (MIMD)—the most prevalent model. SPMD (Single Program Multiple Data) is a very useful subset. Note that this is v. different from SIMD

电子科技女学 Software Architecture Design Pattern University af Electronic Science and Technoloryf Chim Data Parallelism:SIMD and SPMD fall into this category Functional Parallelism:MISD falls into this category MIMD can incorporates both data and functional parallelisms (the latter at either instruction level- different instrs.being executed across the processors at any time,or at the high-level function space) Software Architecture and Design Pattern 7
Software Architecture & Design Pattern Software Architecture and Design Pattern 7 • Data Parallelism: SIMD and SPMD fall into this category • Functional Parallelism: MISD falls into this category • MIMD can incorporates both data and functional parallelisms (the latter at either instruction level— different instrs. being executed across the processors at any time, or at the high-level function space)

电子科技大学 Concurrent Computing Model University af Electronic Science and Technoloryf Chim Multiprocess vs.Multithread ·Multiprocess Multiple tasks or processes share common system resources such as CPU,I/O,etc. ·Multithread Multiple execution units within a process share system resources. Software Architecture and Design Pattern 8
Concurrent Computing Model Software Architecture and Design Pattern 8 Multiprocess vs. Multithread • Multiprocess Multiple tasks or processes share common system resources such as CPU, I/O, etc. • Multithread Multiple execution units within a process share system resources

电子州妓女学 Software Architecture Design Pattern University af Electronic Science and Technoloryf Chim Multiprocess---single core Word Web E-mail Antivirus Processor Browser Operating System CPU Core Software Architecture and Design Pattern 9
Software Architecture & Design Pattern Software Architecture and Design Pattern 9 Multiprocess --- single core

电子科技女学 Software Architecture Design Pattern University af Electronic Science and Technoloryf Chim Java Threading Model Two-level threads:user thread (java thread class) kernel thread(O/S kernel support) Thread model ·one-to-one 。many-to-one 。many-to-many Software Architecture and Design Pattern 10
Software Architecture & Design Pattern Software Architecture and Design Pattern 10 Java Threading Model Two-level threads: user thread (java thread class) kernel thread (O/S kernel support) Thread model • one-to-one • many-to-one • many-to-many
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第3讲 软件体系结构风格.pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第2讲 模型分析(软件体系结构建模).pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第1讲 软件体系结构概论(主讲:林迪).pdf
- 南京大学:《面向对象程序设计》课程教学资源(PPT课件讲稿)面向对象程序设计语言基础.pptx
- 南京大学:《面向对象程序设计》课程教学资源(PPT课件讲稿)面向对象初探简介(主讲:马骏).pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)红黑树.pptx
- 南京大学:《计算机问题求解》课程教学资源(课件讲稿)Hashing方法.pdf
- 南京大学:《计算机问题求解》课程教学资源(课件讲稿)Heap & HeapSort ?.pdf
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)基本数据结构.pptx
- 南京大学:《计算机问题求解》课程教学资源(课件讲稿)排序与选择 sorting and selection.pdf
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)概率分析与随机算法.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)离散概率基础.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)递归及其数学基础.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)分治法与递归.pptx
- 南京大学:《计算机问题求解》课程教学资源(课件讲稿)组合与计数 Counting.pdf
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)算法的效率.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)算法正确性.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)布尔代数.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)最大流算法.pptx
- 南京大学:《计算机问题求解》课程教学资源(PPT课件讲稿)旅行问题.pptx
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第5讲 分布式计算 Distributed Computing Architecture.pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第6讲 Web Service.pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第7讲 面向服务的架构(SOA).pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第8讲 架构变革——云计算的架构(IBM).pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第10讲 MapReduce计算模型.pdf
- 电子科技大学:《软件架构模型与设计》教学课件讲稿(Software Architecture Model and Design)第9讲 大数据 Big Data Computing Technology(Hadoop生态系统).pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第一章 信息安全概述(陈伟、李树全).pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第二章 网络威胁、攻击与网络协议安全性.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第四章 消息认证与数字签名.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第三章 密码学基础与加密技术.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第五章 密钥管理与分配.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第六章 身份认证.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第七章 访问控制.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第九章 入侵检测与入侵防御技术.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第八章 防火墙与VPN技术.pdf
- 电子科技大学:《网络安全理论与技术 Theory and technology of network security》课程教学资源(课件讲稿)第十章 总结与展望.pdf
- 电子科技大学:《网络计算模式 Network Computing Paradigm》课程教学资源(课件讲稿)01 概述及企业计算(丁熠).pdf
- 电子科技大学:《网络计算模式 Network Computing Paradigm》课程教学资源(课件讲稿)02 网格计算.pdf
- 电子科技大学:《网络计算模式 Network Computing Paradigm》课程教学资源(课件讲稿)03 云计算(一).pdf
- 电子科技大学:《网络计算模式 Network Computing Paradigm》课程教学资源(课件讲稿)04 云计算(二).pdf