The document discusses parallelizing tasks using fork/join in Java. It describes how fork/join works by dividing tasks into smaller subtasks (fork), running the subtasks in parallel, and then joining the results. An example implementation of a JsonTask class is shown that extends RecursiveTask and overrides the compute method to either directly process small lists or divide larger lists into sublists and fork new tasks to process them in parallel.
NoSQL, SQL, NewSQL - methods of structuring data.Tony Rogerson
Today’s environment is a polyglot database, that is to say, it’s made up of a number of different database sources and possibly types. In this session we’ll look at some of the options of storing data – relational, key/value, document etc. I’ll overview what is SQL, NoSQL and NewSQL to give you some context for today’s world of data storage.
NoSQL, SQL, NewSQL - methods of structuring data.Tony Rogerson
Today’s environment is a polyglot database, that is to say, it’s made up of a number of different database sources and possibly types. In this session we’ll look at some of the options of storing data – relational, key/value, document etc. I’ll overview what is SQL, NoSQL and NewSQL to give you some context for today’s world of data storage.
MongoDB is the coolest NoSQL DB around, partially because it's simple-by-design philosophy. Without transactions or joins, all the bad vibe of SQL is gone.
In this presentation I demonstrate how to get started with MongoDB in the cloud using Mon
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
MongoDB is the coolest NoSQL DB around, partially because it's simple-by-design philosophy. Without transactions or joins, all the bad vibe of SQL is gone.
In this presentation I demonstrate how to get started with MongoDB in the cloud using Mon
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
11. O QUE PARALELIZAR?
• Tarefas Independentes com processamento pesado
Thursday, December 6, 12
12. O QUE PARALELIZAR?
• Tarefas Independentes com processamento pesado
• Processar mensagens de uma fila
Thursday, December 6, 12
13. O QUE PARALELIZAR?
• Tarefas Independentes com processamento pesado
• Processar mensagens de uma fila
• Conversão de dados
Thursday, December 6, 12
14. O QUE PARALELIZAR?
• Tarefas Independentes com processamento pesado
• Processar mensagens de uma fila
• Conversão de dados
• Aplicar filtros em imagens
Thursday, December 6, 12
20. OS DADOS
• 1;1;04122012;fichario preto;9;33.55
Thursday, December 6, 12
21. OS DADOS
• 1;1;04122012;fichario preto;9;33.55
Thursday, December 6, 12
22. OS DADOS
• 1;1;04122012;fichario preto;9;33.55
{
"number": 1,
"terminal": 1,
"description": "fichario preto",
"price": 33.55,
"date": "04122012"
}
Thursday, December 6, 12
23. PASSO A PASSO
• Ler os dados do CSV e converter para objetos.
• Para cada objeto, converter em Json.
• Adicionar o Json em uma lista de String.
• Gravar o conteúdo da lista em um arquivo.
Thursday, December 6, 12
24. SINGLE THREAD
• Processar tudo sequencialmente em um loop
• Implementação mais simples
Thursday, December 6, 12
25. CÓDIGO....
public List<String> toJson(List<?> list) {
List<String> lines = new ArrayList<>();
for (Object value : list) {
lines.add(new JsonObject(value)
.toString());
}
return lines;
}
Thursday, December 6, 12
26. TESTANDO
•1 milhão de registros
• Executar 10 vezes seguidas cada método.
• Desconsiderar o menor e o maior tempo.
• Obter o tempo médio.
Thursday, December 6, 12
27. TEMPO
Tempo
Método
Médio (ms)
Single 5562
Thursday, December 6, 12
37. protected List<String> convertToJson(List<Sale> sales){
int size = sales.size();
int amount = size / NUMBER_OF_THREADS; //4
int beginIndex = 0;
int finalIndex = amount;
List<Thread> threads = new ArrayList<>();
List<String> jsons = Collections.synchronizedList(
new ArrayList<String>());
while (true) {
//Cria uma nova thread para cada parte
}
Thursday, December 6, 12
44. DIFICULDADES
• Decidir a quantidade de Threads
Thursday, December 6, 12
45. DIFICULDADES
• Decidir a quantidade de Threads
• Dividir o trabalho
Thursday, December 6, 12
46. DIFICULDADES
• Decidir a quantidade de Threads
• Dividir o trabalho
• Juntar tudo no final
Thursday, December 6, 12
47. protected List<String> convertToJson(List<Sale> sales){
int size = sales.size();
int amount = size / NUMBER_OF_THREADS; //4
int beginIndex = 0;
int finalIndex = amount;
List<Thread> threads = new ArrayList<>();
List<String> jsons = Collections.synchronizedList(
new ArrayList<String>());
while (true) {
//Cria uma nova thread para cada parte
}
Thursday, December 6, 12
50. FORK / JOIN
• Java 7
• Dividir tarefas entre múltiplos processadores
Thursday, December 6, 12
51. FORK / JOIN
• Java 7
• Dividir tarefas entre múltiplos processadores
• Tarefas que podem ser quebradas recursivamente
Thursday, December 6, 12
52. COMO FUNCIONA
class ExemploForkJoin extends RecursiveTask<Long>{
@Override
protected Long compute() {
if(qtdeDeDados < LIMITE){
// execute a tarefa
}else{
//Divida o trabalho entre subtarefas
//Execute as subtarefas e espere o resultado
}
}
}
Thursday, December 6, 12
76. }else{
JsonTask left =
new JsonTask(list.subList(0, size / 2));
}
Thursday, December 6, 12
77. }else{
JsonTask left =
new JsonTask(list.subList(0, size / 2));
JsonTask right =
new JsonTask(list.subList(size / 2, size));
}
Thursday, December 6, 12
78. }else{
JsonTask left =
new JsonTask(list.subList(0, size / 2));
JsonTask right =
new JsonTask(list.subList(size / 2, size));
left.fork();
}
Thursday, December 6, 12
79. }else{
JsonTask left =
new JsonTask(list.subList(0, size / 2));
JsonTask right =
new JsonTask(list.subList(size / 2, size));
left.fork();
right.fork();
}
Thursday, December 6, 12
80. }else{
JsonTask left =
new JsonTask(list.subList(0, size / 2));
JsonTask right =
new JsonTask(list.subList(size / 2, size));
left.fork();
right.fork();
jsons.addAll(right.join());
jsons.addAll(left.join());
}
Thursday, December 6, 12
117. A ORDEM DAS CHAMADAS
• Ordem das chamadas é importante.
• Perde todo o paralelismo
Thursday, December 6, 12
118. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
P
P
L R
Thursday, December 6, 12
119. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
P L
P
fork()
L R
Thursday, December 6, 12
120. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
R L
P
fork() compute()
L R
Thursday, December 6, 12
121. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
P L
P
return
fork() compute()
L R
Thursday, December 6, 12
122. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
P
P
join() return
fork() compute()
L R
Thursday, December 6, 12
123. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
Thursday, December 6, 12
124. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
Thursday, December 6, 12
125. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
P
P
L R
Thursday, December 6, 12
126. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
P L
P
fork()
L R
Thursday, December 6, 12
127. left.fork();
long leftAns = left.join(); Bloqueia a thread!
long rightAns = right.compute();
return leftAns + rightAns;
P L
P
fork()
L R
Thursday, December 6, 12
128. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
P L
P
join()
fork()
L R
Thursday, December 6, 12
129. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
R
P
join()
fork() compute()
L R
Thursday, December 6, 12
130. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
R
P
join() return
fork() compute()
L R
Thursday, December 6, 12
131. left.fork();
long leftAns = left.join();
long rightAns = right.compute();
return leftAns + rightAns;
P
P
join() return
fork() compute()
L R
Thursday, December 6, 12
132. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
Thursday, December 6, 12
133. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
P
P
L R
Thursday, December 6, 12
134. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
P
P
compute()
L R
Thursday, December 6, 12
135. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
R
P
compute()
L R
Thursday, December 6, 12
136. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
R
P
return
compute()
L R
Thursday, December 6, 12
137. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
P
P
return
compute()
L R
Thursday, December 6, 12
138. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
P L
P
return
fork() compute()
L R
Thursday, December 6, 12
139. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
P L
P
return
fork() compute()
L R
Thursday, December 6, 12
140. long rightAns = right.compute();
left.fork();
long leftAns = left.join();
return leftAns + rightAns;
P
P
join() return
fork() compute()
L R
Thursday, December 6, 12
141. long rightAns = right.compute();
left.fork(); Executa
long leftAns = left.join(); Sequencialmente
return leftAns + rightAns;
P
P
join() return
fork() compute()
L R
Thursday, December 6, 12
142. left.fork();
long rightAns = right.compute();
long leftAns = left.join();
return leftAns + rightAns;
Thursday, December 6, 12