sc :: elementary

mar'15

14

Raspberry Pi 2 For All Researchers

Intro

Since the launch of Raspberry Pi a huge community grew around the project. From basic computer science education, embedded applications, home automation and research computing education the Raspberry Pi was a platform of choice. The original goal of designing an affordable computer for education is fully reached. A little over a month ago Raspberry Pi Foundation refreshed the platform and achieved a huge improvements in the performance of the single board computer.

Since the first release of the Raspberry Pi computer many users had reservations is adopting it since the the processor and memory limitations of the initial board. Comparing to even an older regular computer Raspberry Pi was slow and hard to use for comfortable web browsing or even checking email. The new release i.e. Raspberry Pi 2 changes this and the new board becomes now fully usable, much faster computer that the initial release.

The speedup was achieved by replacing the ARMv6 processor with multicore ARMv7 chip and doubling the amount of memory on the board. The Raspberry Pi Foundation and users report around 6x speedup comparing to the previous version. The most important is that the price of board has not changed and is still the lowest for a single board computer with $35 price tag.

Hardware specification

As we have mentioned above the Raspberry Pi 2 differs from the previous version (the Raspberry Pi B+) only by the amount of RAM memory and the newer version of CPU. At least that what is the most visible change to the user. ARMv7 offers significant gain in performance due to multicore character and increased speed of the processor.

In the table below we have briefly summarized the features of Raspberry Pi B+ and Raspberry Pi 2 B. We do not include the original Model B as its specification was the same as B+ with the upgraded form factor, number of pins, change the size of SD card reader and remove of S-Video.

Item Raspberry Pi 1 B+ Raspberry Pi 2
Processor type ARM11 ARM Cortex-A7
Number of cores 1 4
CPU Frequency 0.7 GHz 0.9 GHz
RAM Memory 512 MB 1 GB
Number of USB ports 4 4
Ethernet 100 Mbps 100 Mbps
GPIO Pins 40 (26 in RPi B) 40
HDMI Yes Yes
Audio jack Yes Yes
SD card MicroSD (SD in RPi B) Micro SD port
Camera interface Yes Yes
Display interface Yes Yes
Operating systems Linux, RISC, BSD Linux, Windows 10, RISC, BSD

After unpacking the box, like in the previous versions, you will find only the Raspberry Pi 2 board. To make full use of it you will need a MicroSD card, micro USB power supply, keyboard, mouse and a screen with the HDMI cable. Having all of these you will be ready to plug-and-play.

The most popular operating system for the Raspberry Pi is still Raspbian. Its official image has been updated so it supports both versions of Raspberry Pi processors (ARM11 and ARM Cortex-A7 that are of ARMv6 and ARMv7 architectures, respectively).

Microsoft corporation announced that the next version of Windows operating system - Windows 10 will support ARMv7 architecture and that Microsoft will prepare a special version of Windows 10 for Raspberry Pi 2. The equally important fact is that the Windows 10 for Raspberry Pi 2 was announced as free. With this move Microsoft joined Mojang (release of Minecraft for Raspberry Pi) and Wolfram (Mathematica for Raspberry Pi) in the entrepreneurial support of Raspberry Pi project.

Where to use in research computing

Despite Raspberry Pi's recent upgrade it still cannot compare with high-end workstations or high-performance systems (HPC) in terms of speed. The point is that it does not have to. Raspberry Pi was created to be a simple hackable system with huge focus on education and that is how it should be considered in research computing. It may not be a replacement for HPC production system but certainly can be used for learning and prototyping, in more areas after the upgrade.

Basic Linux education

Despite the fact that the majority of the overall desktop computer is running Windows operating system it is very common to see Linux on research computers. Not only on the HPC systems but also high performance workstations or research desktop computers. Knowledge of basic shell commands to comfortably use that environment should be therefore part of the research education. Raspberry Pi is a perfect platform to teach not only basic shell commands but also the structure and administration of Linux computers.

Programming

The reason for creating the Raspberry Pi was the computer education that could be affordable for everybody. From the beginning of the project programming education was one of the strongest sides with large community. With Scratch, Python, GCC and more, available on Raspberry Pi everybody from a child to an adult could be introduced and trained her/him self in basic and advanced programming. This is again the case with Raspberry Pi 2. This time work is more comfortable and stress-free. Codes work much faster and compile quickly.

Multithreaded programming

New ARMv7 processor delivers 4 cores. Standard programs do not, however, take advantage of the multicore processors unless special effort has been made to enable the multithreading. One of the most popular way of doing it is OpenMP parallelization using compiler directives. With multicore processors being a standard even in mobile phones this is an important skill.

Having multicore processor Raspberry Pi becomes a testbed for multithreaded programming for true HPC systems where Intel Xeon (usually) processors have around 10 cores and require OpenMP enabled application to fully use the potential of the CPU.

Education and research with Mathematica

Raspberry Pi would not be such a great thing for research if not the free copy of Mathematica that is available in Raspbian. It is fully functional with several extensions that allow the use of GPIOs. Raspberry Pi B was a little too slow to use Mathematica comfortably, the Raspberry Pi 2 gives completely new experience. Of course it will be slower that most of the modern computers, however, it is perfect for prototyping if you have access to a cluster with Mathematica. It also allows everybody to use that powerful piece of software.

Windows 10

Raspberry Pi project certainly brought a large number of new users to Linux community. However, it may have not convinced everybody to try the board simply because of the relative difficulty of Linux and prejudice against it. Microsoft with announcement of releasing the version of Windows 10 that will be compatible with ARMv7 and run on Raspberry Pi has secured a new wave of users including researchers. A large number of codes are still released only in the binary form and some of them only exist for Windows operating system. Education or prototyping with these codes will now be easier on Raspberry Pi.

After Windows 10 will be freely available, Raspberry Pi will become the cheapest Windows workstation. More information here: Windows 10 for Raspberry Pi 2

Cheap desktop replacement for basic applications

Raspberry Pi is an excellent choice if you need a dedicated computer to do some task. Whether it is driving a visualization wall to running a web or file server. Research groups that wish to run several services from automatic backup systems to instrument control should definitely consider the Raspberry Pi, for a fraction of the cost it offers the same functionality.

Summary

Raspberry Pi is an interesting computer which has several great selling points. The fist is the community of users and companies supporting the project. The second is the price, fully functional computer worth $35 is definitely hard to find. All the strengths will grow with the second edition of the Raspberry Pi which turned slow computer for enthusiasts into a fully functional multicore Linux machine that is perfect choice for researchers. So for the Pi day (3/14/15) give a Raspberry Pi to a researcher inside you!