0% found this document useful (0 votes)
2 views19 pages

Unit 2

Unit II covers embedded C programming and memory organization of the 8051 microcontroller, detailing its program and data memory structures. It discusses interfacing techniques for keyboards, analog to digital converters, external memory, and stepper motors, as well as the role of embedded operating systems in various devices. The document also outlines the types and examples of embedded operating systems, emphasizing their specialized functions in devices like ATMs, cellphones, and industrial control systems.

Uploaded by

Akilan LH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views19 pages

Unit 2

Unit II covers embedded C programming and memory organization of the 8051 microcontroller, detailing its program and data memory structures. It discusses interfacing techniques for keyboards, analog to digital converters, external memory, and stepper motors, as well as the role of embedded operating systems in various devices. The document also outlines the types and examples of embedded operating systems, emphasizing their specialized functions in devices like ATMs, cellphones, and industrial control systems.

Uploaded by

Akilan LH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Unit II EMBEDDED C PROGRAMMING

MEMORY ORGANISATION:
• The 8051 has a separate memory space for programs (Code) and data.
• Program memory stores the programs to be executed, while data memory stores the
data like intermediate results, variable and constants required for the execution of the
program.

External Program (Code) Memory


• The executable program is stored in this code memory.
• The code memory size is limited to 64KBytes (in a standard 8051).
• The code memory is read-only in normal operation and is programmed under special
conditions. e.g. it is a PROM or a Flash RAM type of memory.
External RAM Data Memory
• This is read-write memory and is available for storage of data. Up to 64KBytes of
external RAM data memory is supported (in a standard 8051).
Internal Memory
The 8051’s on-chip memory consists of 256 memory bytes organized as follows:
The first 128 bytes of internal memory is organized as shown in figure 2, and is referred
to as Internal
RAM, or IRAM.
Figure : Organization of Internal RAM (IRAM) memory
Register Banks: 00h to 1Fh
The 8051 uses 8 general-purpose registers R0 through R7 (R0, R1, R2, R3, R4, R5, R6,
and R7).
These registers are used in instructions such as:
ADD A, R2 ; adds the value contained in R2 to the accumulator
Bit Addressable RAM: 20h to 2Fh
• The 8051 supports a special feature which allows access to bit variables.
• This is where individual memory bits in Internal RAM can be set or cleared.
• In all there are 128 bits numbered 00h to 7Fh.
• Being bit variables any one variable can have a value 0 or 1.
• A bit variable can be set with a command such as SETB and cleared with a command
such as CLR.
General Purpose RAM: 30h to 7Fh
• These 80 bytes of Internal RAM memory are available for general-purpose data
storage.
• Access to this area of memory is fast compared to access to the main memory and
special
instructions with single byte operands are used.
• However, these 80 bytes are used by the system stack and in practice little space is left
for general storage.
• The general purpose RAM can be accessed using direct or indirect addressing modes.
SFR Registers
• The SFR registers are located within the Internal Memory in the address range 80h to
FFh, as shown in figure 3.
• Each SFR has a very specific function.
• Each SFR has an address (within the range 80h to FFh) and a name which reflects the
purpose of the SFR.
• Although 128 byes of the SFR address space is defined only 21 SFR registers are
defined
in the standard 8051.
• Undefined SFR addresses should not be accessed as this might lead to some
unpredictable results.
• Note some of the SFR registers are bit addressable. SFRs are accessed just like normal
Internal RAM locations.
Figure. SFR Register Layouts
1. Interfacing a Microprocessor to Keyboard

The key board interfaced is a matrix keyboard. This key board is designed with a particular rows
and columns. These rows and columns are connected to the microcontroller through its ports of
the micro controller 8051. We normally use 8*8matrix key board. So only two ports of 8051 can
be easily connected to the rows andcolumns of the key board.
Whenever a key is pressed, a row and a column gets shorted through that pressed key and all the
other keys are left open. When a key is pressed only a bit in the port goes high which indicates
microcontroller that the key is pressed. By this high on
the bit key in the corresponding column is identified.
Once we are sure that one of key in the key board is pressed next our aim is to identify that
key. To do this we firstly check for particular row and then we check the corresponding column
the key board.
To check the row of the pressed key in the keyboard, one of the row is made high by making one of
bit in the output port of 8051 high . This is done until the row is found out.
Once we get the row next job is to find out the column of the pressed key. The column is
detected by contents in the input ports with the help of a counter. The content of the input port is
rotated with carry until the carry bit is set.
The contents of the counter are then compared and displayed in the display. This displayis designed
using a seven segment display and a BCD to seven segment decoder IC 7447. The BCD equivalent
number of counter is sent through output part of 8051 displays thenumber of pressed key.

Fig 5.1 Interfacing Keyboard to 8051 Microcontroller

1.1 Interfacing Analog to Digital Data Converters


• In most of the cases, the PPI 8255 is used for interfacing the analog to digital converters
with microprocessor.
• The analog to digital converters is treaded as an input device by the microprocessor, that
sends an initializing signal to the ADC to start the analogy to digital data conversation process.
The start of conversation signal is a pulse of a specific duration.
• The process of analog to digital conversion is a slow process, and the microprocessor
has to wait for the digital data till the conversion is over. After the conversion is over, the ADC
sends end of conversion EOC signal to inform the microprocessor that the conversion is over
and the result is ready at the output buffer of the ADC. These tasks of issuing an SOC pulse to ADC,
reading EOC signal from the ADC and reading the digital output ofthe ADC are carried out by the CPU
using 8255 I/O ports.
• The time taken by the ADC from the active edge of SOC pulse till the active edge of
EOC signal is called as the conversion delay of the ADC.
• It may range anywhere from a few microseconds in case of fast ADC to even a few
hundred milliseconds in case of slow ADCs.
• The available ADC in the market use different conversion techniques for conversion
of analog signal to digitals. Successive approximation techniques and dual slope
integration techniques are the most popular techniques used in the integrated ADC chip.
• General algorithm for ADC interfacing contains the following steps:
1. Ensure the stability of analog input, applied to the ADC.
2. Issue start of conversion pulse to ADC
3. Read end of conversion signal to mark the end of conversion processes.
4. Read digital data output of the ADC as equivalent digital output.
5. Analog input voltage must be constant at the input of the ADC right from the
start of Conversion to of conversion till the end of the conversion to get correct
results. This may be ensured by a sample and hold circuit which samples the
analog signal and holds it constant for a specific time duration. The
microprocessor may issue a hold signal to the sample and hold circuit.
6. If the applied input changes before the complete conversion process is over,
the digital equivalent of the analog input calculated by the ADC may not be
correct.
ADC 0808/0809:
The analog to digital converter chips 0808 and 0809 are 8-bit CMOS,
successive approximation converters. This technique is one of the fast
techniques for analog to digital conversion. The conversion delay is 100μs at
a clock frequency of 640 KHz, which is quite low as compared to other
converters. These converters do not need any external zero or full scale
adjustments as they are already taken care of by internal circuits.

Fig.5.2 Interfacing ADC with 8255 and Microcontroller

These converters internally have a 3:8 analog multiplexers so that at a time eight different analog
conversion by using address lines - ADD A, ADD B, ADD C. Using these address inputs,
multichannel data acquisition system can be designed using a singleADC. The CPU may drive these
lines using output port lines in case of multichannel applications. In case of single input applications,
these may be hardwired to select the proper input.
There is unipolar analog to digital converters, i.e. they are able to convert only positive
analog input voltage to their digital equivalent. These chips do not contain any internal
sample and hold circuit. If one needs a sample and hold circuit for the conversion of fast signal
into equivalent digital quantities, it has to be externally connected at each of the analog inputs.
1.2 External Memory Interface:

Fig.5.3 Interfacing External Memories with Microcontroller

8031 chip is a ROM less version of the 8051. In other words, it is exactly like any member of the 8051 family
such as the 8751 or 89C51 as far as executing the instructions and features are concerned, but it has no on-
chip ROM. Therefore, to make the 8031 execute 8051 code, it must be connected to external ROM memory
containing the program code. In this section we look at interfacing the 8031 microcontroller with external
ROM. Before we discuss this topic, one might wonder why someone would want to use the 8031 when they
could buy an 8751, 89C51, or DS5000. The reason is that all these chips have a limited amount of on-chip
ROM. Therefore, in many systems where the on-chip ROM of the 8051 is not sufficient, the use of an 8031 is
ideal since it allows the program size to be as large as 64K bytes. Although the 8031 chip itself is much cheaper
than other family members, an 8031-based system is much more expensive since the ROM containing the
program code is connected externally and requires more supporting circuitry, as we explain next. First, we
review some of the pins of the 8031/51 used in external memory interfacing.
EA pin
In 8751/89C51/DS5000-based systems, we connect the EA pin to Vcc to indicate that the program code is
stored in the microcontroller’s on-chip ROM. To indicate that the program code is stored in external ROM,
this pin must be connected to GND. This is the case for the 8051-based system. In fact, there are times when,
due to repeated burning and erasing of on-chip ROM, its UV-EPROM is no longer working. In such cases one
can also use the 8751 (or 89C51 or any 8051) as the 8031. All we have to do is to connect the EA pin to ground
and connect the chip to external ROM containing the program code.
1.3 Stepper Motor Interface

The complete board consists of transformer, control circuit, keypad and stepper motor as shown in
snap.
The circuit has inbuilt 5 V power supply so when it is connected with transformer it willgive the
supply to circuit and motor both. The 8 Key keypad is connected with circuit through which user can
give the command to control stepper motor. The control circuitincludes micro controller 89C51,
indicating LEDs, and current driver chip ULN2003A.One can program the controller to control the
operation of stepper motor. He can give different commands through keypad like, run clockwise, run
anticlockwise, increase/decrease RPM, increase/decrease revolutions, stop motor, change the mode,
etc.

Unipolar stepper motor: - unipolar stepper motor has four coils. One end of each coil is tied together
and it gives common terminal which is always connected with positive terminal of supply. The other
ends of each coil are given for interface.
By means of controlling a stepper motor operation we can
1. Increase or decrease the RPM (speed) of it
2. Increase or decrease number of revolutions of it
3. Change its direction means rotate it clockwise or anticlockwise
To vary the RPM of motor we have to vary the PRF (Pulse Repetition Frequency). Number
of applied pulses will vary number of rotations and last to changedirection we have to change pulse
sequence.
So all these three things just depend on applied pulses. Now there are three different modes to rotate
this motor
1. Single coil excitation
2. Double coil excitation
3. Half step excitation

Fig.5.4 Stepper motor control board circuit


2. Embedded Operating System

What is an embedded operating system?


An embedded operating system is a specialized operating system (OS) designed to perform a
specific task for a device that is not a computer.
– The main job of an embedded OS is to run the code that allows the device to do its job.
The embedded OS also makes the device's hardware accessible to software that is
running on top of the OS.
– An embedded OS often works within an embedded system.
– An embedded system is a computer that supports a machine.
– It performs one task in the bigger machine. Examples include computer systems in cars,
traffic lights, digital televisions, ATMs, airplane controls, point of sale (POS) terminals,
digital cameras, GPS navigation systems, elevators and Smart meters.
– Networks of devices containing embedded systems make up the internet of things (IoT).
The embedded systems perform basic operations inside IoT devices, such as
transferring data over a network without human interaction.

How does an embedded OS work?


An embedded OS enables an embedded device to do its job within a larger system. It
communicates with the hardware of the embedded system to perform a specific function.
– For example, an elevator might contain an embedded system, such as
a microprocessor or microcontroller, that lets it understand which buttons the
passenger is pressing. The embedded software that runs on that system is the embedded
OS.
– In contrast to an OS for a general-purpose computer, an embedded OS has limited
functionality. Depending on the device in question, the system may only run a single
embedded application. However, that application is likely crucial to the device's
operation. Given that, an embedded OS must be reliable and able to run with constraints
on memory and processing power.
– In the case of a Raspberry PI system on a chip, an SD card acts as the device's hard
drive and contains the code that runs on the device. The SD card is removable, so its
contents can be modified on demand. Various operating systems can run on Raspberry
PI devices. The embedded OS makes the device's hardware -- such as USB and HDMI
ports -- accessible to the application running on top of the OS.

Examples of embedded OS devices


Some examples of devices with embedded OSes include the following:
• ATMs

• cellphones

• electric vehicles

• industrial control systems (ICS)

• Arduino-based devices

Arduino is an open source platform with a microcontroller that processes simple inputs, such
as temperature or pressure, and turns them into outputs. These devices have a basic embedded
OS that acts like a boot loader and a command interpreter.
An example of an Arduino-based device is a remote control car. The Arduino reads inputs from
the car's controller and sends output information and commands to other components, such as
the brakes.

Common uses of embedded OSes


Embedded OSes are put to a variety of uses, including the following:
• ATMs. ATMs have basic OSes that enable the machine to read a user's debit card and
personal identification number input and perform bank account functions like withdrawal
or checking balances. The OS does little else but react to user inputs and communicate
with the ATM hardware.
• Cellphones. Cellphones require an OS like Android or iOS to boot the phone and enable
applications to communicate with other phone hardware.
• Electric vehicles. Microcontrollers host embedded OSes that handle functions like braking
or pressure sensing. For example, a certain amount of pressure on the front bumper may
cause the airbag to go off. This type of function is known as reactive operation because it
reacts to an input.
• Industrial control systems. Sensors are used in industrial control systems to measure
factory conditions and send alerts if they become dangerous. Sensors contain an embedded
OS that enable them to perform these tasks.
• Traffic lights. Embedded OSes enable a traffic light to cycle through different signals at
programmed intervals.
• Basic input/output system. In some cases, BIOS could be considered an embedded OS
because it is the firmware that enables a desktop computer's more complex OS to interact
with the computer hardware.

Types of embedded OSes


Embedded OS are designed for the task they will perform. The various types of operating
systems include the following:
• Multitasking operating system. A multitasking OS can perform several tasks at once. It
uses job scheduling to perform basic tasks. For example, a cellphone OS divides up CPU
resources among multiple tasks.
• Real-time operating system. A real-time OS is designed to be reactive. It processes
inputs when they are received and responds within a specific timeframe. If the response
time falls outside of the specified time period, the system could fail. Real-time OSes
sometimes use rate monotonic scheduling, which assigns priorities to tasks.
• Single loop control system. This type of embedded OS exercises control over a single
variable. An example would be temperature control in a smart home. A smart thermostat
measures the temperature in the house and if it exceeds the limit set by the user, turns off
the heat.

Advantages Embedded OS
The advantages of embedded operating system are as follows −
– Portable
– Much faster than other operating systems
– Less Hardware requirement
– Highly Predictable

Disadvantages
The disadvantages of embedded operating system are as follows −
– Less optimization
– High modification is required
– Customization is time taking process

Embedded vs. non-embedded OS: What's the difference?


– An embedded OS may reside on a chip within an electronic device. They are often
limited in the scope of what they can do.
– In contrast, a non-embedded OS runs from a hard disk or a solid-state drive. Non-
embedded OSes, such as Windows 10 or Mac OS, are configurable and upgradable.
They are designed for general-purpose use.
– Another difference between embedded and non-embedded OSes is in how the operating
system is coded. Embedded OSes are usually contained in a single executable image
and execute one task. Desktop operating systems and network operating systems
contain many applications.
– Embedded OSes also have a minimal or no user interface (UI). Embedded OSes, on the
other hand, have a more dynamic UI.
– Embedded OSes and devices play a large part in the internet of things.

Multitasking Operating System


Multitasking refers to the simultaneous execution of multiple tasks (such as processes,
programs, threads, and so on). Multi-tasking allows us to play a game, write code in a code
editor, and surf the internet all at the same time on modern operating systems.

Why Multitasking Operating System?


Although multitasking was not completely enabled in early operating systems, they could
not run many programs at once. As a result, a single piece of software might use the entire CPU
of the computer to complete a task. The user was unable to do other operations, such as opening
and shutting windows, because basic operating system capabilities, such as file copying, were
disabled. Because modern operating systems provide comprehensive multitasking, multiple
programs can run simultaneously without interfering with one another. Furthermore, many
operating system processes can operate concurrently.

What is a Multitasking Operating System?


A multitasking operating system is a logical extension of multi-programming. Multitasking
operating system varies from multiprogramming in that multi-programming relies simply on
the concept of context switching, whereas multitasking operating system incorporates time-
sharing as well as context switching.

Types of Multitasking Operating Systems


Multitasking operating systems can be divided into three categories. The following are some
examples:
1. Preemptive Multitasking
2. Cooperative Multitasking
3. True Multitasking

1. Preemptive Multitasking:
Preemptive multitasking is a task that a computer operating system is given. It determines how
much time one job spends on the operating system before assigning another process to use it.
The operating system is referred to as preemptive because it controls the entire operation.
Preemptive multitasking is used in desktop operating systems. Unix was the first operating
system to implement this multitasking technique. The first versions of Windows to implement
preemptive multitasking was Windows NT and Windows 95. In OS X, proactive multitasking
was added to the Macintosh. This operating system notifies the programs when another
application is ready to take over the CPU.

2. Cooperative Multitasking:
A cooperative multitasking operating system is referred to as 'Non-Preemptive Multitasking.'
The basic goal of cooperative multitasking is to complete the current work while allowing
another process to execute. taskYIELD() is used to complete this task. Context-switch is called
when the taskYIELD() function is called.
Cooperative multitasking operating system was utilized by Windows and macOS. When a
Windows program receives a message, It will do some quick work before handing over the
CPU to the operating system until another message arrives. It worked perfectly as long as all
of the programs were bug-free and designed with other programs in mind.

3. True Multitasking:
A true multitasking operating system is the ability to execute and process many tasks
simultaneously without delay, rather than switching work from one processor to another. A true
Multitasking operating system has the ability to conduct several tasks simultaneously while
underlying the H/W or S/W.
Advantages of Multitasking Operating System
The following are some of the advantages of a multitasking operating system:
S.
Type Description
No.
All jobs are given a defined amount of time, so they don't have to wait
1 Time Shareable
for the CPU.
Multitasking operating systems have the best virtual memory system.
Any program does not require a long wait time to perform its tasks
2 Virtual Memory
because of virtual memory; if this problem arises, those applications are
shifted to virtual memory.
Multitasking operating systems have well-defined memory management
3 Secured Memory since they do not provide any types of permissions for undecided apps to
consume memory.
Multiple users are better satisfied with multitasking operating systems
4 Good Reliability because they provide more flexibility. Every user can easily run single or
numerous programs on a multitasking operating system.
This operating system is better adapted to support several users at once,
Manage Several
5 and multiple apps can run simultaneously without slowing down the
Users
system.
Optimize A multitasking operating system may manage the resources of several
6 Computer computers, including RAM, input/output devices, CPU, hard disc, and so
Resources on.
Background processes can operate more efficiently under a multitasking
Background operating system. Most users are unaware of these background processes,
7
Processing although they aid the smooth operation of other programs such as
firewalls, antivirus software, and others.
Users can run multiple programs at once, including an internet browser,
Use Multiple
8 a code editor, Microsoft Word, Microsoft Excel, PowerPoint, games, and
Programs
other utilities.
Disadvantages of Multitasking Operating System
The following are some of the disadvantages of multitasking operating system:
S.
Type Description
No.
Because of the poor speed of its processors, the system may run applications
Processor slowly, and their reaction time may increase when processing many
1
Boundation programs. More computing power is necessary to solve the processing
foundation challenge.
In a multitasking operating system, the CPU generates more heat since
2 CPU Heat up
multiple processors are engaged at the same time to execute any task.
The computer's performance may suffer as a result of many programs
running at the same time, as the main memory becomes overloaded when
Memory multiple programs are loaded. Reaction time grows since the CPU is unable
3
Boundation to give distinct times for each program. The usage of low-capacity RAM is
the primary cause of this problem. As a result, the RAM capacity can be
increased to meet the requirements.

Examples of Multitasking Operating Systems


Some examples of multitasking operating systems are as follows:
• Windows XP: Microsoft's Windows NT operating system has been updated with
Windows XP. For professional users, it is the immediate successor to Windows 2000,
whereas, for residential users, it is Windows Me.
• Windows Vista: Microsoft's Windows Vista is a version of the Windows NT operating
system. It was the direct successor to Windows XP, which had been launched five years
prior, marking the longest period between successive Microsoft Windows desktop
operating system releases at the time.
• Windows 7: Windows 7 is the latest version of Microsoft's Windows NT operating
system. On July 22, 2009, it was launched to manufacture, and on October 22, 2009, it
was made commercially available. It succeeds Windows Vista, which was introduced
approximately three years ago.
• Windows 8: Windows 8 is the latest version of Microsoft's Windows NT operating
system.
• Windows 10: Microsoft's Windows NT operating system has been updated with
Windows 10. It's the immediate successor to Windows 8.1, which came out over two
years ago.
• Windows 2000: Microsoft's Windows 2000 is a major release of the Windows NT
operating system geared toward enterprises. It was Windows NT 4.0's direct successor.
• IBM’s OS/390: The IBM operating system for System/390 mainframe systems is
OS/390.
• UNIX: Unix is a multitasking, multiuser computer operating system derived from the
original AT&T Unix, which was developed by Ken Thompson, Dennis Ritchie, and
others at the Bell Labs research center in 1969.

Conclusion
• Multitasking is the process of performing multiple tasks simultaneously.
• In a multitasking operating system, the CPU switches between many tasks to
complete them.
• Isolation and memory protection is provided by multitasking operating systems.
• A multitasking operating system utilizes the concept of many processors.
• A multitasking operating system can run multiple tasks at the same time.
• In a multitasking operating system, context-switching and time-sharing are used.
• CPU idle time is significantly decreased in the multitasking operating system.
• 1 CPU is required in a multitasking operating system.

Real-Time Operating System (RTOS)


Real-time operating system (RTOS) is an operating system intended to serve real time
application that process data as it comes in, mostly without buffer delay.
– In a RTOS, Processing time requirement are calculated in tenths of seconds
increments of time.
– It is time-bound system that can be defined as fixed time constraints.
– In this type of system, processing must be done inside the specified constraints.
Otherwise, the system will fail.

Why use an RTOS?


Here are important reasons for using RTOS:
• It offers priority-based scheduling, which allows you to separate analytical processing
from non-critical processing.
• The Real time OS provides API functions that allow cleaner and smaller application
code.
• Abstracting timing dependencies and the task-based design results in fewer
interdependencies between modules.
• RTOS offers modular task-based development, which allows modular task-based
testing.
• The task-based API encourages modular development as a task, will typically have a
clearly defined role. It allows designers/teams to work independently on their parts of
the project.
• An RTOS is event-driven with no time wastage on processing time for the event which
is not occur
Components of RTOS

Components of Real Time Operating System

Here, are important Component of RTOS


(i) The Scheduler: This component of RTOS tells that in which order, the tasks can be
executed which is generally based on the priority.
(ii) Symmetric Multiprocessing (SMP): It is a number of multiple different tasks that can
be handled by the RTOS so that parallel processing can be done.
(iii) Function Library: It is an important element of RTOS that acts as an interface that
helps you to connect kernel and application code. This application allows you to send
the requests to the Kernel using a function library so that the application can give the
desired results.
(iv) Memory Management: this element is needed in the system to allocate memory to
every program, which is the most important element of the RTOS.
(v) Fast dispatch latency: It is an interval between the termination of the task that can be
identified by the OS and the actual time taken by the thread, which is in the ready queue,
that has started processing.
(vi) User-defined data objects and classes: RTOS system makes use of programming
languages like C or C++, which should be organized according to their operation.

Types of RTOS
Three types of RTOS systems are:
1. Hard Real Time
In Hard RTOS, the deadline is handled very strictly which means that given task must start
executing on specified scheduled time, and must be completed within the assigned time
duration.
Example: Medical critical care system, Aircraft systems, etc.
2. Firm Real time
These type of RTOS also need to follow the deadlines. However, missing a deadline may not
have big impact but could cause undesired affects, like a huge reduction in quality of a product.
Example: Various types of Multimedia applications.
3. Soft Real Time
Soft Real time RTOS, accepts some delays by the Operating system. In this type of RTOS,
there is a deadline assigned for a specific job, but a delay for a small amount of time is
acceptable. So, deadlines are handled softly by this type of RTOS.
Example: Online Transaction system and Livestock price quotation System.

Terms used in RTOS


Here, are essential terms used in RTOS:
– Task – A set of related tasks that are jointly able to provide some system
functionality.
– Job – A job is a small piece of work that can be assigned to a processor, and that may
or may not require resources.
– Release time of a job – It’s a time of a job at which job becomes ready for execution.
– Execution time of a job: It is time taken by job to finish its execution.
– Deadline of a job: It’s time by which a job should finish its execution.
– Processors: They are also known as active resources. They are important for the
execution of a job.
– Maximum It is the allowable response time of a job is called its relative deadline.
– Response time of a job: It is a length of time from the release time of a job when the
instant finishes.
– Absolute deadline: This is the relative deadline, which also includes its release time.

Features of RTOS
Here are important features of RTOS:
• Occupy very less memory
• Consume fewer resources
• Response times are highly predictable
• Unpredictable environment
• The Kernel saves the state of the interrupted task ad then determines which task it
should run next.
• The Kernel restores the state of the task and passes control of the CPU for that task.

Factors for selecting an RTOS


Here, are essential factors that you need to consider for selecting RTOS:
• Performance: Performance is the most important factor required to be considered
while selecting for a RTOS.
• Middleware: if there is no middleware support in Real time operating system, then
the issue of time-taken integration of processes occurs.
• Error-free: RTOS systems are error-free. Therefore, there is no chance of getting an
error while performing the task.
• Embedded system usage: Programs of RTOS are of small size. So we widely use
RTOS for embedded systems.
• Maximum Consumption: we can achieve maximum Consumption with the help of
RTOS.
• Task shifting: Shifting time of the tasks is very less.
• Unique features: A good RTS should be capable, and it has some extra features like
how it operates to execute a command, efficient protection of the memory of the system,
etc.
• 24/7 performance: RTOS is ideal for those applications which require to run 24/7.

Difference between in GPOS and RTOS


Here are important differences between GPOS and RTOS:

General-Purpose Operating System Real-Time Operating System


(GPOS) (RTOS)
It used for desktop PC and laptop. It is only applied to the embedded application.
Time-based scheduling used like round-robin
Process-based Scheduling.
scheduling.
Interrupt latency is not considered as Interrupt lag is minimal, which is measured in
important as in RTOS. a few microseconds.
No priority inversion mechanism is present in The priority inversion mechanism is current.
the system. So it cannot modify by the system.
Kernel’s operation may or may not be
Kernel’s operation can be preempted.
preempted.
Priority inversion remain unnoticed No predictability guarantees

You might also like