SlideShare a Scribd company logo
1 of 19
CHALLENGES IN
MULTI-CORE
PROGRAMMING
-by Ms. Nishigandha Wankhade
Outline






Sequential Model
Concurrency
Challenges of concurrency
New Libraries for C++ Developers
Processor Architecture Challenges

Challenges in Multi-core Programming

2/27/2014

2
SEQUENTIAL MODELS
 A model in which instructions are executed one at a time.
 Computer perform each step in specific order.
 Program is divided into multiple tasks.
 Computer programs set up in story form Beginning , Middle and End
 All the tasks in program are in one file.
 All tasks are interdependent.
 Ex: Let A, B, C and D are four tasks. Then B starts only after
completing task A. Then after finishing the task B the C
starts and so on….

Challenges in Multi-core Programming

2/27/2014

3
CONCURRENCY
 Two tasks are said to be concurrent if they occur within the
same time interval.
 They do not mean that the tasks are executing at the same
instance.
 They might be executing at the same hour but at different
period of interval.
 EX: A and B are two concurrent tasks means- A might execute
for some fraction of seconds then B might execute for some
fraction of seconds. Again the task A execute, so on.......
 Concurrent tasks can execute in
MULTIPROCESSING ENVIRONMENT.

Challenges in Multi-core Programming

a SINGLE

2/27/2014

or

4
CONCURRENCY
 Single Processing Environment:
 Context Switching :
 It is a process of storing and restoring the execution state so
that multiple processes can share the same processor in a given
period of time.

 Multiprocessing Environment:
 Depends on No. of FREE Processors.
 Developer deals with following challenges:
 1. Software Development
 2. Software Deployment
 3. Software maintenance

Challenges in Multi-core Programming

2/27/2014

5
SOFTWARE DEVELOPMENT
 It happens from developing device drivers to large scale Ntire applications.
 Its size and scope vary to large extent. So, challenges are in
creating multiprocessing and multithreading applications.
 Carried out in various phases [ SDLC].

Challenges in Multi-core Programming

2/27/2014

6
SOFTWARE DEVELOPMENT
 SDLC ACTIVITIES

DESCRIPTION

Requirement
specification

Agreement between developer and the client. What s/w
must do and Constrains are specified.

Design

Specifications are model using s/w design. It determines
the INTERNAL STRUCTURE.
2 approaches- architectural design and detailed design.

Implementation

Detailed design is translated to the programming code.

Testing and
Evaluation

Exercising s/w in order to uncover the errors and improve
the quality of s/w.

Maintenance

After delivery of s/w.
Modifications are done to correct errors, to improve
performance.

Challenges in Multi-core Programming

2/27/2014

7
SOFTWARE DEVELOPMENT METHODOLOGY
S/W
DEVELOPMENT
METHODOLOGIES

DESCRIPTION

CORE ACTIVITIES

Agile

Part of functionality is delivered
at some time interval

Planning, requirement analysis,
design, implementation,
testing and documentation

Build and Fix

s/w is build and modifications
are done many times as needed

Build initial version, modify as
per customer’s requirements,

At each iteration developer
inform the client about time
required. Client selects the
desire feature

Requirement gathering,
specification, architectural
design, implementation and
integration, delivery

s/w developed in increments.
Integrated module by module

Requirement gathering,
specification, architectural
design, build loop



Extreme
Programming

Incremental

Challenges in Multi-core Programming

2/27/2014

8
SOFTWARE DEVELOPMENT METHODOLOGY
S/W
DEVELOPMENT
METHODOLOGIES



Object Oriented

DESCRIPTION

Objects are identified and with
them s/w is designed

At each iteration prototype of the
Rapid prototyping system is developed.
Interaction with client.

Spiral

Structured

Waterfall

CORE ACTIVITIES

Requirement gathering, OO
analysis, OO design,
implementation and integration
Rapid prototyping, specifications,
design, implementation,
integration, maintenance,
retirement.

Iterative model like incremental.
Emphasis on risk analysis and
verification at each phase

Planning, risk analysis,
evaluation

Top down approach.

Requirement analysis, design,
Implementation, testing,
development.

c/as linear sequential model

Rrq. Gathering and specification,
design, imple, integration,
9
maintenance, retirement
2/27/2014

Challenges in Multi-core Programming
CHALLENGES OF S/W DEVELOPMENT
 1) S/W Decomposition:
-> WBS & Architectural Artifacts (AAs)
-> Decomposition is written in form of PROBLEM & SOLUTION
CHALLENGES OF S/W DECOMPOSITION:

1) multiple ways to rep[resent a problem and its solution
2) making sure that decomposition is complete and correct.

-> Finding right model for decomposition.

Challenges in Multi-core Programming

2/27/2014

10
CHALLENGES OF S/W DEVELOPMENT
 2) Task To Task Communication:
-> IPC ?
-> Managing IPC:
POSIX support six basic mechanisms to
accomplish communication between processes.
1) Files with lock and unlock facility
2) Pipes
3) Shared Memory
4) Message Queues
5) Semaphore (use variables)
6) Sockets
Challenges in Multi-core Programming

2/27/2014

11
CHALLENGES OF S/W DEVELOPMENT
 3) Concurrent Access To Data Or Resources By
Multiple Tasks Or Agents:
Three commonly occurring problems while executing the instructions
concurrently:->

1) Data race: When two or more tasks are attempting to update the

data resource at the same time, the race condition occurs which is called
as data race.

2) Deadlock: It is a situation in which two or more tasks are waiting

for the other to finish so that they can acquire the resources.

3) Indefinite postponement: In this one or more tasks are waiting

for some event or condition to occur and if that condition or event never
occurs.
Challenges in Multi-core Programming

2/27/2014

12
CHALLENGES OF S/W DEVELOPMENT
 4) Identifying Relationship Between Concurrently
Executing Tasks:

Four basic relationships
1) Start to Start
2) Finish to Start
3) Start to Finish
4) Finish to Finish

5) Controlling resource contention between tasks
6) Determining sufficient no. of processes or threads

Challenges in Multi-core Programming

2/27/2014

13
CHALLENGES OF S/W DEVELOPMENT
 7 & 8) Finding reliable and reproducible debugging and
testing
-> Testing & debugging in sequential model.
-> Difficult to produce exact content of parallel or concurrent tasks
because of OS-scheduling policies,
dynamic workload,
process or thread priorities etc.
-> Multiprocessing and multithreaded applications are nondeterministic in nature.
That is recreation of the same sequence of events of these
type of applications in order to test or debug the program is
NOT POSSIBLE AT ALL.
-> Finding the right debugger or profiler
* state of the kernel process and system calls.

* attach or detach a process or thread.
14
CHALLENGES OF S/W DEVELOPMENT
9) Communicating the designs having multiprocessing
components.
-> UML (Unified Modeling Language)
-> System Architecture (Structural Diagrams):
1) Component diagram: Represent the dependencies
and organization among a set of physical modules.

2) Deployment diagram: shows runtime

configuration of processing nodes, hardware and
software components in a system.

-> Behavioral Diagrams:
1) State diagram
2) Sequence diagram
3) Activity diagram
4) Collaboration diagram
15
CHALLENGES OF S/W DEVELOPMENT
10) Implementing multiprocessing and multithreading in
C++.
-> C++ does not include any keyword primitives for
parallelism.
-> How can we implement the multiprocessing or
multithreading applications using C++? (By using libraries)

Challenges in Multi-core Programming

2/27/2014

16
NEW LIBRARIES FOR C++ DEVELOPERS
1) System Libraries:
-> Provides by O.S. itself
-> Ex: POSIX thread Library.
It contains the set of system calls that support parallelism.

-> POSIX ( Portable O. S. Interface for Unix)
* POSIX threads
* POSIX spawn function
* The exec() family of functions

2/27/2014

17
PROCESSOR ARCHITECTURE CHALLENGES
Four popularly used multi-core architectures1) Opteron
2) Cell
3) UltraSparc T1
4) Intel Core-2
-> These different architectures translate to different sets of compiler
switches and directives.
-> For this, it is necessary that the developer must be familiar with the use of
compiler and linker specific features.
-> In some cases multiple types of compilers needed to generate single
executable program.
-> But for taking the advantage of particular architecture we can make the
s/w non-portable.
-> So, taking most advantage of Multicore architecture without affecting
the portability of the s/w application is the real challenge of processor
architecture.
2/27/2014

18
REFERENCE
 1)

“Professional Multicore Programming: Design and
Implementation for C++ Developers “, Wiley India

Edition, ISBN: 978-81-265-1875-3.

19

More Related Content

What's hot

Linux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and TroubleshootingLinux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and TroubleshootingJérôme Kehrli
 
UML Case Tools
UML Case ToolsUML Case Tools
UML Case ToolsAshesh R
 
Java programming language
Java programming languageJava programming language
Java programming languageSubhashKumar329
 
3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologiesop205
 
Project MPS
Project MPSProject MPS
Project MPSG Zs
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming francopw
 
F5 learning-area-5-programming
F5 learning-area-5-programmingF5 learning-area-5-programming
F5 learning-area-5-programmingNasran Syahiran
 
Software Architecture - All you need to know
Software Architecture - All you need to knowSoftware Architecture - All you need to know
Software Architecture - All you need to knowVincent Composieux
 
A Comparison of .NET Framework vs. Java Virtual Machine
A Comparison of .NET Framework vs. Java Virtual MachineA Comparison of .NET Framework vs. Java Virtual Machine
A Comparison of .NET Framework vs. Java Virtual MachineAbdelrahman Hosny
 
Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Dudy Ali
 
Software Design
Software DesignSoftware Design
Software DesignHa Ninh
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementPhilip Johnson
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 

What's hot (20)

Linux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and TroubleshootingLinux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and Troubleshooting
 
10.1.1.65.2852
10.1.1.65.285210.1.1.65.2852
10.1.1.65.2852
 
UML Case Tools
UML Case ToolsUML Case Tools
UML Case Tools
 
Java programming language
Java programming languageJava programming language
Java programming language
 
java
javajava
java
 
3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies
 
Arch java
Arch javaArch java
Arch java
 
Project MPS
Project MPSProject MPS
Project MPS
 
4.129 tybsc it
4.129 tybsc it4.129 tybsc it
4.129 tybsc it
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming
 
F5 learning-area-5-programming
F5 learning-area-5-programmingF5 learning-area-5-programming
F5 learning-area-5-programming
 
Software Architecture - All you need to know
Software Architecture - All you need to knowSoftware Architecture - All you need to know
Software Architecture - All you need to know
 
A Comparison of .NET Framework vs. Java Virtual Machine
A Comparison of .NET Framework vs. Java Virtual MachineA Comparison of .NET Framework vs. Java Virtual Machine
A Comparison of .NET Framework vs. Java Virtual Machine
 
COMPILER Meenu khan
COMPILER Meenu khanCOMPILER Meenu khan
COMPILER Meenu khan
 
COMPILER
COMPILERCOMPILER
COMPILER
 
Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Distributed Application Development (Introduction)
Distributed Application Development (Introduction)
 
Software Design
Software DesignSoftware Design
Software Design
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
 
Programming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd editionProgramming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd edition
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
 

Similar to Challenges in multi core programming by Nishigandha Wankhade

Devops : Automate Your Infrastructure with Puppet
Devops : Automate Your Infrastructure with PuppetDevops : Automate Your Infrastructure with Puppet
Devops : Automate Your Infrastructure with PuppetEdureka!
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Simon Storm
 
Enhance your Agility with DevOps
Enhance your Agility with DevOpsEnhance your Agility with DevOps
Enhance your Agility with DevOpsEdureka!
 
Lecture 1 uml with java implementation
Lecture 1 uml with java implementationLecture 1 uml with java implementation
Lecture 1 uml with java implementationthe_wumberlog
 
Se chapter 1,2,3 2 mark qa
Se chapter 1,2,3   2 mark  qaSe chapter 1,2,3   2 mark  qa
Se chapter 1,2,3 2 mark qaAruna M
 
Application cloudification with liberty and urban code deploy - UCD
Application cloudification with liberty and urban code deploy - UCDApplication cloudification with liberty and urban code deploy - UCD
Application cloudification with liberty and urban code deploy - UCDDavide Veronese
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for ChangeEric Wyles
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life DevOps.com
 
Continuous Integration With Jenkins
Continuous Integration With JenkinsContinuous Integration With Jenkins
Continuous Integration With JenkinsEdureka!
 
School management system
School management systemSchool management system
School management systemSoumya Behera
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Dockerkushalsingh007
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler ShellIRJET Journal
 
Essence of waterfall_model
Essence of waterfall_modelEssence of waterfall_model
Essence of waterfall_modelwanda31
 

Similar to Challenges in multi core programming by Nishigandha Wankhade (20)

Devops : Automate Your Infrastructure with Puppet
Devops : Automate Your Infrastructure with PuppetDevops : Automate Your Infrastructure with Puppet
Devops : Automate Your Infrastructure with Puppet
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
 
Day1
Day1Day1
Day1
 
Enhance your Agility with DevOps
Enhance your Agility with DevOpsEnhance your Agility with DevOps
Enhance your Agility with DevOps
 
Lecture 1 uml with java implementation
Lecture 1 uml with java implementationLecture 1 uml with java implementation
Lecture 1 uml with java implementation
 
Se chapter 1,2,3 2 mark qa
Se chapter 1,2,3   2 mark  qaSe chapter 1,2,3   2 mark  qa
Se chapter 1,2,3 2 mark qa
 
Application cloudification with liberty and urban code deploy - UCD
Application cloudification with liberty and urban code deploy - UCDApplication cloudification with liberty and urban code deploy - UCD
Application cloudification with liberty and urban code deploy - UCD
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Documentation
DocumentationDocumentation
Documentation
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 
Continuous Integration With Jenkins
Continuous Integration With JenkinsContinuous Integration With Jenkins
Continuous Integration With Jenkins
 
School management system
School management systemSchool management system
School management system
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Embedded multiple choice questions
Embedded multiple choice questionsEmbedded multiple choice questions
Embedded multiple choice questions
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Docker
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler Shell
 
Resume
ResumeResume
Resume
 
Software design
Software designSoftware design
Software design
 
Essence of waterfall_model
Essence of waterfall_modelEssence of waterfall_model
Essence of waterfall_model
 
Serverless Summit - Quiz
Serverless Summit - QuizServerless Summit - Quiz
Serverless Summit - Quiz
 

Recently uploaded

Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeSaadHumayun7
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Denish Jangid
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Mohamed Rizk Khodair
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff17thcssbs2
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxCeline George
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
factors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxfactors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxSanjay Shekar
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonMayur Khatri
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesashishpaul799
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 

Recently uploaded (20)

Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
factors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxfactors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptx
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 

Challenges in multi core programming by Nishigandha Wankhade

  • 2. Outline      Sequential Model Concurrency Challenges of concurrency New Libraries for C++ Developers Processor Architecture Challenges Challenges in Multi-core Programming 2/27/2014 2
  • 3. SEQUENTIAL MODELS  A model in which instructions are executed one at a time.  Computer perform each step in specific order.  Program is divided into multiple tasks.  Computer programs set up in story form Beginning , Middle and End  All the tasks in program are in one file.  All tasks are interdependent.  Ex: Let A, B, C and D are four tasks. Then B starts only after completing task A. Then after finishing the task B the C starts and so on…. Challenges in Multi-core Programming 2/27/2014 3
  • 4. CONCURRENCY  Two tasks are said to be concurrent if they occur within the same time interval.  They do not mean that the tasks are executing at the same instance.  They might be executing at the same hour but at different period of interval.  EX: A and B are two concurrent tasks means- A might execute for some fraction of seconds then B might execute for some fraction of seconds. Again the task A execute, so on.......  Concurrent tasks can execute in MULTIPROCESSING ENVIRONMENT. Challenges in Multi-core Programming a SINGLE 2/27/2014 or 4
  • 5. CONCURRENCY  Single Processing Environment:  Context Switching :  It is a process of storing and restoring the execution state so that multiple processes can share the same processor in a given period of time.  Multiprocessing Environment:  Depends on No. of FREE Processors.  Developer deals with following challenges:  1. Software Development  2. Software Deployment  3. Software maintenance Challenges in Multi-core Programming 2/27/2014 5
  • 6. SOFTWARE DEVELOPMENT  It happens from developing device drivers to large scale Ntire applications.  Its size and scope vary to large extent. So, challenges are in creating multiprocessing and multithreading applications.  Carried out in various phases [ SDLC]. Challenges in Multi-core Programming 2/27/2014 6
  • 7. SOFTWARE DEVELOPMENT  SDLC ACTIVITIES DESCRIPTION Requirement specification Agreement between developer and the client. What s/w must do and Constrains are specified. Design Specifications are model using s/w design. It determines the INTERNAL STRUCTURE. 2 approaches- architectural design and detailed design. Implementation Detailed design is translated to the programming code. Testing and Evaluation Exercising s/w in order to uncover the errors and improve the quality of s/w. Maintenance After delivery of s/w. Modifications are done to correct errors, to improve performance. Challenges in Multi-core Programming 2/27/2014 7
  • 8. SOFTWARE DEVELOPMENT METHODOLOGY S/W DEVELOPMENT METHODOLOGIES DESCRIPTION CORE ACTIVITIES Agile Part of functionality is delivered at some time interval Planning, requirement analysis, design, implementation, testing and documentation Build and Fix s/w is build and modifications are done many times as needed Build initial version, modify as per customer’s requirements, At each iteration developer inform the client about time required. Client selects the desire feature Requirement gathering, specification, architectural design, implementation and integration, delivery s/w developed in increments. Integrated module by module Requirement gathering, specification, architectural design, build loop  Extreme Programming Incremental Challenges in Multi-core Programming 2/27/2014 8
  • 9. SOFTWARE DEVELOPMENT METHODOLOGY S/W DEVELOPMENT METHODOLOGIES  Object Oriented DESCRIPTION Objects are identified and with them s/w is designed At each iteration prototype of the Rapid prototyping system is developed. Interaction with client. Spiral Structured Waterfall CORE ACTIVITIES Requirement gathering, OO analysis, OO design, implementation and integration Rapid prototyping, specifications, design, implementation, integration, maintenance, retirement. Iterative model like incremental. Emphasis on risk analysis and verification at each phase Planning, risk analysis, evaluation Top down approach. Requirement analysis, design, Implementation, testing, development. c/as linear sequential model Rrq. Gathering and specification, design, imple, integration, 9 maintenance, retirement 2/27/2014 Challenges in Multi-core Programming
  • 10. CHALLENGES OF S/W DEVELOPMENT  1) S/W Decomposition: -> WBS & Architectural Artifacts (AAs) -> Decomposition is written in form of PROBLEM & SOLUTION CHALLENGES OF S/W DECOMPOSITION: 1) multiple ways to rep[resent a problem and its solution 2) making sure that decomposition is complete and correct. -> Finding right model for decomposition. Challenges in Multi-core Programming 2/27/2014 10
  • 11. CHALLENGES OF S/W DEVELOPMENT  2) Task To Task Communication: -> IPC ? -> Managing IPC: POSIX support six basic mechanisms to accomplish communication between processes. 1) Files with lock and unlock facility 2) Pipes 3) Shared Memory 4) Message Queues 5) Semaphore (use variables) 6) Sockets Challenges in Multi-core Programming 2/27/2014 11
  • 12. CHALLENGES OF S/W DEVELOPMENT  3) Concurrent Access To Data Or Resources By Multiple Tasks Or Agents: Three commonly occurring problems while executing the instructions concurrently:-> 1) Data race: When two or more tasks are attempting to update the data resource at the same time, the race condition occurs which is called as data race. 2) Deadlock: It is a situation in which two or more tasks are waiting for the other to finish so that they can acquire the resources. 3) Indefinite postponement: In this one or more tasks are waiting for some event or condition to occur and if that condition or event never occurs. Challenges in Multi-core Programming 2/27/2014 12
  • 13. CHALLENGES OF S/W DEVELOPMENT  4) Identifying Relationship Between Concurrently Executing Tasks: Four basic relationships 1) Start to Start 2) Finish to Start 3) Start to Finish 4) Finish to Finish 5) Controlling resource contention between tasks 6) Determining sufficient no. of processes or threads Challenges in Multi-core Programming 2/27/2014 13
  • 14. CHALLENGES OF S/W DEVELOPMENT  7 & 8) Finding reliable and reproducible debugging and testing -> Testing & debugging in sequential model. -> Difficult to produce exact content of parallel or concurrent tasks because of OS-scheduling policies, dynamic workload, process or thread priorities etc. -> Multiprocessing and multithreaded applications are nondeterministic in nature. That is recreation of the same sequence of events of these type of applications in order to test or debug the program is NOT POSSIBLE AT ALL. -> Finding the right debugger or profiler * state of the kernel process and system calls. * attach or detach a process or thread. 14
  • 15. CHALLENGES OF S/W DEVELOPMENT 9) Communicating the designs having multiprocessing components. -> UML (Unified Modeling Language) -> System Architecture (Structural Diagrams): 1) Component diagram: Represent the dependencies and organization among a set of physical modules. 2) Deployment diagram: shows runtime configuration of processing nodes, hardware and software components in a system. -> Behavioral Diagrams: 1) State diagram 2) Sequence diagram 3) Activity diagram 4) Collaboration diagram 15
  • 16. CHALLENGES OF S/W DEVELOPMENT 10) Implementing multiprocessing and multithreading in C++. -> C++ does not include any keyword primitives for parallelism. -> How can we implement the multiprocessing or multithreading applications using C++? (By using libraries) Challenges in Multi-core Programming 2/27/2014 16
  • 17. NEW LIBRARIES FOR C++ DEVELOPERS 1) System Libraries: -> Provides by O.S. itself -> Ex: POSIX thread Library. It contains the set of system calls that support parallelism. -> POSIX ( Portable O. S. Interface for Unix) * POSIX threads * POSIX spawn function * The exec() family of functions 2/27/2014 17
  • 18. PROCESSOR ARCHITECTURE CHALLENGES Four popularly used multi-core architectures1) Opteron 2) Cell 3) UltraSparc T1 4) Intel Core-2 -> These different architectures translate to different sets of compiler switches and directives. -> For this, it is necessary that the developer must be familiar with the use of compiler and linker specific features. -> In some cases multiple types of compilers needed to generate single executable program. -> But for taking the advantage of particular architecture we can make the s/w non-portable. -> So, taking most advantage of Multicore architecture without affecting the portability of the s/w application is the real challenge of processor architecture. 2/27/2014 18
  • 19. REFERENCE  1) “Professional Multicore Programming: Design and Implementation for C++ Developers “, Wiley India Edition, ISBN: 978-81-265-1875-3. 19