In a multi-tasking environment of the Operating System several processes executes at the same time and the Signals provide an Inter-Process Communication (IPC) method. The Operating System sends signals to the process to notify them about the events occurred and to control them. A Parent process can create another process, which are called the Child process and the Parent process can use signals to control the Child process. The Child can also send a signal back to the Parent process.The signal is also a means of passing message between independent processes. A signal Handler function inside the process will always get the signal number of the received signals. The Signal Handler function can be set up in such a way that it can receive value or messaged passed along with the signals by the other processes. This article discusses how to send a message along with a signal from one process to another.
How to Send Value Between Processes Using Signal -(Part 24/38)
Linux operating systems especially Ubuntu is preferred for all kind of programming and development. In a multi-tasking environment of the Operating System several processes executes at the same time and the Signals provide an Inter-Process Communication (IPC) method. The Operating System sends signals to the process to notify them about the events occurred and to control them. A Parent process can create another process, which are called the Child process and the Parent process can use signals to control the Child process.The Raspberrypi is a board actually designed for helping computer education for remote schools but it is a good platform for programmers especially beginners to explore various coding techniques. The Raspberrypi is a mini-computer board which is powerful enough to run large operating systems like Linux, Mac and Windows. The Linux operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian.
How to Read Inputs Using Signal in Raspberry Pi -(Part 26/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard.To access the pins that coming out of the Broadcom controller the C library “bcm2835” has been downloaded and installed. There are eight general purpose IO pins on the 13*2 pin connectors of the Raspberrypi board and among them four pins has been selected as input and then remaining four pins as output.
How to Read Multiple Inputs Using Raspberry Pi -(Part 17/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard.To access the pins that coming out of the Broadcom controller the C library “bcm2835” has been downloaded and installed. There are eight general purpose IO pins on the 13*2 pin connectors of the Raspberrypi board and among them four pins has been selected as input and then remaining four pins as output.
How to Use Input Pin of Raspberry Pi-(Part 09/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller the C library “bcm2835” has been downloaded and installed.Each pin of the Raspberrypi board is defined inside the header file <bcm2835.h> which can be included in the C code.
User Signalled Process System in Raspberry Pi -(Part 23/38)
In this project a Parent process creates so many Child process and controls them using the signals. The Parent process creates the Child processes using the fork () function. When the Parent calls the fork (), it always returns a positive value on success. The positive value which the Parent receives is the process-id of the newly created Child process. The Child process however get a value ‘0’ from the same fork () function call.Thus the Parent can store the process-id of each and every Child process that has been created. Using this process-id the Parent process can send a signal to a particular Child process with the help of the function ‘kill ()’. The kill () is a function defined in the header file <sys/signal.h> which can be used to send a specified signal to a specified process.
Self Signalled Process System Using Raspberry Pi -(Part 22/38)
The Multi-tasking Operating Systems can run several processes at a time creating and effect of parallel processing with the help of the high speed processor. The Linux Operating Systems provides Multi-User-Multitasking. Linux operating systems especially Ubuntu is preferred for all kind of programming and development. The operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian and also Ubuntu versions are available for the Raspberrypi board. The Raspberrypi is a board actually designed for helping computer education for remote schools but it is a nice platform for programmers especially beginners to explore various coding techniques.A Parent process can create another process, which are called the Child process and the Parent process can use signals to control the Child process. This project demonstrates the implementation of a Process system in which there is a single Parent and so many Childs and the entire systems operates on the signal received by the Parent process.
Interprocess Signalling in Raspberry Pi -(Part 21/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. A signal is sent for the purpose of notifying the process about something that required immediate attention.
How to Use Timer in Raspberry Pi -(Part 20/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. A signal is sent for the purpose of notifying the process about something that required immediate attention. Different signals are used to notify different events and the signals are differentiated by their signal numbers.
How to Control a Process Through Signal -(Part 18/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. A signal is a software interrupt that can be sent to a process which is currently executing in the Operating System.
Multiuser Multitasking in Raspberry Pi -(Part 16/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. The default user present in the Ubuntu OS loaded in the Raspberrypi is ‘pi’. Creating new users is an easy task using the commands in Ubuntu.
Parallel Programming using Threads -(Part 28/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed.The term ‘Process’ refers to the code which is currently in execution and the term ‘thread’ refers to the small part of that code which the CPU will execute at a particular time.
Multitasking on Raspberry Pi using Execve and Fork Commands -(Part 15/38)
The term ‘Process’ refers to the piece of code which is currently in execution. The fork () is a function which can be used in the C code to start a new process as a ‘Child process’. The process or the code which is in execution which makes a call to the function fork () is called the ‘Parent process’ and the new process created by the fork () is called a ‘Child process’. The ‘Parent process’ and the ‘Child process’ executes parallel (high speed processor makes it feel like parallel processing) and independently and thus achieves multi-tasking. The fork () most of the time uses the execve () function to create a new process as Child. In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet.
Executing a File using Execve On Raspberry Pi -(Part 14/38)
In an operating system, the user can write so many codes and made them executable and then run each of them as background processes to achieve multi-tasking. The another easy method to achieve the multitasking is using a Shell script in which all the commands to execute the codes as background process are scripted into, but it is not a proper method since the user can have little control over the processes which are initiated by the Shell script.The same thing can be done by executing a single C code in which the system () function opens up a new Shell and pass the commands to them. Since it may open up a new Shell for executing each and every process the better method is to use execve () function in the code which itself can execute a new process.
Multitasking on Raspberry Pi using Single C Code -(Part 13/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached.The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. The Operating system running on the 700Mz processor is powerful enough to do multitasking and hence it can run so many processes in parallel just like the Desktop OS can do.
Multitasking using Shell Script on Raspberry Pi -(Part 12/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached. The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed. The Shell is a program or an application which accepts the commands entered through the command line searches for the executable files having the same name at some particular directories and executes them.
Single User Multi Tasking on Raspberry Pi-(Part 11/38)
In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached.The Burg stick male connectors allow each pin out from the Raspberrypi board to be plugged into the holes of a breadboard. To access the pins that coming out of the Broadcom controller of the Raspberrypi board using C language, a C library is available called “bcm2835” which has been downloaded and installed.
How to Run a Code Automatically On Boot-(Part 08/38)
The embedded system devices are meant to start its predefined function as soon as it is powered up. When the OS runs on the Desktop most of the applications are executed by the user after the OS boots. In case of OS running on embedded applications like in Raspberrypi board the preffered applications must be made executable immediately after OS booting process finishes. This article discusses how to execute a code automatically after the Ubuntu OS boots in a Raspberrypi board. In this project the Raspberrypi board is loaded with Ubuntu and is remotely accessed using VNC. The Raspberrypi board is also connected to the internet. There are 26 connectors which can be taken out from the connector port of the Raspberrypi board. All the connector pins are taken out using 13*2 pin female connectors and at the other end of their wire 26 pin Burg stick male connectors are attached.
How to Connect Raspberry Pi to Wi-Fi Connection of a PC – (Part 05/38)
In this project the Raspberrypi board is booted with the Ubuntu OS and is connected to the Ethernet port of a Windows7 PC. One end of the peer-to-peer LAN cable is connected to the Ethernet port of the Raspberrypi and the other end to the Ethernet port of the PC. It is assumed that the user has Wi-Fi connectivity to the PC where the Raspberrypi board is connected. In windows the Raspberrypi connected to the Ethernet port of the PC can be provided with the internet access by creating a bridge network adaptor between the Wi-Fi adaptor and the LAN adaptor. The idea is to connect the Raspberrypi board to the Wi-Fi router rather than simply sharing the network connectivity with the board. The advantage is that the Raspberrypi board will be having its own IP and can be connected with all other computers which are connected to that particular Wi-Fi network.
Getting Started with Raspberry Pi: “Hello World” Programming on Raspberry Pi – (Part 06/38)
The Raspberrypi is a microcontroller board which runs on a SoC chip from the Broadcom with ARM11 processor at the core. The Board is a mini computer itself without any input or output devices but ports provided to connect them. The board is designed with an intention of providing computer education to the remote schools where the PCs are not very commonly used. The board can be connected to a normal TV set using a RCA connector. It can be connected to an HD TV screen using the HDMI port provided in the board. The board can be connected with an Ethernet cable and access them remotely in TUI or GUI mode. The operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian and also Ubuntu versions are available for the Raspberrypi board. This article discusses how to start with the C programming in the Raspberrypi.