
This academic experiment using a Raspberry Pi cluster introduces the concept of Parallel and Distributed Computing (PDC) to remote education students.
Since the launch of the Raspberry Pi, creators have initiated numerous computer science education projects on this humble pocket chip system. Among these are many projects exploring low-cost Raspberry Pi clusters to introduce the concept of Parallel and Distributed Computing (PDC).
The Open University (OU) in the UK offers remote education to students of different ages, experiences, and backgrounds, which presents challenges not faced in more traditional universities. The experiment using Raspberry Pi clusters to introduce the concept of PDC to remote education students began in 2019 and was presented in a scholarly paper but deserves broader recognition.
This project uses a Raspberry Pi cluster based on the OctaPi tutorial, which was published under a Creative Commons license by GCHQ. Eight Raspberry Pis are connected in a private network using a router and a switch. One Raspberry Pi acts as the master control, while the others are servers that feedback results to the master device. Programs written in Python run on the master Raspberry Pi, while the dispy
package distributes tasks across the various processing cores of the cluster.
OctaPi tutorial
They developed three programs for the cluster, which you can download from Git repository.
Two of these programs are text-based and relate to search problems: the Traveling Salesman Problem and password hashing. As complete search problems, these are ideal choices for teaching PDC concepts. The third program is graphical. The image combiner takes three images as input, which contain non-overlapping obstacles. It constructs an image without any obstacles by comparing the RGBA values of the three images pixel by pixel and selecting the median.
Using the cluster
The Open University is a distance learning institution, so students access the cluster through a web interface. Remote access to the cluster uses the infrastructure of the university’s OpenSTEM laboratory. Ten clusters (eight built with Raspberry Pi 4, two with Raspberry Pi 3B+) are installed in racks, with webcams aimed at each cluster.
Students choose which program to run, the number of cores to use, and the parameters for the selected program. As output, they can see the time taken for the program to run on a single Raspberry Pi compared to the time taken by the cluster using the selected number of cores. Students can also see the program’s output, such as password hash results, minimum and maximum traveling salesman routes, or unobstructed images.
Generating a fourth image from information in three images
The webcam shows a live stream of the cluster. The master Raspberry Pi has an LED display showing the status of the program during execution. The webcam allows students to clearly see that they are experimenting with real dedicated hardware, rather than receiving simulated or pre-recorded results.
Raspberry Pi cluster
Each program has two associated activities that describe different aspects of program design and PDC operation. One main learning point is that PDC computation can provide significant performance advantages, but at the cost of the time and resources spent on partitioning and distributing the problem and recombining the results. The second learning point is that efficiency is greatly influenced by program design.
Students enjoy
Currently, the use of the Raspberry Pi cluster is optional. However, based on current research findings, students enjoy it and feel motivated by the ability to remotely access physical hardware.
One student said, “Being able to use a real cluster rather than virtualizing it is really fun.”
Another student added, “Being able to actually see the cluster working, seeing the real effects of multi-core processing, is really exciting. Itβs great to be able to try it out in person rather than just reading about the theory!”
Students are using the cluster to conduct learning activities aimed at teaching PDC principles rather than writing and running their own programs. The experience of developing low-cost Raspberry Pi clusters for remote university students indicates that remote practical activities benefit teaching PDC concepts and engaging students.
When I asked Daniel Gooch, one of the team members behind the project, he said, “For me, what sets us apart is that we took an existing set of Raspberry Pi tutorials and worked to integrate more peripheral material to ensure it could handle the distance and scale of our operations.”
via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters
Author: Peter Cheer Topic: lkxed Translator: geekpi Proofreader: wxy
This article is originally translated by LCTT, Honorably published by Linux China

|