Parallel Programming
Author: Jessica Dagostini – beecrowd
(5 minutes of reading time) You probably have already wondered why notebook and cell phone processors now come with dual, quad or octa core, right? After all, how will this different number of cores benefit me? The simplest answer is: performance. However, that depends. We are getting closer and closer to the limit of Moore's Law, which determines the growth rate of the number of transistors(1) on the same processing chip. Each leap we made in its architecture brought, for the end consumer (whether a developer or not), a huge performance gain in the processes performed by the computer. However, as mentioned, we are reaching the maximum limit of optimizations in a single processing hardware. This opened other possibilities. It is in this context that parallel programming stands out. Already well studied around the 1960s, many years before we reached the limit of this architecture, this programming paradigm has been gaining space and prominence in recent years. But what is parallel programming anyway? Are two programmers coding the same program together? Or even two programmers sharing the same keyboard? I don't think so... :) Parallel programming is the ability to perform the processing of the same activity on different computing resources at the same time, thus reducing its execution time. Think, for example, of the traditional cake recipe example. In this recipe, there is no need for an exact sequence of addition of ingredients, which allows us to add them to the mixing bowl in any order. To make this cake we need 2 eggs, 2 cups of wheat flour, 1 cup of milk, 1 cup of sugar and two spoons of chocolate powder. In addition to you, three more people came to help you prepare the recipe and you will ask them to help you. Right away, you realize that you don't have to be alone in collecting all the ingredients and ask for their help. The four of you will be responsible for one ingredient each and, thus, will seek the same ingredients at the same time, that is, in a parallel way. After that, for mixing, you don't need your helpers and you will perform the action yourself. But remember that you need to grease the mold to add the mixture and you also need to turn on the oven to preheat. What do you do? Ask for help again so that, while you mix the ingredients, two of your helpers will be responsible for one of these two new activities. In the end, you realize that it took much less time to make this cake with help than it did alone. This thinking is the very basis of parallel programming! Remember the many cores present on our devices that we mentioned at the beginning of the text? They can be our cake recipe helpers in running a computer program! Thus, when programming software in parallel, the developer needs to identify regions of the code that can be executed in parallel (such as collecting the ingredients for the cake) and delegate such activities so that each of the cores do this work in parallel and deliver to you, who will manage the rest. But the programmer needs to tell his software to make use of all this available parallelism. Just as if you hadn't delegated activities for your helpers to perform on the cake recipe they would have stood still, so do the multiple cores on your device. The developer of the running software needs to have delegated functions to these parallel resources so that we gain such a performance improvement from these many cores. It is worth mentioning that this parallelization is not only restricted to the cores of a single processor. We can perform parallel computing using different complete computers, aggregated by a high-speed connection, which are what we call computer clusters. In these clusters, we can make use not only of the parallel cores but also of the entire structure of this other computing node, such as memory, disk, etc. And as far as this may seem from your reality, it's closer than you think! Weather forecasting software, for example, would practically not exist without parallel computing (or would even exist, but we wouldn't know today's weather forecast until next month). More and more we have the need for high processing to compute complex calculations and so we have simulation results that impact our lives, such as weather forecast, in a timely manner for use. In these cases, our parallel cores alone won't do, and we need a large conglomeration of computers to perform these calculations in parallel, which are what we call supercomputers. But that topic is for the next text. Do you like our content? So, follow us on social media to stay on top of innovation and read our blog. (1) Moore's Law dictates that the number of components on a processing chip doubles every 18 months. Most modern processors can have over a billion transistors on a single silicon board. The more transistors you put on a single board, the more processing power it has.
Jessica Dagostini is a Principal System Architect at beecrowd. She has a Masters in Computer Science from the Federal University of Rio Grande do Sul and has had the opportunity to participate in Programming Marathons around Latin America.
Share this article on your social networks:
Rate this article:
Other articles you might be interested in reading
- All (185)
- Career (38)
- Competitions (6)
- Design (7)
- Development (112)
- Diversity and Inclusion (3)
- Events (3)
- History (15)
- Industries (6)
- Innovation (38)
- Leadership (8)
- Projects (23)
- Well being (18)
Cloud Computing and Digital Transformation and Social Impact
(5 minutes of reading)
In recent years, we have witnessed a quiet revolution that is fundamentally reshaping the way we live and work. At the center of this transformation is cloud computing, a technological innovation that transcends physical limits and opens up new horizons of possibilities. This text will talk about this subject that is transforming the IT area. Come read!...
Tech in Education
(9 minutes of reading)
In the contemporary educational landscape, technology plays an increasingly crucial role, revolutionizing not only the way students learn, but also how educators teach. As we adapt to a digitally connected world, new trends are emerging that promise to further transform the way education is designed and delivered. Come read this text to learn about the latest trends in educational technology and explore their impact on student development and the evolution of teaching. Come with us!...
Ethical Software Development
(5 minutes of reading)
Developing software is a complex activity that goes far beyond simple coding. It involves a meticulous process of planning, design, implementation, testing and maintenance to create reliable, efficient, and secure systems. However, in addition to seeking functionality and performance, developers must also carefully consider the ethical aspects of the software they are creating. In this text we will talk about ethics and responsibility when developing software. Come read!...
Balance Between Professional and Personal Growth
(6 minutes of reading)
In a world driven by the constant search for professional success, we often find ourselves immersed in our careers, forgetting the fundamental balance between professional and personal growth. As we dedicate hours to coding, solving problems, and advancing our technical skills, it's essential to remember that our journey as human beings go beyond the lines of code. Come read our text and see super cool tips on how to achieve this balance!...
How to Highlight Programming Competition Awards on your CV
(6 minutes of reading)
In a field as dynamic as software development, it is crucial to stand out from the crowd. An exceptional way to do this is through recognition and awards won in competitive programming competitions. In addition to demonstrating your superior technical skills, these awards attest to your ability to solve complex problems, collaborate as a team, and deliver exceptional results under pressure. Today we will talk about the curriculum and competitions, are you interested? Come with us!...
Open Source and Collaboration
(5 minutes of reading)
If you're ready to start exploring the world of open source, be aware that you will encounter many learning opportunities and challenges. Collaboration is at the heart of this environment, driving innovation and influencing the direction of technology. Come read our text to find out more about this subject!...
Would you like to have your article or video posted on beecrowd’s blog and social media? If you are interested, send us an email with the subject “BLOG” to [email protected] and we will give you more details about the process and prerequisites to have your article/video published in our channels
Headquarter:
Rua Funchal, 538
Cj. 24
Vila Olímpia
04551-060
São Paulo, SP
Brazil