SlideShare uma empresa Scribd logo
1 de 5
• Cognizant 20-20 Insights




Leveraging Multi-core Processors
Through Parallel Programming
   Executive Summary                                    Why Parallel Computing?
   Swift and inexorable advances in hardware have       In 1965, Intel co-founder Gordon Moore observed
   historically challenged software developers to       that the number of transistors available to semi-
   maximize system capabilities and meet users’         conductor manufacturers would double approxi-
   soaring expectations.                                mately every 18 to 24 months. Today’s new
                                                        and faster multi-core and chip multi-threading
   This is especially true in microprocessor            processor designs are making that level of scal-
   technology, where the state of the art has quickly   ability more easily attainable and affordable.
   moved from dual-, tri-, quad-, hexa-, octo-core
   chips to units with tens or even hundreds of         Parallel Thinking
   cores. The good news is that processors are          Flynn’s taxonomy4 is a specific classification of
   going to continue to become more powerful.           parallel computer architectures that is based on
   The flip side is that, at least in the short term,   the number of concurrent instruction (single or
   growth will come mostly in directions that do not    multiple) and data streams (single or multiple)
   take most current applications along for their       available in the architecture (see Figure 1).
   customary free ride.
                                                        The first dimension is the number of instruction
   This white paper offers an outlook for parallel      streams that particular computer architecture
   software development and focuses in particular       may be capable of processing at a single point
   on application development for shared memory         in time. The second dimension is the number of
   multi-core systems using an Ateji® PX1 open          data streams that can be processed at a single
   source preprocessor for Java. 2                      point in time. In this way, any given computing
                                                        system can be described in terms of how instruc-
   Ateji® PX provides a smooth transition path from
                                                        tions and data are processed.
   today’s sequential programming languages to
   future parallel languages, likely to be excep-
                                                        What This Means for Developers
   tionally different and require new thinking
   and techniques for designing programs. Code          The traditional approach to programming
   written in Ateji® PX is both compatible with         (sequential programming) will not efficiently take
   today’s languages and ready for tomorrow’s           advantage of multi-core systems. Sequential
   hardware.                                            programming proved beneficial when computers




   cognizant 20-20 insights | august 2011
Flynn’s Rules



                                                     Multiple                    MISD                        MIMD
                                                     Instruction




                                       Instruction
                                                     Single                        SISD                                SIMD
                                                     Instruction
                                                                               Single Data                  Multiple Data

                                                                                  Data


Figure 1


Architectural Comparison

   Single-core Architecture

                       CPU STATE

                 INTERRUPT LOGIC


           EXECUTION                                               PROGRAM                   IN                   I2     I1             CPU
                                   CACHE
             UNITS
                                                                                                   INSTRUCTIONS

   Single-core                                            Instructions Execution in Single-core

   Multi-core Architecture

                 CPU STATE                                         CPU STATE                                                                                CPU
                                                                                                                              IN                  I2   I1
              INTERRUPT LOGIC                                 INTERRUPT LOGIC                           PROGRAM
                                                                                                                                   INSTRUCTIONS


       EXECUTION                                          EXECUTION                                                           IN                  I2   I1   CPU
                               CACHE                                           CACHE
         UNITS                                              UNITS
                                                                                                                                   INSTRUCTIONS


   Multi-core                                                                                     Instructions Execution in Multi-core



Figure 2




had single-core architectures, but with multi-core                                                 a program in less time. The single-core and
systems the approach is inefficient. To fully                                                      multi-core architectures, along with the instruc-
exploit the capability of multi-core machines,                                                     tions executions, are highlighted above.
developers need to redesign applications so that
each microprocessor can treat code instructions                                                    Designing and developing parallel programs
as multiple threads of execution. One way to                                                       has typically been a very manual process. The
resolve this is by utilizing parallel programming.                                                 programmer is usually responsible for both iden-
                                                                                                   tifying and actually implementing parallelism.
What Is Parallel Programming?
                                                                                                   Parallel programming presents many pitfalls
Parallel Programming5 is a form of computation
                                                                                                   — race conditions are the most common and
in which program instructions are divided among
                                                                                                   difficult multi-threaded programming problem.
multiple processors (cores, computers) in com-
                                                                                                   Other potential issues include mutual exclusion
bination to solve a single problem, thus running
                                                                                                   and deadlock. Overhead due to thread synchro-




                                       cognizant 20-20 insights                                     2
Multi-core Assessment Sheet
                                                        Software Details
 Eclipse SDK                  Helios (Version: 3.6.2)
 Java Virtual Machine         JVM version 1.6 or higher
 Ateji PX                     Ateji PX™ (Version: 1.2.0.201106241352)
 SQL Server 2005              Microsoft SQL Server Enterprise Edition (Version: 9.00.5000.00)
                                                        Hardware Details
             Type                                  Desktop                                                 Laptop
 Operating System             Windows XP Professional SP3                           Windows 7 Professional
 CPU Name                     Intel Core 2 Duo E6550                                Intel Core i5 520M
 Specification                Intel® Core™ 2 Duo CPU E6550 @2.33GHz                 Intel® Core™ i5 CPU M520 @2.40GHz
 Cores                        2                                                     2
 Threads                      2                                                     4
 Core Speed                   1990 – 2400 MHz (approx.)                             1197 - 1330 MHz (approx.)
 Cache                        L1 Data(2X32KBytes) 8 -Way,                           L1 Data(2X32KBytes) 8 -Way,
                              L1 Inst(2X32KBytes) 8 -Way,                           L1 Inst(2X32KBytes) 4 -Way,
                              Level2 (4096 KBytes) 16 -Way                          Level2 (2X256 KBytes) 8 -Way,
                                                                                    Level2 (3 MBytes) 12 -Way
 Memory                       Type: DDR2                                            Type: DDR3,
                              Channel #: Dual                                       Channels #: Dual
                              Size: 2048 Mbytes                                     Size : 4096 MBytes,
                              DC Mode: Symmetric                                    DC Mode: Symmetric
                                                            Inference
             Type                                  Desktop                                                 Laptop
 Latency (in Sec)             Sequential                   Parallel                 Sequential                      Parallel
 Test Run1                    358.31                       214.12                   675.13                          208.69
 Test Run2                    333.13                       222.63                   657.12                          212.99
 Test Run3                    336.97                       215.99                   685.61                          205.07
 Average                      342.8                        217.58                   672.62                          208.91
 Sequential Vs. Parallel                        342.80     342.80                           672.62     672.62
 Program                               350        350                               700       700
                                       300        300                               600       600
                                       250        250        217.58      217.58     500       500
                                       200        200                               400       400
                                       150        150                               300       300
                                       100        100                                                    208.91       208.91
                                                                                    200       200
                                        50         50                               100       100
                                         0          0                                 0          0
                                              Sequential Sequential
                                                             Parallel    Parallel         Sequential Sequential
                                                                                                         Parallel     Parallel

 Percentage of
                                                     36.52%                                                 68.87%
 Improvement

Figure 3



nization and load balancing can severely impact                         software development, particularly in the area
run-time performance and can be very hard to                            of complex parallel applications.
fix. Thus, very often manually developing parallel
codes is a time-consuming, complex, error-prone                         For many years, various tools have been
and iterative process.6                                                 available to assist programmers in converting
                                                                        serial programs into parallel programs, thereby
How to Improve Time to Market                                           overcoming key parallel programming pitfalls
There is a well-known ancient Chinese saying:                           such as race conditions, deadlock, etc. Ateji®
“A craftsman first sharpens his tools before                            PX is among the more promising tools used to
laboring on his work.” This is very true of                             parallelize a serial program.




                           cognizant 20-20 insights                     3
Why Ateji® PX for Parallel                                tailored to customer specifications and to
Programming?                                              the way customers do business. Importantly,
                                                          parallel programs can be more easily altered
Ateji® PX for Java™ introduces parallelism at
                                                          as business changes require. We have imple-
the language level, extending the sequential
                                                          mented a solution for a large multinational
base language with a small number of parallel
                                                          manufacturing conglomerate, which powered
primitives. It is compatible at the source level
                                                          them to accommodate multiple business
and byte-code level with all Java™ and JVM-based
                                                          processes efficiently.
programs and libraries. This makes parallel pro-
gramming simple and intuitive, easy to learn,         •   Higher Return on Investment: Implement-
efficient, provably correct and compatible with           ing parallel programs would, over time, reduce
existing code; it is suitable for parallelizing           development cycles and improve CPU utiliza-
legacy applications and leaves more time to               tion by making use of all the available cores in
concentrate on performance improvements. We               servers, thus enhancing the capacity to house
assayed the Ateji® PX for Java™ preprocessor              more applications on specific machines.
against multi-core machines. What follows are
our key findings.                                     Conclusion
                                                      The processing speed that can be obtained using
We successfully incorporated the Ateji® PX for        parallel programming depends on the number of
a CPU-intensive application program used by a         processors available, and also on the size of the
client to generate approximately 4000 MSDS            problem and the way in which it can be broken
(Material Safety Data Sheets) from RTF to PDF         into constituent parts. A program organized
format for various countries (see Figure 3).          according to independence and divide-and-
                                                      conquer principles is more easily run either in
The Business Benefits                                 parallel or sequentially, according to resources
•   Increased Company Value: Improved perfor-         available.
    mance and maximized profits. Well-designed
    parallel programs result in greater value for     Given that multi-core processors/parallel
    the business as well as for the customers.        computing and most computing platforms
                                                      available support multiple instructions, multiple
•   Improved Productivity and Insight: Improved
                                                      data (MIMD), it makes sense to leverage parallel
    application efficiency and productivity; thus,
                                                      programming to its fullest on shared-memory
    improved TTM (time to market).
                                                      machines, massively parallel super computers,
•   Reduce Costs and Increased Flexibility:           clusters, and even across a utility computing
    Parallel programming provides the greatest        grid.
    flexibility possible since the application is




Footnotes
1
    http://www.ateji.com/px/1.0/javadoc/
2
    http://www.oracle.com/us/technologies/java/index.html
3
    “Ten Laws Of The Modern World” http://www.forbes.com/2005/04/19/cz_rk_0419karlgaard.html
4
    http://www.phy.ornl.gov/csep/ca/node11.html
5
    http://en.wikipedia.org/wiki/Parallel_computing
6
    “The Problems with Threads”, Edward A. Lee, Professor, Chair of EE, Associate Chair of EECS, EECS
    Department, University of California at Berkeley, http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/
    EECS-2006-1.pdf


Resources
http://en.wikipedia.org/wiki/Intel_Core
http://www.vogella.de/articles/JavaConcurrency/article.html#concurrency



                        cognizant 20-20 insights      4
About the Authors
Giri Muthusamy is a Cognizant Associate focused on Java/J2EE projects. His interests revolve
around the design of enterprise applications and RDBMS concepts. Giri holds a bachelor’s degree in
Mechanical Engineering and is also a Microsoft SQL Server certified professional. He can be reached
at Giri.Muthusamy@cognizant.com.

Rahul Ramalingam is a Cognizant Technology Specialist focused on Java/J2EE high-level system
design and application development and building enterprise software applications. He has an
engineering degree in computer science and holds various software certifications including IBM
Rational solution designer — OOAD and TOGAF 8 Certified Enterprise Architecture Practitioner.
Rahul can be reached at Rahul.Ramalingam@cognizant.com.




About Cognizant
Cognizant (NASDAQ: CTSH) is a leading provider of information technology, consulting, and business process out-
sourcing services, dedicated to helping the world’s leading companies build stronger businesses. Headquartered in
Teaneck, New Jersey (U.S.), Cognizant combines a passion for client satisfaction, technology innovation, deep industry
and business process expertise, and a global, collaborative workforce that embodies the future of work. With over 50
delivery centers worldwide and approximately 118,000 employees as of June 30, 2011, Cognizant is a member of the
NASDAQ-100, the S&P 500, the Forbes Global 2000, and the Fortune 500 and is ranked among the top performing and
fastest growing companies in the world. Visit us online at www.cognizant.com or follow us on Twitter: Cognizant.



                                         World Headquarters                  European Headquarters                 India Operations Headquarters
                                         500 Frank W. Burr Blvd.             Haymarket House                       #5/535, Old Mahabalipuram Road
                                         Teaneck, NJ 07666 USA               28-29 Haymarket                       Okkiyam Pettai, Thoraipakkam
                                         Phone: +1 201 801 0233              London SW1Y 4SP UK                    Chennai, 600 096 India
                                         Fax: +1 201 801 0243                Phone: +44 (0) 20 7321 4888           Phone: +91 (0) 44 4209 6000
                                         Toll Free: +1 888 937 3277          Fax: +44 (0) 20 7321 4890             Fax: +91 (0) 44 4209 6060
                                         Email: inquiry@cognizant.com        Email: infouk@cognizant.com           Email: inquiryindia@cognizant.com


© Copyright 2011, Cognizant. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the express written permission from Cognizant. The information contained herein is
subject to change without notice. All other trademarks mentioned herein are the property of their respective owners.

Mais conteúdo relacionado

Mais de Cognizant

Intuition Engineered
Intuition EngineeredIntuition Engineered
Intuition EngineeredCognizant
 
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...Cognizant
 
Enhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital InitiativesEnhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital InitiativesCognizant
 
The Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility MandateThe Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility MandateCognizant
 
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...Cognizant
 
Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...Cognizant
 
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...Cognizant
 
Green Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for SustainabilityGreen Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for SustainabilityCognizant
 
Policy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for InsurersPolicy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for InsurersCognizant
 
The Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with DigitalThe Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with DigitalCognizant
 
AI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to ValueAI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to ValueCognizant
 
Operations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First ApproachOperations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First ApproachCognizant
 
Five Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the CloudFive Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the CloudCognizant
 
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining FocusedGetting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining FocusedCognizant
 
Crafting the Utility of the Future
Crafting the Utility of the FutureCrafting the Utility of the Future
Crafting the Utility of the FutureCognizant
 
Utilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data PlatformUtilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data PlatformCognizant
 
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...Cognizant
 
The Timeline of Next
The Timeline of NextThe Timeline of Next
The Timeline of NextCognizant
 
Realising Digital’s Full Potential in the Value Chain
Realising Digital’s Full Potential in the Value ChainRealising Digital’s Full Potential in the Value Chain
Realising Digital’s Full Potential in the Value ChainCognizant
 
The Work Ahead in M&E: Scaling a Three-Dimensional Chessboard
The Work Ahead in M&E: Scaling a Three-Dimensional ChessboardThe Work Ahead in M&E: Scaling a Three-Dimensional Chessboard
The Work Ahead in M&E: Scaling a Three-Dimensional ChessboardCognizant
 

Mais de Cognizant (20)

Intuition Engineered
Intuition EngineeredIntuition Engineered
Intuition Engineered
 
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
 
Enhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital InitiativesEnhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital Initiatives
 
The Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility MandateThe Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility Mandate
 
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
 
Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...
 
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
 
Green Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for SustainabilityGreen Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for Sustainability
 
Policy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for InsurersPolicy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for Insurers
 
The Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with DigitalThe Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with Digital
 
AI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to ValueAI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to Value
 
Operations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First ApproachOperations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First Approach
 
Five Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the CloudFive Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the Cloud
 
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining FocusedGetting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
 
Crafting the Utility of the Future
Crafting the Utility of the FutureCrafting the Utility of the Future
Crafting the Utility of the Future
 
Utilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data PlatformUtilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data Platform
 
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
 
The Timeline of Next
The Timeline of NextThe Timeline of Next
The Timeline of Next
 
Realising Digital’s Full Potential in the Value Chain
Realising Digital’s Full Potential in the Value ChainRealising Digital’s Full Potential in the Value Chain
Realising Digital’s Full Potential in the Value Chain
 
The Work Ahead in M&E: Scaling a Three-Dimensional Chessboard
The Work Ahead in M&E: Scaling a Three-Dimensional ChessboardThe Work Ahead in M&E: Scaling a Three-Dimensional Chessboard
The Work Ahead in M&E: Scaling a Three-Dimensional Chessboard
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Leveraging Multi-Core Processors Through Parallel Programming

  • 1. • Cognizant 20-20 Insights Leveraging Multi-core Processors Through Parallel Programming Executive Summary Why Parallel Computing? Swift and inexorable advances in hardware have In 1965, Intel co-founder Gordon Moore observed historically challenged software developers to that the number of transistors available to semi- maximize system capabilities and meet users’ conductor manufacturers would double approxi- soaring expectations. mately every 18 to 24 months. Today’s new and faster multi-core and chip multi-threading This is especially true in microprocessor processor designs are making that level of scal- technology, where the state of the art has quickly ability more easily attainable and affordable. moved from dual-, tri-, quad-, hexa-, octo-core chips to units with tens or even hundreds of Parallel Thinking cores. The good news is that processors are Flynn’s taxonomy4 is a specific classification of going to continue to become more powerful. parallel computer architectures that is based on The flip side is that, at least in the short term, the number of concurrent instruction (single or growth will come mostly in directions that do not multiple) and data streams (single or multiple) take most current applications along for their available in the architecture (see Figure 1). customary free ride. The first dimension is the number of instruction This white paper offers an outlook for parallel streams that particular computer architecture software development and focuses in particular may be capable of processing at a single point on application development for shared memory in time. The second dimension is the number of multi-core systems using an Ateji® PX1 open data streams that can be processed at a single source preprocessor for Java. 2 point in time. In this way, any given computing system can be described in terms of how instruc- Ateji® PX provides a smooth transition path from tions and data are processed. today’s sequential programming languages to future parallel languages, likely to be excep- What This Means for Developers tionally different and require new thinking and techniques for designing programs. Code The traditional approach to programming written in Ateji® PX is both compatible with (sequential programming) will not efficiently take today’s languages and ready for tomorrow’s advantage of multi-core systems. Sequential hardware. programming proved beneficial when computers cognizant 20-20 insights | august 2011
  • 2. Flynn’s Rules Multiple MISD MIMD Instruction Instruction Single SISD SIMD Instruction Single Data Multiple Data Data Figure 1 Architectural Comparison Single-core Architecture CPU STATE INTERRUPT LOGIC EXECUTION PROGRAM IN I2 I1 CPU CACHE UNITS INSTRUCTIONS Single-core Instructions Execution in Single-core Multi-core Architecture CPU STATE CPU STATE CPU IN I2 I1 INTERRUPT LOGIC INTERRUPT LOGIC PROGRAM INSTRUCTIONS EXECUTION EXECUTION IN I2 I1 CPU CACHE CACHE UNITS UNITS INSTRUCTIONS Multi-core Instructions Execution in Multi-core Figure 2 had single-core architectures, but with multi-core a program in less time. The single-core and systems the approach is inefficient. To fully multi-core architectures, along with the instruc- exploit the capability of multi-core machines, tions executions, are highlighted above. developers need to redesign applications so that each microprocessor can treat code instructions Designing and developing parallel programs as multiple threads of execution. One way to has typically been a very manual process. The resolve this is by utilizing parallel programming. programmer is usually responsible for both iden- tifying and actually implementing parallelism. What Is Parallel Programming? Parallel programming presents many pitfalls Parallel Programming5 is a form of computation — race conditions are the most common and in which program instructions are divided among difficult multi-threaded programming problem. multiple processors (cores, computers) in com- Other potential issues include mutual exclusion bination to solve a single problem, thus running and deadlock. Overhead due to thread synchro- cognizant 20-20 insights 2
  • 3. Multi-core Assessment Sheet Software Details Eclipse SDK Helios (Version: 3.6.2) Java Virtual Machine JVM version 1.6 or higher Ateji PX Ateji PX™ (Version: 1.2.0.201106241352) SQL Server 2005 Microsoft SQL Server Enterprise Edition (Version: 9.00.5000.00) Hardware Details Type Desktop Laptop Operating System Windows XP Professional SP3 Windows 7 Professional CPU Name Intel Core 2 Duo E6550 Intel Core i5 520M Specification Intel® Core™ 2 Duo CPU E6550 @2.33GHz Intel® Core™ i5 CPU M520 @2.40GHz Cores 2 2 Threads 2 4 Core Speed 1990 – 2400 MHz (approx.) 1197 - 1330 MHz (approx.) Cache L1 Data(2X32KBytes) 8 -Way, L1 Data(2X32KBytes) 8 -Way, L1 Inst(2X32KBytes) 8 -Way, L1 Inst(2X32KBytes) 4 -Way, Level2 (4096 KBytes) 16 -Way Level2 (2X256 KBytes) 8 -Way, Level2 (3 MBytes) 12 -Way Memory Type: DDR2 Type: DDR3, Channel #: Dual Channels #: Dual Size: 2048 Mbytes Size : 4096 MBytes, DC Mode: Symmetric DC Mode: Symmetric Inference Type Desktop Laptop Latency (in Sec) Sequential Parallel Sequential Parallel Test Run1 358.31 214.12 675.13 208.69 Test Run2 333.13 222.63 657.12 212.99 Test Run3 336.97 215.99 685.61 205.07 Average 342.8 217.58 672.62 208.91 Sequential Vs. Parallel 342.80 342.80 672.62 672.62 Program 350 350 700 700 300 300 600 600 250 250 217.58 217.58 500 500 200 200 400 400 150 150 300 300 100 100 208.91 208.91 200 200 50 50 100 100 0 0 0 0 Sequential Sequential Parallel Parallel Sequential Sequential Parallel Parallel Percentage of 36.52% 68.87% Improvement Figure 3 nization and load balancing can severely impact software development, particularly in the area run-time performance and can be very hard to of complex parallel applications. fix. Thus, very often manually developing parallel codes is a time-consuming, complex, error-prone For many years, various tools have been and iterative process.6 available to assist programmers in converting serial programs into parallel programs, thereby How to Improve Time to Market overcoming key parallel programming pitfalls There is a well-known ancient Chinese saying: such as race conditions, deadlock, etc. Ateji® “A craftsman first sharpens his tools before PX is among the more promising tools used to laboring on his work.” This is very true of parallelize a serial program. cognizant 20-20 insights 3
  • 4. Why Ateji® PX for Parallel tailored to customer specifications and to Programming? the way customers do business. Importantly, parallel programs can be more easily altered Ateji® PX for Java™ introduces parallelism at as business changes require. We have imple- the language level, extending the sequential mented a solution for a large multinational base language with a small number of parallel manufacturing conglomerate, which powered primitives. It is compatible at the source level them to accommodate multiple business and byte-code level with all Java™ and JVM-based processes efficiently. programs and libraries. This makes parallel pro- gramming simple and intuitive, easy to learn, • Higher Return on Investment: Implement- efficient, provably correct and compatible with ing parallel programs would, over time, reduce existing code; it is suitable for parallelizing development cycles and improve CPU utiliza- legacy applications and leaves more time to tion by making use of all the available cores in concentrate on performance improvements. We servers, thus enhancing the capacity to house assayed the Ateji® PX for Java™ preprocessor more applications on specific machines. against multi-core machines. What follows are our key findings. Conclusion The processing speed that can be obtained using We successfully incorporated the Ateji® PX for parallel programming depends on the number of a CPU-intensive application program used by a processors available, and also on the size of the client to generate approximately 4000 MSDS problem and the way in which it can be broken (Material Safety Data Sheets) from RTF to PDF into constituent parts. A program organized format for various countries (see Figure 3). according to independence and divide-and- conquer principles is more easily run either in The Business Benefits parallel or sequentially, according to resources • Increased Company Value: Improved perfor- available. mance and maximized profits. Well-designed parallel programs result in greater value for Given that multi-core processors/parallel the business as well as for the customers. computing and most computing platforms available support multiple instructions, multiple • Improved Productivity and Insight: Improved data (MIMD), it makes sense to leverage parallel application efficiency and productivity; thus, programming to its fullest on shared-memory improved TTM (time to market). machines, massively parallel super computers, • Reduce Costs and Increased Flexibility: clusters, and even across a utility computing Parallel programming provides the greatest grid. flexibility possible since the application is Footnotes 1 http://www.ateji.com/px/1.0/javadoc/ 2 http://www.oracle.com/us/technologies/java/index.html 3 “Ten Laws Of The Modern World” http://www.forbes.com/2005/04/19/cz_rk_0419karlgaard.html 4 http://www.phy.ornl.gov/csep/ca/node11.html 5 http://en.wikipedia.org/wiki/Parallel_computing 6 “The Problems with Threads”, Edward A. Lee, Professor, Chair of EE, Associate Chair of EECS, EECS Department, University of California at Berkeley, http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/ EECS-2006-1.pdf Resources http://en.wikipedia.org/wiki/Intel_Core http://www.vogella.de/articles/JavaConcurrency/article.html#concurrency cognizant 20-20 insights 4
  • 5. About the Authors Giri Muthusamy is a Cognizant Associate focused on Java/J2EE projects. His interests revolve around the design of enterprise applications and RDBMS concepts. Giri holds a bachelor’s degree in Mechanical Engineering and is also a Microsoft SQL Server certified professional. He can be reached at Giri.Muthusamy@cognizant.com. Rahul Ramalingam is a Cognizant Technology Specialist focused on Java/J2EE high-level system design and application development and building enterprise software applications. He has an engineering degree in computer science and holds various software certifications including IBM Rational solution designer — OOAD and TOGAF 8 Certified Enterprise Architecture Practitioner. Rahul can be reached at Rahul.Ramalingam@cognizant.com. About Cognizant Cognizant (NASDAQ: CTSH) is a leading provider of information technology, consulting, and business process out- sourcing services, dedicated to helping the world’s leading companies build stronger businesses. Headquartered in Teaneck, New Jersey (U.S.), Cognizant combines a passion for client satisfaction, technology innovation, deep industry and business process expertise, and a global, collaborative workforce that embodies the future of work. With over 50 delivery centers worldwide and approximately 118,000 employees as of June 30, 2011, Cognizant is a member of the NASDAQ-100, the S&P 500, the Forbes Global 2000, and the Fortune 500 and is ranked among the top performing and fastest growing companies in the world. Visit us online at www.cognizant.com or follow us on Twitter: Cognizant. World Headquarters European Headquarters India Operations Headquarters 500 Frank W. Burr Blvd. Haymarket House #5/535, Old Mahabalipuram Road Teaneck, NJ 07666 USA 28-29 Haymarket Okkiyam Pettai, Thoraipakkam Phone: +1 201 801 0233 London SW1Y 4SP UK Chennai, 600 096 India Fax: +1 201 801 0243 Phone: +44 (0) 20 7321 4888 Phone: +91 (0) 44 4209 6000 Toll Free: +1 888 937 3277 Fax: +44 (0) 20 7321 4890 Fax: +91 (0) 44 4209 6060 Email: inquiry@cognizant.com Email: infouk@cognizant.com Email: inquiryindia@cognizant.com © Copyright 2011, Cognizant. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the express written permission from Cognizant. The information contained herein is subject to change without notice. All other trademarks mentioned herein are the property of their respective owners.