Do MPI library need an OS for heterogeneous multicore system? - operating-system

I am new to multicore. As a beginner my question maybe basic,my question is can MPI library be supported in baremetal heterogeneous systems ? or do we need an OS (like RTOS) to support the MPI library ? It will be useful if anyone can provide links of any implemented MPI on a heterogenous system with or without OS. Anything will be useful for understanding. Thanks in advance.
EDIT : I would also like to know the general requirements of a system for MPI , if not specific.

I am not too sure what you mean with a baremetal heterogeneous system.
You need to have an operating system
We tried to perform a simulation distributed into serveral processes. Some processes were calculated on a Linux (RedHat6) and some on Windows7 machine.
We used intel mpi. The pmi_proxy needs to be accessible on all machines.
Since the machines were connected with a normal gigabit lan connection, the performance was rather poor. MPI really benefits form a quick connection like infiniband.
The general requirement is that you need to have a connecting network between the machines. They even turn several raspberry pis into a supercomputer (I would perhaps say cluster).
This is a quite similar question.
Problems like this may occur.

Related

What are the actual Operating System Abstractions required by ROS2?

As per this SO post and several resources online, I am aware that ROS is a meta-operating system that runs on top of a real OS.
However, what is the best way to identify all the actual Operating System (OS) abstractions/services that ROS 2 applications actually depend on?
Specifically, I'm interested in understanding the OS abstractions necessary to run ROS applications and not the OS abstractions required to develop ROS 2 applications.
Examples of OS abstractions I am referring to include:
File System (which to my knowledge ROS 2 requires).
Network Drivers (which to my knowledge ROS 2 also requires given that ROS 2 nodes need to communicate with each other over some network).
My goal is to understand ROS 2's Operating System abstractions to a level deep enough where I potentially may be able to attempt to port ROS 2 applications to an unsupported OS as an educational exercise.
Some strategies that I have considered (but have yet to attempt) include:
Going through each of the libraries outlined in the ROS architecture diagram below such as the rcl and rclpp libraries and examining the header files included in those libraries to determine what Operating System services they require.
Running strace on a ROS 2 executable and examining the System Calls made by the ROS 2 program. However, this seems to me a less structured version of the previous strategy.
The following diagram also raise further questions like, what is the best way to identify Operating System abstractions required by Data Distribution Service (DDS) libraries?
However, I'm unsure if this is the best way to go about it and if there are any resources out there (research papers, documentation I haven't read, blog posts etc.) that may speed this discovery/understanding process up.
Would appreciate some starting advice from anyone who has:
Ported ROS 2 applications to a different OSs in the past.
Knowledge about ROS 2's internal architecture.
Experience porting other things to new OSs and doing this kind of discovery work!
General advice on how to get started.

What kernel type does the RTOS eCos use?

From my research I cannot find what kernel type is being used in eCos, such as monolithic or micro-kernel. All I could find from my research is that the kernel is a real-time one or websites just describe it as the eCos kernel, does this mean it is a custom made kernel?
What I know about eCos is that it is a hard RTOS although is somewhat vulnerable in terms of security, uses priority, queue based scheduling.
A micro-kernel is:
... the near-minimum amount of software that can provide the mechanisms
needed to implement an operating system (OS). These mechanisms include
low-level address space management, thread management, and
inter-process communication (IPC).
(Wikipedia 11 Dec 2018)
The eCos kernel is described in its Reference Manual thus:
It provides the core functionality needed for developing
multi-threaded applications:
The ability to create new threads in the system, either during startup
or when the system is already running.
Control over the various threads in the system, for example
manipulating their priorities.
A choice of schedulers, determining which thread should currently be
running.
A range of synchronization primitives, allowing threads to interact
and share data safely.
Integration with the system's support for interrupts and exceptions.
It is quite clearly by comparison of these descriptions a micro-kernel. Other services provided by eCos such as file-systems, networking and device drivers are external and separable from the kernel. That is to say, you can deploy the kernel alone without such services and it remains viable.
In a monolithic kernel, these services are difficult or impossible to separate as they are an intrinsic part of the whole. Unlike eCos mand most other RTOS they do not scale well to small hardware platforms common in embedded systems. Monolithic kernels are suited to desktop and general purpose computing platforms, because the platforms themselves are monolithinc - a PC without a filesystem, display, keyboard etc, is not really viable, whereas in an embedded system that is not the case.
While Linux, and even Windows are used in embedded systems, a micro-kernel is deployable on platforms with a few tens of kilo-bytes of memory, whereas a minimal embedded Linux for example requires several mega-bytes and will include a great deal of code that your application may never use.
Ultimately the distinction is perhaps irrelevant, as is the terminology. It is what it is. You do not choose your kernel or OS on this criteria, but rather whether it provides the services you require, runs on your target, and fits in the available resource.
I think it is a monolithic kernel. If you review this page: http://ecos.sourceware.org/getstart.html
It is used instead of linux kernel and linux kernel support monolithic kernels. In addition, if it was a micro kernel , they would highlight the kernel type like QNX Kernel type which is micro kernel

UML equivalent for one of the BSDs?

On Linux there exists a thing called a User Mode Linux kernel, which is a kernel built in such a way that it will run as an ordinary, unprivileged user process (not even needing root). It's a cheap and easy virtualisation method that'll even run on non-Linux platforms (e.g. CoPilot is based around UML built for Windows).
Does such a thing exist for the BSD world? I don't mind which OS.
I've had a look myself but 'user mode bsd' is a completely ungoogleable term. I've discovered NetBSD rump kernels, but they seem to be solving a different problem --- it looks like it's not possible to run arbitrary process trees on them.
I think DragonFly BSD's vkernel is what you are looking for.
NetBSD has usermode too. I don't know how to configure/build it.
Look :
http://mail-index.netbsd.org/current-users/2015/02/06/msg026632.html
The best true virtualisation tool in the NetBSD world is Xen.
It's not all that difficult to set up any more either. Don't get put off by the length and volume of information in the "how-to" -- the basics boil down to a few simple steps.
NetBSD/xen HowTo
In the FreeBSD world I've heard good things about The BSD Hypervisor
DragonFly BSD's vkernel is indeed similar to User-Mode-Linux, but from what I've heard it wouldn't be very suitable as a "cheap and easy" virtualisation method. It is actually intended for the same types of uses as NetBSD's rump kernels, though it does seem to go so far as supporting a full virtual OS environment. The performance will likely be pitiful though.
It probably wouldn't hurt to pester the VirtualBox folks about supporting VBox as an application on the BSDs too, but don't hold your breath waiting for it to happen.
On FreeBSD you have jails. They basically are a (almost) no-overhead virtual machine running on the same kernel as the host.

Understanding Virtualization

I want to know about Virtualization in detail. But start from basics, like what is virtualization, with real world examples and scenarios. When ever I search, i got Virtualization technologies, but I want to learn and in fact know what exactly is virtualization, its types and all...
Please help me in getting practical details of term "Virtualization"
Virtualization is a big topic, but very roughly speaking there are three main levels of virtualization:
OS virtualization with a type 1 hypervisor
Virtual machine that run on an existing hardware/OS, e.g. VMWare
High-level virtual machines, e.g. JVM
I would recommend this book: Virtual Machines, by J. E. Smith and R. Nair.
It covers pretty much all virtual execution environments: process virtualization, high level virtual machines, system virtual machines, multiprocessor virtualization, etc.
Note that depending on the level which you are interested in, it gets pretty much related to system administration / hardware, so you might also ask the question on serverfault.com.
The question is pretty generic so it can lead to different replies, but I think that you first need to define and understand what is an actual hypervisor and why it is used:
The hypervisor is used to do the abstraction between the physical and the virtual resources. In other words, it is responsible to create a virtualized layer and share the hardware components (CPU, RAM, NIC, storage) to the virtual machines that will be used. Therefore, it is a lot simpler to centralize and manage multiple sources of heterogeneous elements. It is possible to deploy two types of hypervisors:
Type 1 Hypervisor: There is no actual operating system installed on the bare metal server except the software used to deploy the hypervisor. It is especially used in an enterprise context considering that you maximize the resources to share (you do not have the limitation of running an underlying operating system), but it also possible to deploy one in a home lab if you have the required hardware. A classic example is a VMWare ESXi host.
Type 2 Hypervisor: It consists of installing the hypervisor on top of the actual operating system (Windows, Linux, MacOS). It is used especially for testing, deploying simple services and to extend your software capabilities (you can run multiple different operating systems simultaneously). A classic example is Oracle’s Virtual Box.
In your case, I think that the best choice to actually learn about virtualization would be to download a type 2 Hypervisor (Virtual Box or VMWare Workstation Player for instance) in order to deploy a few multiple virtual machines and gain your first hands-on experience.
Specifically, try to explore the different virtual network and storage configurations that are available to differentiate every component.

What is the difference between an OS and a Framework?

I recently posted a question about Azure... is it really an OS? I understand the technical details, and I got a lot of fuzzy answers... I really want to know... what do you think is the difference between an OS and a Framework?
Just for reference, Azure will be built on top of Hyper-V servers and the virtual machines will be running vanilla Windows Server 2008. It will run services that creates a cloud on top of the many virtual machines which is called Azure. Windows is calling Azure an OS.
I am trying to understand how to define the difference between an OS and a framework.
Operating System: The infrastructure software component of a computer system
Framework: A re-usable design for a software system (or subsystem).
By these definitions it seems to me, that an operating system can be built using a framework, and a framework can be built to interact with an operating system.
Singularity is an example of an experimental OS that is built using managed code.
Framework is a very broad term, it can be used to describe many types of subsystems. It could even describe an operating system.
Operating System is more specific, it implies facilitation of interaction with a computers or group of computers hardware layer, through the use of human user interfaces. I think Azure fits this description.
It's up to marketing - I don't think the terms have a definite meaning any more.
Is a JVM a framework?
What if it's running on a raw uC or even an FPGA - is it an OS?
An OS is the thing that directly interfaces with the machine, be it virtual or real. It has to expose syscalls that handle input devices, output devices, sound, networking, and all the other things that we take for granted these days. It also often provides some kind of UI which uses these services to make it easy to use/useful for an end-user. It needs to have device drivers to work with video cards, sound cards, etc. (Once again, these can be virtualized).
A framework is... something built on top of the OS. It, too, exposes an API, but they are often not so low-level as the one the OS exposes.
frameworks provide api contracts that oses usually don't - meaning they sit atop the os, hide and manage the differences, and consequently give you that platform independence goodness that can broaden our target audience
A framework thought to be as a development environment,a helping platform for further developments and you can work additively to create some other application using components of framework, while OS is system software is an environment to operate a system.