Final Project CS
Final Project CS
IT GIVES
COMPARATIVE STUDY OF FREERTOS AND WINDOWS CE WHICH ARE
THE TWO AMONG TOP REAL TIME OPERATING SYSTEMS USED IN
EMBEDDED SYSTEMS MARKET.
BY
Ishan Vaghani
1
Contents
1 Abstract 03 Manihas
2. Introduction 04 Manihas
3 Architecture 07 Ishan
6 Conclusion 25 Praharsha
7 References 26
2
Abstract
This project explains a thorough analysis of FreeRTOS and Windows CE, with a focus
on their compatibility with embedded real-time systems. It starts by delving into the
licensing models of both operating systems. By comparing FreeRTOS, which is freely
available thanks to its open-source nature, with Windows CE, a paid commercial
product, we can investigate the trade-off between the flexibility offered by community-
driven solutions and the reliability provided by dedicated vendor support.
This research explores the impact of each real-time operating system (RTOS) on
resource-constrained embedded systems. FreeRTOS, known for its lightweight kernel,
performs well in environments where memory and processing power are limited. On the
other hand, Windows CE, offering a wide range of features, might require more
resources, making it better suited for applications with abundant resources. When we
look at the support ecosystems of FreeRTOS and Windows CE, we notice striking
differences. FreeRTOS thrives due to its lively open-source community, which
encourages ongoing development and support from the community itself. On the other
hand, Windows CE relies on Microsoft's expert support, providing developers with a
well-organized and dependable environment for their projects.
As the analysis moves forward to assess the real-time determinism of each RTOS, it
becomes apparent that FreeRTOS stands out for its focus on deterministic behavior and
swift context switching. This makes it particularly beneficial in situations where precise
timing is of paramount importance. On the other hand, Windows CE does provide real-
time capabilities, but it may not demonstrate the same degree of determinism,
especially in critical applications.
3
Practical implications emerge from the analysis, guiding the selection of the most
appropriate RTOS based on project-specific requirements. FreeRTOS is recommended
for resource-constrained applications demanding real-time responsiveness, such as
IoT. Conversely, Windows CE is suitable for projects requiring a full-featured OS with
graphical interfaces, middleware support, and scalability, making it ideal for industrial
automation and medical devices.
This dilemma is best illustrated by the automotive sector, where microcontrollers are
thought to make up 33% of all semiconductors used in automobiles, with some models
having as many as dozens of microcontrollers. Consequently, the cost of producing cars
is increasing to levels only seen in the aerospace industry, where the chassis accounts
for one third of the vehicle's overall cost, the power plant for another, and the electronics
for the last third. Automakers have started using RTOS to operate the software that
powers their vehicles to improve their products and shorten development times. One
example is the electronic fuel injection system seen in cars, which had to be built in a
short amount of time. Before the next ignition can occur, sensors at each motorcycle
must determine the next mixture combination and monitor and inspect the combustion
exhaust gases. Furthermore, it is well known that RTOS are now included in even the
most basic motors, such those used in motorcycles.
Other instances are the more contemporary avionics control systems, which require an
operating system to use a single computer to operate several aircraft components.
utilizing segmentation techniques for both time and space. Task separation is referred
to as spatial partitioning in computer memory, while task scheduling and appropriate
processor time division are referred to as temporal partitioning. With the use of these
divisions, a single processor can handle multiple jobs at once without causing one
4
activity to interfere with another's ability to complete the work in the allotted time. This
method makes an airplane lighter by reducing the number of computers needed to
operate it.
More than a hundred RTOS options are available on the global market, and similar free
Linux operating system options are also available. This implies that choosing the
optimal method to employ may determine a project's success or failure, hence the study
needed to be conducted objectively and in accordance with the required standards.
FreeRTOS
FreeRTOS, which stands for Free Real-Time Operating System, is an open-source real-
time operating system designed primarily for embedded devices and microcontrollers. It
was created by Richard Barry and initially released in 2003. FreeRTOS's small size,
efficiency, and robust task management features make it a popular option for
developers creating embedded programs on low-resource systems.
Features of FreeRTOS
Task Management:
Developers can use FreeRTOS to prioritize their tasks and schedule them based on
those priorities. Tasks can talk to one another using message queues, semaphores,
and other synchronization mechanisms provided by FreeRTOS.
Memory Management:
FreeRTOS's memory allocation and deallocation strategies are tailored to work with
embedded devices that have limited memory resources. It offers heap management
tools for tasks requiring random memory allocation.
Interrupt Handling:
Programmers can develop interrupt service routines (ISRs) and effectively handle
interruptions with the help of the operating system's (OS) robust interrupt handling tools.
It is feasible to prioritize interruptions such that critical tasks do not be delayed by lower
priority interruptions.
5
Timers and Synchronization:
Portability:
FreeRTOS is very portable and supports a wide variety of microcomputer designs. For
simpler hardware platform adaptation, it provides porting layers and configuration
options.
Windows CE
Features of Windows CE
Windows CE offers a GUI environment that supports windows, menus, buttons, and
other UI elements. The Windows CE APIs for user interaction may be used by
developers to create visually rich applications.
Multimedia Support:
The operating system has multimedia capabilities that include playing music, generating
images, and rendering videos. Windows CE may therefore be utilized with embedded
devices that are rich in multimedia, including mobile terminals and kiosks.
6
Application Development:
Device Drivers:
Windows CE has networking protocols and APIs for network interface connections via
Ethernet, Wi-Fi, Bluetooth, and other methods. It supports TCP/IP networking, web
browsing, and network administration services.
1. Kernel
The kernel is the core component of an RTOS, responsible for the fundamental
operations of the system. It includes several key functionalities:
7
Task Management: Manages the creation, execution, and termination of tasks (also
called threads). The kernel ensures tasks are managed according to their priority levels
and deadlines.
Interrupt Handling: Interrupts are events that require immediate attention from the OS,
bypassing the normal scheduling process. RTOS kernels are optimized to handle
interruptions quickly and resume normal task execution with minimal delay.
2. Memory Management
Static Memory Allocation: Memory is often allocated at compile-time and remains fixed
during runtime, reducing overhead and ensuring predictability.
Dynamic Memory Allocation: Some RTOSes also support dynamic memory but with
mechanisms to handle fragmentation and ensure bounded allocation times.
Real-time clocks and timers provide the necessary time-related functionality required for
task scheduling and time-stamping events. Timers are crucial for periodic task
execution and for measuring time intervals with high precision.
Message Queues: Allow tasks to send and receive messages without being directly
connected, facilitating decoupled communication.
8
Semaphores and Mutexes: These are used for managing access to shared resources,
preventing race conditions, and avoiding deadlocks while ensuring mutual exclusivity in
resource usage.
5. Input/Output Management
Device Drivers: RTOSes include a range of device drivers that interact directly with
hardware peripherals.
Direct Memory Access (DMA): Supports offloading of I/O operations from the CPU,
allowing data transfers directly between I/O devices and memory.
APIs: Application Programming Interfaces allow for easier programming and integration
of software components.
RTOSes typically come with tools that aid in system configuration, debugging, and
performance analysis. These tools are crucial during the development and maintenance
phases of real-time applications.
FreeRTOS: A popular, lightweight RTOS that is known for its simplicity and extensive
support for different microcontroller architectures.
9
VxWorks: A more robust system used in critical systems ranging from aerospace to
industrial equipment.
RTOS in Embedded Linux: Uses the preemptive kernel patch to meet real-time criteria
while benefiting from Linux's extensive features.
Each RTOS has its nuances, but they all share the goal of providing deterministic and
timely responses to real-time applications. The architecture of an RTOS is designed to
minimize latency and maximize reliability in environments where timing is crucial.
Let us dive deeper into the fundamental components of the RTOS architecture,
focusing on the kernel, scheduler, task management, and other key elements:
1. Kernel
The kernel in an RTOS is the vital component responsible for managing the system's
resources and ensuring that applications meet their real-time constraints. It handles
critical tasks like task scheduling, interrupt management, and inter-task communication.
Key characteristics include:
Compact and Modular: RTOS kernels are typically designed to be compact and
modular, allowing for customization and scalability depending on the application
requirements.
Preemptive and Cooperative Multitasking: The kernel supports both preemptive and
cooperative multitasking, giving developers the flexibility to choose the scheduling
strategy that best fits their application's needs.
2. Scheduler
The scheduler is a critical component of the RTOS kernel, tasked with managing when
each task in the system should run:
10
Common Algorithms: Rate Monotonic Scheduling (RMS) and Earliest Deadline First
(EDF) are two popular scheduling algorithms used in RTOSes. RMS schedules tasks
based on a fixed priority assigned according to their periodic rates, whereas EDF
prioritizes tasks based on their deadlines.
3. Task Management
Managing tasks is a primary function of the RTOS, involving the creation, execution,
suspension, and termination of tasks:
Task States: A task in an RTOS can be in one of several states, such as Ready,
Running, Blocked, or Suspended. The transition between these states is managed by
the kernel based on task priorities and external events.
Context Switching: The kernel can switch CPU control from one task to another, a
process called context switching. This mechanism is optimized in RTOS to ensure
minimal overhead to maintain real-time performance.
4. Memory Management
Fixed Size Allocation Blocks: Many RTOSes use fixed-size memory blocks to simplify
memory management and eliminate fragmentation.
Memory Pools: Systems often allocate memory pools for dynamic memory
requirements, where the size and number of blocks are predefined to ensure quick and
deterministic memory allocation.
11
Message Queues: Enable tasks to send and receive messages. They are particularly
useful for passing data between producer and consumer tasks without requiring tight
coupling between tasks.
Mutexes: Like semaphores but designed specifically for mutual exclusion, ensuring that
only one task at a time can access a resource.
6. Interrupt Handling
Interrupt handling is a core feature of the RTOS kernel, designed to respond swiftly to
external events:
Interrupt Service Routines (ISRs): When an interrupt occurs, the RTOS immediately
executes a corresponding ISR, which is a short, low-level function designed to handle
the interrupt.
7. Input/Output Management
Direct Memory Access (DMA): Many RTOSes use DMA channels to handle data
transfers directly between peripherals and memory, minimizing CPU involvement and
ensuring efficient data handling.
12
Device Drivers: RTOSes provide a range of device drivers that interface directly with
hardware components. These are often written with real-time performance in mind to
minimize delays and overhead.
Efficient resource management and task scheduling are pivotal in the architecture of
Real-Time Operating Systems (RTOS) because they directly impact the system's ability
to meet stringent timing requirements and ensure system reliability. These aspects are
critical for applications where delays or mismanagement can result in system failures,
safety issues, or loss of critical data. Here, we explore the significance of these
components:
13
4.Maximization of Throughput: By optimizing the use of available system resources,
RTOS can handle more tasks within a given time limit. This is crucial in environments
where the system must process a high volume of data or events consistently.
3.Handling Sporadic and Aperiodic Tasks: Beyond periodic tasks, real-time systems
often need to manage sporadic (triggered by events) and aperiodic tasks (do not have
regular intervals). A versatile scheduler can dynamically adjust task priorities and
handle these tasks efficiently without disrupting the periodic schedule.
Fixed Priority Scheduling (FPS) and Dynamic Priority Scheduling (DPS): FPS assigns a
static priority to each task, and tasks are scheduled according to their priorities. DPS,
such as EDF, adjusts priorities based on task deadlines.
14
Memory Pool Management: Allocates blocks of memory statically to ensure constant
time for allocation and deallocation, avoiding fragmentation.
Resource Access Protocols: Protocols like Priority Ceiling and Priority Inheritance
prevent priority inversion and ensure that higher priority tasks can access needed
resources without undue delay.
An operating system can't be deemed "real-time" unless all of its primary operations
have a time limit. These solutions address operating system calls as well as interrupt
management. Operating systems categorized as "soft real-time" can only offer a
maximum for the majority of the time, but "hard real-time" operating systems are able to
guarantee a maximum duration for certain tasks. These specific classes are actually not
very helpful, since the user needs thorough research, as each RTOS system has
different speed characteristics.
15
devices. When it was officially published in 1996, the early 1990s version of the
program known as Windows for Pen Computing was renamed Windows CE.
Real-time capabilities:
FreeRTOS: offers strong real-time features, such as deterministic task scheduling and
real-time interrupt response. It is ideal for applications requiring precise timing and
responsiveness, such as industrial automation, robotics, and Internet of Things devices.
gives options to turn on or off features including dynamic memory allocation, task
alerting systems, and stack overflow checks, among other memory efficiency measures.
Windows CE: Windows CE does have real-time skills; however, it may not be as
deterministic as FreeRTOS. It is suitable for a wide range of embedded applications,
including household appliances, handheld gadgets, and point-of-sale terminals, where
real-time requirements might not be as stringent.
Footprint:
FreeRTOS: Has a small footprint, typically requiring only a few kilobytes of RAM and
storage. It is ideal for resource-constrained devices where minimizing memory and
storage usage is crucial.
Windows CE: Has a larger footprint compared to FreeRTOS due to its extensive feature
set and support for a wide range of hardware configurations. It is suitable for devices
with more resources available, such as multimedia devices, navigation systems, and
automotive infotainment systems.
Scalability:
FreeRTOS: Very scalable and suitable for a broad variety of embedded devices,
including CPUs and microcontrollers of various capacities. Its modular construction
allows it to be tailored and tuned to each application's specific requirements. By
enabling portability across several hardware platforms and microcontroller architectures,
it permits code reuse and platform migration.
Windows CE: It supports a wide range of hardware platforms, including ARM, x86, and
MIPS architectures. Moreover, it is scalable. It may be applied to a wide range of
16
embedded applications, from simple portable devices to complex embedded systems
including medical devices and industrial control systems.
Windows CE: often produced using the Microsoft Visual Studio integrated development
environment and associated development tools. To facilitate the development of
embedded programs, it offers a comprehensive set of development tools and APIs that
include networking, device drivers, and graphical user interfaces.
17
resources, including as user manuals, porting instructions, API reference guides, and
sample projects, to help developers understand and utilize FreeRTOS. provides
commercial support options, including advice, training, and customization services, from
experts in embedded systems development. These solutions may be tailored to project
requirements.
Windows CE: The extensive assistance provided by Microsoft and its network of
suppliers, such as access to official materials, knowledge base articles, and help
forums, has historically helped Windows CE development. offers a wide range of
information and tools, including SDKs, developer manuals, and sample code, for
building embedded applications. For Windows CE developers, it offers training and
certification programs as well.
Application of FreeRTOS
FreeRTOS is a free operating system (RTOS) and since it is flexible, reliable, and
efficient, it has found places in different sectors around the globe. Being a small sized
program compiler with an all-inclusive range of functions, the FreeRTOS is a favorite
one for embedded systems, IoT devices and even more. Embedded systems dominate
as one main field where FreeTOS performs its functions. One of the key roles of
embedded devices, from simple microcontrollers to complex systems-on-chip (SoCs), is
they need an operating system which can include files properly while using least the
resources. The FreeRTOS might be well suited for real-time systems by offering a small
sized and a robust kernel that can handle task scheduling, inter-task communication,
and synchronization, however at the cost of real-time system. As an integral IoT
component, FreeRTOS helps enable connectivity and creates a seamless interface for
the vast variety of devices operating under the Internet of Things. From IoT devices
lying under the kitchen cabinet to wearable devices or industrial sensors, FreeRTOS
platform is the underpinning platform for developing firmware that allows the interaction
18
using sensors, communication using Wi-Fi, Bluetooth or LoRa, and performs complex
tasks on data in real time.
Disadvantages
FreeRTOS
Limited Middleware Support: The virtue of flexibility and open source of FreeRTOS is
circumvented in the area where RTOS lacks middleware support as compared to
proprietary RTOS like Windows CE. This constraint might pose problems since
developers would be targeted with difficulties on marriage of the sophisticated functions
with the core components of the embedded systems. This is an inevitable consequence
19
of the redundancy, and the most feasible solution is to incorporate more middleware
components otherwise you must be ready to integrate the third-party services, which
may affect overall performance.
Limited Graphical User Interface (GUI) Support: The main idea of the FreeRTOS is to
provide real-time expected behavior(s) without a convenient GUI. Though FreeRTOS
denies the response of bare-metal support for task and resource management, to
develop the GUI-based applications, external libraries have to be integrated by which
more effort is required. This can result additionally in the delay of development periods
and increase both its complexity and necessary for tasks, especially for applications
encompassing the advanced principle of a user interface
Application of Window CE
Windows CE, used by many industries currently and due to their modular and
component-based design, is the first operating system Microsoft developed. In its early
days, Windows CE was intended to power microcontrollers, and its subsequent
modifications have been diversified so that it is now competent any specific specialized
need while being flexible, scalable, and with a development environment that favors
developers. Let us explore some of the notable applications of Windows CE: Let us
explore some of the notable applications of Windows CE:
Embedded Systems: Windows CE has a big application amount of being used in the
embedded system across industries which are automotive, industrial automation, POS
terminals, and consumer electronics. This factor enables the software to function even
small sized devices, which have customizable nature and can perform monitoring and
control in real time basis in the constrained environment. In transport applications such
as automotive, seen as engines, Windows CE allows developers to build more robust
infotainment systems, navigation units, along with in-vehicle computing platforms that
provide drivers, and passengers with multimedia entertainment, navigation assistance,
and vehicle diagnostics. This development process helps to overcome the challenges
that have occurred in building other applications.
20
Handheld Devices: The Windows CE has been the most preferred platform that is being
used for handy devices like PDAs (Personal Digital Assistants), handheld scanners, and
ruggedized mobile computers used in industries ranging from planning to healthcare
and retail managing sectors. By the virtue of its support for touch screens, wireless
connectivity, and integration with desktop systems it emerged as a platform that
promises compliance with the preferences of software developers who need both
mobile devices that are capable of simple data entry and data challenging tasks
execution. As a component of device-managed inventory, assets, and service systems,
Windows CE-based handheld device is often used in this application.
Medical Devices: The use of Windows CE in the healthcare sector is very wide ranging
and extends to patient monitors, intracranial catheters, portable medical imaging
devices, and diagnostic equipment. The advantages of this platform which include
reliability, security, and its ability to support compliance by various regulatory agencies
make it an ideal choice for creating medical devices that need remote monitoring, data
analysis as well connectivity to the electronic health records. Pocket PC-based medical
devices made from Windows CE contribute enormously in terms of cost-effectiveness
and patient care coordination, besides achieving accurate diagnosis and treatment.
Retail and Hospitality: Window CE can be seen in retail and hotel interior design, as
self-service kiosks, digital signs, cash registers, and hand-held menu ordering system
that employ this operating system. The vitality of the software, the fact that it is easy to
customize, and the ability to be integrated with external devices like bar code readers,
21
receipt printers and payment terminals make it the preferred option for business needs
aimed at streamlining operations, enhancing customer experiences, and improving
sales efficiency. In the retail and hospitality markets, brief Windows CE based
technologies make many of these duties such as inventory management, order
processing, and client engagement very fundamental and secure.
Disadvantages of Windows CE
Resource Intensive: One of the main drawbacks of Windows CE is the fact that it is a
resource intensive OS, in comparison to lightweight Real Time Operating Systems
(RTOSes) like FreeRTOS. The deployment of numerous new services for our daily lives
has been made feasible by recent advancements in information and network
technologies (Rame Gowda & Lin 2022). Windows CE will hence call for a larger
memory and would eventually require higher levels of processing power, which may be
a serious factor of limitation for the embedded systems with exceedingly small
resources of memory and processors. The resource-hungry machine may be impossible
to adapt in situations where the requirement for a low level of hardware is key, such as
with battery-powered devices or where cost is sensitive.
22
Windows CE ecosystem, which could delay development and lengthen time-to-market.
Furthermore, developers may become overwhelmed by Windows CE's wealth of
features and options, which will require careful preparation and skill to use effectively.
Conclusion:
seamlessly joins the whole Windows environment, subsequently making it the number
one choice for complex embedded applications with the need for more advanced GUI.
As well, further features and meshes of FreeRTOS and Windows CE are anticipated to
enhance with emerging tendencies in embedded systems, thus meet even with the rise
in need of device developers for powerful devices. Advances in “wireless” capabilities,
incorporation of the “Internet of Things” and “edge computing,” implementation of
security mechanisms, as well as optimizations for low-power devices are believed to
define the future of RTOS. Through the same line of thought, FreeRTOS and Windows
CE intend not to lag and win these market segments, providing opportunities for
developers to design diverse solutions across broad sections of industries and
applications. When it comes to the world of FreeRTOS and Windows CE, the choice of
embedded system platform in which you should use for your project will depend upon
the particular needs, limitations, and goals of your given project. Developers need to
23
constantly perform rigorous, discretionary task of examining features, pros, and cons of
various each RTOS to make balanced, targeted decisions that not only contribute to the
overall objective of the project, but also to keep projects within given constraints. As
both FreeRTOS and Windows CE endeavor to boost their rigor and vigor towards
innovation, they will indisputably stay the top existing tools for embedded systems
developers, bringing the technology to new frontiers of discovery and providing
integrated and connected future gadgets.
References
24