Embedded Systems and loT Design 9 - 22 loT Architecture and
Protocols
WebSocket uses a standard HTTP request-response sequence to
connection. When the connection is established, the WebSocket
API estprovides
ablish aa
read and write interface for reading and writing data over the
connection in an asynchronous full duplex manner. established
" WebSocket also provides an interface for asynchronously closing the
from either side. connection
9.4 loT Enabling Technologies
IoT is enabled by several technologies including wireless sensor networks, cloud
computing, Big data analytics, Embedded Systems, Security Protocols and
architectures, communication protocols, web services, Mobile Internet, and
Semantic Search engines.
9.4.1 Cloud Computing
Cloud computing has the almost unlimited capacity of storage and processing
power which is amore mature technology at least to a certain extent to solve the
problemn of most of the Internet of things.
Cloud computing is a pay-per-use model for enabling available, convenient,
on-demand network access to a shared pool of configurable computing resources
(e.g., networks, servers, storage, applications, services) that can be rapidly
provisioned and released with minimal management effort or service-provider
interaction.
Cloud storage services may be accessed through a web service API, a cloud
storage gateway or through a web-based user interface.
Cloud computing services are offered to users in different forms : Infrastructure
as-a-Service (JaaS), Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS).
Software as a Service (SaaS): Model in which an application is hosted as a
service to customers who access it via the Internet. The provider does all the
patching and upgrades as wel as keeping the infrastructure running. The
traditional model of software distribution, in which software is purchased for and
installed on personal computers.
Platform as a Service (PaaS) : Platform as a service is another application delivery
model and also known as cdoud-ware. Supplies all the resources required to build
applications and services completely from the Internet, without having to
download or install software. Services includes application design, development,
testing, deployment, and hosting, team collaboration, web service integration,
and
database integration, security, scalability, storage, state management,
versioning. PaaS is closely related to SaaS but delivers a platform from which to
work rather than an application to work with.
TECHNICAL PUBLICATIONS an up-thrust for knowledge
EmbeddedSysterms and loT Design 9-23 loT Architecture and Protocols
Infrastructure as a Service (laaS): Saas PaaS are provid1ng apples to
. customers, laaS doesn't. It offers the hardwareand
so that your organization can put
whatever they want onto it. Rather than purchase servers, software, racks, and
having to pay for the datacenter space for them, the service provider rents for
resources like server space, network equipment, memory etc.
9A.2 Big Data
Analytic
.A category of technologies and services where the capabilities provided to collect,
store, search, share, analyze and visualize data which have the characteristics of
high-volume, high-velocity and high-variety.
Examples of big data generated by loT systems :
a) Weather monitoring stations
b) Machine sensor data from industrial systems
c) Health and fitness data
d) Location and tracking systems
Data Data Data Data
collection processing analysis execution
Fig. 9.4.1
9.4.3 Wireless Sensor Networks
" A Wireless Sensor Network (WSN) is a network formed by a large number of
sensor nodes where each node is equipped with a sensor to detect physical
phenomena such as light, heat, pressure, etc.
WSNs nowadays usually include sensor nodes, actuator nodes, gatew ays and
clients. A large number of sensor nodes deployed randomly inside of or near the
moritoring area, form networks through self-organization.
Sensor nodes monitor the collected data to transmit along to other sensor nodes by
hopping. During the process of transmission, monitored data may be handled by
multiple nodes to get to gateway node after multi-hop routing, and finally reach
the management node through the internet or satellite.
Standards for WSN technology have been well developed, such as Zigbee (IEEE
802.15.4). The IEEE 802. 15.4 is simple packet data protocol for lightweight wireless
networks.
It works well for long battery life, selectable latency for controllers, sensors, remote
monitoring and portable electronics.
TECHNICAL PUBLICATIONS - an up-thrust for knowledge
9- 24 loT Architecture and
Embedded Systems and loT Design
9.4.4 Communication Protocols
Protocols
backbone of IoT
Commurnication protocols are used as a systems. It
enable
network connectivity and coupling to applications.
allow devices to exchange data over the network. Communication protocols
Communication protocol also performs error correction and detection. flow control,
data encoding, addressing mecharnism etc.
Sequence control, lost of packet, retransmission are the other functions of
communication protocol.
9.4.5 Embedded System
A system is a set of interacting or interdependent component parts forming a
complex unit. It is a fixed plan to perform one or many task.
Embedded system is an electronic system which is designed to perform one or a
limited set of furnctions using software and hardware.
General definition of embedded systems is Embedded systems are
computing
systems with tightly coupled hardware and software integration that are designed
to perform adedicated function. The word embedded reflects the fact that these
systems are usually an integral part of a larger system, known as the embedding
system. Multiple embedded systems can coexist in an embedding system.
An embedded system has three main components: Hardware, Software and time
operating system.
Hardware parts includes power supply, processor, memory, times &
communication ports, system application specificcircuit etc.
Software parts includes the application software is required to perform the series
of tasks.
An embedded system has software designed to keep in view of three
constraints :
a. Availability of system memory
b. Availability of processor speed
C. The need to limit power dissipation when running the system continuousy
cycles of wait for events, run, stop and wake up.
Demand for low cost and higher density platform requires the integration of
devices. As integration levels increases, more and more logic is added to the
processor die, creating families of applications specific service
processorS. number
System-on-Chip (SoC) designs A number ofbecome
of modern electronics systems. increasingly
force of a
the drivingintegrate
key technologies togetherin
forming the highly complex embedded platform.
TECHNICAL PUBLICATIONs an up-thrust for knowledge
Protocols
Embedded Systems
andIloT Design 9-25 loT Architecture and
Unmanned Aerial Vehicle
9.4.6
Drone, is an airborne
Unmanned Aerial Vehicle (UAV), popularly known as
autonomously by
system or an aircraft operated remotely by a human operator or
an onboard computer.
An Unmanned Aerial System has three components:
system which is usually on the
1. An autonomnous or human-operated control
ground or a ship but may be on another airborne platform;
2. An Unmanned Aerial Vehicle (UAV);
sometimes referred to as a
3. A command and control (C2) system
two.
communication, command and control (C3) system -to link the
e UAVS. Fig. 9.4.2 shows UAV.
Datalink Avionics
Gimball control
Flight control
systems
imaging
Radar
vehicle block diagram
Fig. 9.4.2 Unmanned aerial
Eastern
Remote Sensing (UAV-RS) is the new addition to the North
UAV based mapping and real time
(NE-SAC) for large-scale
Space Applications Centre
of various applications.
assessnentand monitoring activities
is a multi-mission Unmanned Aerial Vehicle with day/night capability
Nishant
surveillance and reconnaissance, target tracking & localization.
used for battlefield
correction. A sophisticated image processing system is used for
and artillery fire UAV. It s launched using a Mobile
transmitted from the
analyzing the images
Hydro pneumaticLauncher.
TECHNICAL PUBLICATIONS an up-thrust for knowledge
loT
Embedded Systems and loT Design 9-26
Architecture and
UAVS are now capable of carrying out renmote sensing,
remote Protocols
delivery and a lot more. UAV networks are many times used monifortoring, courier
missions. There have been many attacks on civiliarn,
that were carried out using remnotely controlled or automated.
military, and
industrialunmanned
targets
UAVS can be categorized into fixed wing, multi-Totor, flapping and vertical flier
kinds. Recently, many challenging tasks have been carried out using UAVS
patrolling, border surveillance and wildfire monitoring. such as
In the civilian sector, UAVs are currently used as toys, hobby aircraft,
research flight platforms. They have been employed in such tasks as and
wildlife control and population monitoring and are expected to airportto
autonomous crop surveying, atmospheric weather monitoring and search an contribute
rescue missions.
9.5 Domain Specific loTs
Nowadays, Internet of Thingsplays a vital role in industry, policy and engineering
circles. IoT system is contained in a large number of networked products, systems
and sensors. The revolution of IoT creates new market
opportunities and business
models by considering the security, privacy and technical interoperability aspects.
IoT - enabled products like smart appliances, smart vending
machine, smart
lighting and smnart payments system offer more security, privacy and energy
efficiency to the user. There are vast numbers of IoT applications including home
automation, environment monitoring, healthcare applications, wearable devices
which are available.
9.5.1 Inventory Management in Retail
Retail involves the sale of goods from a single point (malls,
markets, department
stores etc) directly to the consumer in smnall quantities for his
end use.
Retail is a challenging business but the pressures of today's
are resulting in even more selective economic conditions
consumer shopping and spending
The effect of internet of things on inventory
progress when it comes to Business Process management
is the next huge thing
Management (BPM).
" In any typical business, the
process of
good is aday to day requirement. As withordering, storing, tracking and managing
all high investment top-tier business
this process becomes more
demand.
complex with increasing amount of suppy
TECHNICAL PUBLICATIONS® - an up-thrust for knowledge
Fmbeddeo¡Systems
and loT Design 8- 25 Processes and Operating Systems
ReviewQuestions
Describe any two scheduling policies used in multiprocess environment.
1.
AU: Dec.-12, Marks 6
Discuss about the various
2. Explain the principle of priority based context svitching mechanism.
priority based scheduling algorithms. AU : May-13, Marks 16
a Describe in detail about the scheduling policies uwith suitable examples.
AU: Dec.-14, Marks 16
4 Explain in detail rate monotonic scheduling with an example. AU: Dec.-16, Marks 8
Bs Interprocess Communication Mechanisms AU : Dec.-12, 13, May-13
Exchange of data between two or more separate, independent processes/threads is
possible using IPC. Operating systems provide facilities/resources for Inter-Process
Communications (PC), such as message queues, semaphores and shared memory.
" AComplex programming environment often uses multiple cooperating processes to
perform related operations. These processes must communicate with each other
and share resources and information. The Kernel must provide mechanisms that
make this possible. These mechanisms are collectively referred to as interprocess
communication.
Distributed computing systems make use of these facilities/resources to provide
Application Programming Interface (API) which allows IPC to be programmed at
a higher level of abstraction. (e.g, send and receive).
" Five types of inter-process communication are as follows :
1. Shared memory permits processes to communicate by simply reading and
writing to a specified memory location.
2. Mapped memory is similar to shared memory, except that it is associated with
a file in the file system.
3. Pipes permit sequential communication from one process to a related process.
4. FIFOs are similar to pipes, except that unrelated processes can communicate
because the pipe is given a name in the file system.
5. Sockets support communication between unrelated processes even on different
computers.
TECHNICAL PUBLICATIONS - an up-thrust for knowledge
Embedded Systems and loT Design 8-26
Processes and
Name Description Scope
Operating: Systern.
Use
File Data is written to and read from a typical Local
UNIX file. Sharing large data
Sets.
Any number of processes can interoperate.
Pipe Data is transferred between two proceSses Local
using dedicated file descriptors.
Simple data
sharing, such as
producer and
Communication occurs only between
Consumer,
parent and child process.
Named Data is exchanged between processes via Local
pipe
dedicated file descriptors.
Producer and
Consumer or
Communication can occur between any two
peer processes on the same host.
command-and-contr
ol, as demonstrated
with MySQL server
and its
command-line
query utility.
Signal An interrupt alerts the application to a Local Cannot
specific condition.
transfer
data in a signal, so
mostly useful for
process
management.
Shared Information is shared by reading and Local
memory writing from Commnon segment of Cooperative
of any
work
kind,
memory. especially if security
is required.
Socket After special setup, data is transferred Local or Network services
using common input/output operations. remote such as FTP, ssh,
and the Apache
Web Server.
Table 8.5.1 Interprocess communication in UNIX
" Purposes of IPC
1. Data transfer : One
process may
wish to send data to another process.
User User
procesS$es proceSses
2. Sharing data : Multiple
processes
may wish to operate on shared
data, such that if a process Kemel
modifies the data, that change IPC on same host
will be immediately visible to
other processes sharing it. User User
processes processes
3. Event
modification : A process
may wish to notify another
process or set of processes that Kernel Kernel
Some event has occurred. IPC on different hosts
Fig. 8.5.1 IPC on different hosts
TECHNICAL PUBLICA TIONs an up-thrust for knowledge
EmbeddeadSystemsS andloT Design Systoms
8-27 Procossos ond Oporal1ng
4. Resource sharing : The Kernel provides default semantics for resource
allocation; they are not suitable for all
application.
Process control : A process such as a complete
5. debugger may wish to assume
control over the execution of another process.
[Link] two forms : IPC on same host and IPC on different hosts.
used for two functions :
PCis
Synchronization : Used to coordinate access to resources among processes and also
) to coordinate the execution of these processes. They are record locking,
Semaphores, mutexes and condition variables.
Used when processes wish to exchange information. Message
2) Message passing : shared
passing takes several forms such as : Pipes, FIFOs, Message queues and
memory.
8.5.11 Features of Message Passing
1. Simplicity : Message passing system should be simple and easy to use. It should
be possible to commuricate with old and new applications.
2. Uniform semantics : Message passing is used for two types of IPC.
a. Local communication : Communicating processes are on the same node.
b. Remote communication :Communicating processes are on the different nodes.
3. Efficiency : PC become so expansive if message passing system is not effective.
Users try avoiding to IPC for their applications. Message passing system will
become more efficient if we try to avoid more message exchanges during
communication process. For examples :
a. Avoiding the costs of establishing and terminating connection.
b. Minimizing the costs of maintaining the connections.
c. Piggybacking of acknowledgement.
4. Reliability : Distributed systems are prone to different catastrophic events such as
node crashes or physical link failures. Loss of message because of communication
link fails. To handle the loss messages, we required acknowledgement and
retransmission policy. Duplicate message is one of the major problerns. This
happens because of timeouts or events of failures.
5. Correctness: Correctness is a feature related to IPC protocols for group
Communication. Issues related to correctness are as follows :
be delivered to
1. Atomicity : Every message sent to a group of receivers will
either all of thenm or none of them.
ii. Ordered delivery : Messages arrive to all receivers in an order acceptable to the
applicatiorn.
TECHNICAL PUBLICA TIONs an up-thrust for knowledge
Embedded Systems and loT Design 8-28 Processes and
Operating
iii. Survivability : Messages will be correctly delivered despite partial fai Systerns
processes, machine or communication links.
6. Security : Message passing system must provide a secure end
failure s of
communication. to end
7. Portability : Message passing system should itself be portable.
8.5.2 IPC Message Format
Message passing system requires the synchronization andcommunication
the two processes. Message passing used as a method of
microkernels. Message passing systems come in many forms. communi c betiowneenin
at
process can be either fixed or variable size. The actual furnction ofMessages sent by a
is normally provided in the form of a pair of primitives. passing message
a) Send
(destination_name, message)
b) Receive (source_name, message)
Send primitive is used for sending a message to
destination. Process sends
information in the form of a message to another process designated by a
destination. A process receives information by executing the receive primitive.
which indicates the source of the sending process and the message.
Design characteristics of message system for IPC.
1. Synchronization between the process
2. Addressing
3. Format of the message
4. Queueing discipline.
Issues in IPC by Message Passing
Messageis a block of information.
A message is a mearingful formatted block of information sent by the sender
process to the receiver process.
The message block consists of a fixed length header followed by a variable size
collection of typed data objects.
The header block of a mnessage may have the following elements:
1. Address : A set of characters that uniquely identify both the sender and receiver.
2. Sequence number : It is the message identifier to identify duplicate ana 0st
messages in case of system failures.
3. Structural information : It has two parts. The type part that specifies whether
data to be sent to the receiver is included within the message or the messa8e
contains a pointer to the data. The second part specifies length of the variable-size
message.
TECHNICAL PUBLICATIONS an up-thrust for knowledge
FbodbieoSystems andIloT Design 8- 29 Processes and Operating Systems
shows the typical message format.
Fig 8.5.2
Structural information Addresses
Actual data
or pointer Number of Sequence
to the data
number Receiving | Sending
bytes/ Type or message ID process process
elements address addréss
e Variable - Fixed-length header
s0ze collection
of typed data
Fig. 8.5.2 Message structure
Some important 1ssues to be considered for the design of an IPC protocol based
message passng system :
iThe sender's identity
ii. The receiver's identity
ii. Number of receivers
iv. Guaranteed acceptance of sent messages by the receiver
v. Acknowledgement by the sender
vi. Handling system crashes or link failures
vi. Handling of buffers
vii. Order of delivery of messages.
8.5.3 IPC Synchronization
Send operation can be synchronous or asynchronous. Receive operation can be
blocking or nonblocking.
Sender and receiver process can be blocking mode or nonblocking mode. Different
possibility of sender and receivers are as follows :
1. Blocking send, blocking receive.
2. Nonblocking send, block receive.
3. Nonblocking send, Nonblocking receive.
Blocking send, blocking receive
Blocking send must wait for the receiver to receive the message. synchronous
Communication is an example of blocking send. Both processes (sender and
Leceiver) are blocked untill the message is delivered.
Rendezyous : Sending a message to another process leaving the sender process
uSpended until the message is received and processed.
TECHNICAL PUBILICATIONS - an up-thrust for knowledge
Embedded Systems and loT Design 8-30 Processes and
Operating
Nonblocking send, blocking receive
Systens
blocked until
Sender is free to send the messages but receiver is the
message arrives. requested
Asynchronous communication is an example of nonblocking send.
communication with nonblocking sends increases throughput by
that processes spend waiting.
Asynchrtheonoustimne
reducing
Natural concurrent programming task uses the nonblocking send. Nonhl
send is the overhead on the programmer for determine that a message has been
received or not.
8.5.4 Shared Memory
A region of mnemory that is shared by co-operating processes is established
Processes can then exchange information by reading and writing data to h
shared region.
Shared memory allows maximum speed and convenience of communication, as i
can be done at memory speeds when within a computer. Shared memory is faster
than message passing, as message-passing systems are typically implemented
using system calls and thus require the more time-consuming task of Kernel
intervention.
In contrast, in shared-memory systems, system calls are required only to establish
shared-memory regions.
Once shared memory is
Client Shared memory Server
established, all accesses
are treated as routine
memory accesses, and no
assistance from the
Kernel is required.
Kernel
Fig. 8.5.3 shows client/
server with shared Input file
Output file
memory.
Fig. 8.5.3 Client server with shared memory
Advantages
1. Good for sharing large amount of data. 2. Very fast.
Limitations
1. No synchronization provided - applications must create their own. file into the
2. Alternative to shared memory is mmap system call, which maps
address space of the caller.
TECHNICAL PUBLICATIONS - an up-thrust for knowiedge