Narrator: In this lesson,
we're going to start talking about some embedded systems.
Now, when we talk about an embedded system,
this is a computer system that is designed
to perform a specific and dedicated function.
Now, oftentimes when we talk about an embedded system,
we're talking about things
more in the manufacturing space or automation space.
So we might have a microcontroller
in a medical drip system that has one job.
It's to measure the amount of volume of fluid
that goes through that machine and into your IV
so you can give the patient what they need.
You might have another one
for a control system at a water treatment plant.
And its responsibility is to make sure
that water is flowing through at a certain rate.
And they're going to open or close valves to make sure
we maintain that amount of flow through the system.
This is the idea of an embedded system.
And it can be a very, very simple device
or it can be fully complex
and have a full operating system like Linux or Android
being used to run these type of systems.
It just depends.
Now, in this particular lesson,
I'm going to focus more on the specific embedded systems
that have a single function
and they have their own dedicated operating system
or microprocessors to do that function.
For instance, at my house, I have a smart meter.
So if I go out to my side of my house,
I can look at the electric meter on my house
and it will tell me how many kilowatts per hour I am using
and how much I've used over time.
Now, this information is connected to the internet
so that the power company
doesn't have to send somebody to my house
to read this meter once a month.
Instead, it's all done electronically now.
They do this by using cellular modems
and it connects through the cellular network
back over the internet to their headquarters
and to their servers to feed in the data
of what we've used for power consumption.
If you look at your meter at your house,
you probably have something that looks pretty similar.
Now, these types of embedded systems
are considered static environments
where frequent changes are not made or allowed.
So when's the last time you upgraded the software
on your electric meter for instance?
You probably never have.
And the power company probably doesn't do it
very frequently either.
That's the idea of these embedded systems.
They are a very stripped-down system
that is made to do one purpose and one purpose only.
And by doing that, that helps them become more secure
because they don't have a lot of extra code.
But if that original code
wasn't made in place in a good state,
it makes it hard to do updates
because these things aren't built
to be able to get frequent software updates.
Because of this,
embedded systems often have very little support
for identifying and correcting security issues.
You can't call up the power company
and tell them to come secure your meter.
That's just not part of what they're going to do for you.
They're going to do it the way they want to do it
because it's their device.
And often if you have an embedded system inside your factory
or inside your plant, if you're in a manufacturing area,
you're going to have limited support from that manufacturer.
And so this is an area
where you really want to get all these devices
onto a separate network
and not have them connected back to the internet at large
where this could be a big area of vulnerability for you.
Now, when we talk about embedded systems,
there's a term called PLC,
which is a programmable logic controller.
This is a type of computer that's designed for deployment
in industrial or outdoor setting
and it can automate our modern mechanical systems.
Now, when you think about a PLC,
I want you to think of something like manufacturing
that's going to open or shut a valve
to let more or less water come in.
That's the idea of a PLC.
It is a programmable logic controller.
Now, these PLCs run on firmware
because, again, these are embedded systems.
So the firmware, which is software on a chip,
can be patched and reprogrammed
to fix vulnerabilities when they occur.
But again, there's a very specific process
and there's usually limited support from the manufacturer.
It's not like Microsoft
where they're going to give you a patch every Tuesday.
With these PLCs, you might get a patch every six months,
or a year, or two years.
There's usually a very long time in between patches.
Now, the other thing we want to talk about
is some of these operating systems they use.
So there's this thing known as an RTOS,
which is a real-time operating system.
Now, this is a type of operating system
that prioritizes deterministic execution of operations.
And this will help us to ensure consistent response
for time-critical tasks.
Now, think about this.
If you're running something that has to open or shut a valve
inside of a nuclear plant,
can you have the ability for that to be offline at any time?
Probably not, right?
Well, that's the idea of where we would use an RTOS,
a real-time operating system.
This is because a lot of our embedded systems
typically can't tolerate reboots or crashes
and they have to have these response times
that are predictable within milliseconds.
So if I'm building something
that's going to run parts of an airplane,
that's going to help my autopilot fly,
and with the autopilot needs to make adjustments
on the wings every couple of milliseconds,
well, that is something that we would want to use
a real-time operating system for.
We can't use a standard Windows system for that.
It's just not fast enough or powerful enough.
And it's subject to rebooting or crashing,
and it's security patches, and all that other stuff.
So RTOS, when you hear that term,
think about this as the type of operating system
that's often used with embedded systems,
especially in critical applications.
Now, another way we can do this
is using what's called a system-on-a-chip.
This is another form of embedded systems.
This is where our processor integrates
the platform functionality of multiple logical controllers
onto a single chip.
Now, this system-on-a-chip can be very power efficient
and therefore they're often used with smaller devices
that need to have an embedded system.
So if I need to create something
that's going to have an embedded system
and be very small that can fit in my pocket,
that would usually use something like a system-on-a-chip.
If you're using something like a Roomba
or robot vacuum cleaner,
those use a system-on-a-chip type of mentality
because they try to get all that information
put onto a single chip, 'cause again,
it takes up less space and therefore you can leave more room
for the functioning parts you need, such as the vacuum.
A system-on-a-chip refers to a kind of integrated circuit
that contains all the components of a computer system
on a single chip.
This includes your processor, the memory, the storage,
the graphics processor, and the peripherals,
things like USB controllers, power management circuits,
and wireless radios for wifi or Bluetooth.
A great example of a system-on-a-chip is the Raspberry Pi,
which contains a fully contained computer
that exists on a single chip.
Now, many of these system-on-a-chips
are going to be embedded into other devices
like smart TVs and set top boxes, like the Amazon Fire TV,
Roku, and Apple TV streaming devices.
System-on-a-chip designs have become really popular
because of their low power usage,
their decent performance, and the small form factor.
For example, if you have a Roku or Fire TV Stick,
those are the size of a USB thumb drive.
Yet they provide a fully working smart TV functionality
into any existing television
and they can process streaming video
over a wireless connection using these devices.