SlideShare a Scribd company logo
1 of 27
C#, What’s next? Pieter Joost van de Sande [email_address]
Agenda ,[object Object],[object Object],[object Object],[object Object]
Multi core future
Example Code to Parallelize ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
int  N = size;  int  P = 2 *  Environment .ProcessorCount;  int  Chunk = N / P;  // size of a work chunk ManualResetEvent  signal =  new   ManualResetEvent ( false );  int  counter = P;  // use a counter to reduce kernel transitions  for  ( int  c = 0; c < P; c++) {  // for each chunk ThreadPool .QueueUserWorkItem(o => {  int  lc = ( int )o; for  ( int  i = lc * Chunk;  // process one chunk i < (lc + 1 == P ? N : (lc + 1) * Chunk);  // respect upper bound i++) { // original loop body for  ( int  j = 0; j < size; j++) { result[i, j] = 0; for  ( int  k = 0; k < size; k++) { result[i, j] += m1[i, k] * m2[k, j]; } } } if  ( Interlocked .Decrement( ref  counter) == 0) {  // efficient interlocked ops signal.Set();  // and kernel transition only when done } }, c);  } signal.WaitOne(); Error Prone High Overhead Tricks Knowledge of Synchronization Primitives Heavy Synchronization Lack of Thread Reuse
Matrix multiplication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix multiplication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Task class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TaskManager ,[object Object],[object Object],[object Object],[object Object],[object Object]
Smart work stealing Worker Thread 1 Worker Thread 2 Program Thread Task 1 Task 2 Task 3 Task 5 Task 4
The status of the extensions ,[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object]
Discussion ,[object Object],[object Object],[object Object],[object Object]
Specification ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Specification nowadays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Type name Type Method name Visibility Return type Arguments
Pre conditions, nowadays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Specification of the post condition Actual post condition
Pre conditions, Spec# ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pre conditions, Spec# ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pre conditions, Spec# ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cannot prove that z != 0 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Prove that z != 0 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Post conditions, Spec# ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Post conditions usage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The status of Spec# ,[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object]
Discussion ,[object Object],[object Object],[object Object],[object Object]
Vragen? Feedback? Seminar? Congres? Pieter Joost van de Sande [email_address] Blog: http://born2code.net Site: www.sogyo.nl

More Related Content

What's hot

Tutconstructordes
TutconstructordesTutconstructordes
Tutconstructordes
Niti Arora
 
constructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objectsconstructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objects
Kanhaiya Saxena
 
A verifiable random function with short proofs and keys
A verifiable random function with short proofs and keysA verifiable random function with short proofs and keys
A verifiable random function with short proofs and keys
Aleksandr Yampolskiy
 
Constructor and Destructor
Constructor and DestructorConstructor and Destructor
Constructor and Destructor
Kamal Acharya
 
Refactoring - improving the smell of your code
Refactoring - improving the smell of your codeRefactoring - improving the smell of your code
Refactoring - improving the smell of your code
vmandrychenko
 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel Schulhof
WithTheBest
 

What's hot (20)

Tutconstructordes
TutconstructordesTutconstructordes
Tutconstructordes
 
Constructors & destructors
Constructors & destructorsConstructors & destructors
Constructors & destructors
 
Python-oop
Python-oopPython-oop
Python-oop
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++
 
constructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objectsconstructor with default arguments and dynamic initialization of objects
constructor with default arguments and dynamic initialization of objects
 
Quiz 10 cp_sol
Quiz 10 cp_solQuiz 10 cp_sol
Quiz 10 cp_sol
 
Arrays
ArraysArrays
Arrays
 
Constructor and destructor
Constructor and destructorConstructor and destructor
Constructor and destructor
 
Programs of C++
Programs of C++Programs of C++
Programs of C++
 
A verifiable random function with short proofs and keys
A verifiable random function with short proofs and keysA verifiable random function with short proofs and keys
A verifiable random function with short proofs and keys
 
Bca 2nd sem u-2 classes & objects
Bca 2nd sem u-2 classes & objectsBca 2nd sem u-2 classes & objects
Bca 2nd sem u-2 classes & objects
 
Nor Implement
Nor ImplementNor Implement
Nor Implement
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design Patterns
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Mutate and Test your Tests with STAMP, Caroline Landry, Inria, Paris Open Sou...
Mutate and Test your Tests with STAMP, Caroline Landry, Inria, Paris Open Sou...Mutate and Test your Tests with STAMP, Caroline Landry, Inria, Paris Open Sou...
Mutate and Test your Tests with STAMP, Caroline Landry, Inria, Paris Open Sou...
 
Constructor and Destructor
Constructor and DestructorConstructor and Destructor
Constructor and Destructor
 
Refactoring - improving the smell of your code
Refactoring - improving the smell of your codeRefactoring - improving the smell of your code
Refactoring - improving the smell of your code
 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel Schulhof
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third Year
 

Viewers also liked (13)

مقاس مهبل : هل هو طبيعى ؟
مقاس مهبل : هل هو طبيعى ؟مقاس مهبل : هل هو طبيعى ؟
مقاس مهبل : هل هو طبيعى ؟
 
Exposicion equipo 1
Exposicion equipo 1Exposicion equipo 1
Exposicion equipo 1
 
CMCP2 Camille Tomberlin
CMCP2 Camille TomberlinCMCP2 Camille Tomberlin
CMCP2 Camille Tomberlin
 
Transport operations
Transport operationsTransport operations
Transport operations
 
Steps for-seo
Steps for-seoSteps for-seo
Steps for-seo
 
Raymond Blanc Compass
Raymond Blanc CompassRaymond Blanc Compass
Raymond Blanc Compass
 
Screenstretch
ScreenstretchScreenstretch
Screenstretch
 
صندوق السرعات الاتوماتيكي
صندوق السرعات الاتوماتيكيصندوق السرعات الاتوماتيكي
صندوق السرعات الاتوماتيكي
 
Auto call setup for xcal series 3.x.xx udp
Auto call setup for xcal series 3.x.xx udpAuto call setup for xcal series 3.x.xx udp
Auto call setup for xcal series 3.x.xx udp
 
SriVidya resume
SriVidya resumeSriVidya resume
SriVidya resume
 
Multiple inheritance possible in Java
Multiple inheritance possible in JavaMultiple inheritance possible in Java
Multiple inheritance possible in Java
 
4 communication levels
4 communication levels4 communication levels
4 communication levels
 
Exposición de imágenes
Exposición de imágenesExposición de imágenes
Exposición de imágenes
 

Similar to C#, What Is Next?

Whats new in_csharp4
Whats new in_csharp4Whats new in_csharp4
Whats new in_csharp4
Abed Bukhari
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
ShriKant Vashishtha
 

Similar to C#, What Is Next? (20)

Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Data
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
 
Pythonic Math
Pythonic MathPythonic Math
Pythonic Math
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
Whats new in_csharp4
Whats new in_csharp4Whats new in_csharp4
Whats new in_csharp4
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
Introduction to Spec#
Introduction to Spec#Introduction to Spec#
Introduction to Spec#
 
Software transactional memory. pure functional approach
Software transactional memory. pure functional approachSoftware transactional memory. pure functional approach
Software transactional memory. pure functional approach
 
Generics in .NET, C++ and Java
Generics in .NET, C++ and JavaGenerics in .NET, C++ and Java
Generics in .NET, C++ and Java
 
Clean code _v2003
 Clean code _v2003 Clean code _v2003
Clean code _v2003
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
20.1 Java working with abstraction
20.1 Java working with abstraction20.1 Java working with abstraction
20.1 Java working with abstraction
 
TechTalk - Dotnet
TechTalk - DotnetTechTalk - Dotnet
TechTalk - Dotnet
 
02. Data Types and variables
02. Data Types and variables02. Data Types and variables
02. Data Types and variables
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
 
Addressing Scenario
Addressing ScenarioAddressing Scenario
Addressing Scenario
 
Java Generics
Java GenericsJava Generics
Java Generics
 
From clever code to better code
From clever code to better codeFrom clever code to better code
From clever code to better code
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
2. Design patterns. part #2
2. Design patterns. part #22. Design patterns. part #2
2. Design patterns. part #2
 

More from Pieter Joost van de Sande (12)

Actor Model
Actor ModelActor Model
Actor Model
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservices
MicroservicesMicroservices
Microservices
 
Werckers path to Go
Werckers path to GoWerckers path to Go
Werckers path to Go
 
Lessons for developers - long edition
Lessons for developers  - long editionLessons for developers  - long edition
Lessons for developers - long edition
 
Introduction to CQRS
Introduction to CQRSIntroduction to CQRS
Introduction to CQRS
 
Introduction to (n)CQRS
Introduction to (n)CQRSIntroduction to (n)CQRS
Introduction to (n)CQRS
 
Lessons for developers
Lessons for developersLessons for developers
Lessons for developers
 
Rethink your architecture with CQRS
Rethink your architecture with CQRSRethink your architecture with CQRS
Rethink your architecture with CQRS
 
Domain Driven Design fundamentals
Domain Driven Design fundamentalsDomain Driven Design fundamentals
Domain Driven Design fundamentals
 
XNA presentation
XNA presentationXNA presentation
XNA presentation
 
Domain Driven Design In C#3.0
Domain Driven Design In C#3.0Domain Driven Design In C#3.0
Domain Driven Design In C#3.0
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

C#, What Is Next?

  • 1. C#, What’s next? Pieter Joost van de Sande [email_address]
  • 2.
  • 4.
  • 5. int N = size; int P = 2 * Environment .ProcessorCount; int Chunk = N / P; // size of a work chunk ManualResetEvent signal = new ManualResetEvent ( false ); int counter = P; // use a counter to reduce kernel transitions for ( int c = 0; c < P; c++) { // for each chunk ThreadPool .QueueUserWorkItem(o => { int lc = ( int )o; for ( int i = lc * Chunk; // process one chunk i < (lc + 1 == P ? N : (lc + 1) * Chunk); // respect upper bound i++) { // original loop body for ( int j = 0; j < size; j++) { result[i, j] = 0; for ( int k = 0; k < size; k++) { result[i, j] += m1[i, k] * m2[k, j]; } } } if ( Interlocked .Decrement( ref counter) == 0) { // efficient interlocked ops signal.Set(); // and kernel transition only when done } }, c); } signal.WaitOne(); Error Prone High Overhead Tricks Knowledge of Synchronization Primitives Heavy Synchronization Lack of Thread Reuse
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Smart work stealing Worker Thread 1 Worker Thread 2 Program Thread Task 1 Task 2 Task 3 Task 5 Task 4
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Vragen? Feedback? Seminar? Congres? Pieter Joost van de Sande [email_address] Blog: http://born2code.net Site: www.sogyo.nl