ES Module 2
ES Module 2
Software
Architecture
Services Provided By OS
1] Program execution
• To execute a program, several tasks need to be performed
• Both the instructions and data must be loaded into the main memory
• In addition, input-output devices and files should be initialized, and other
resources must be prepared
• The Operating structures handle these kinds of tasks
• The user no longer has to be concerned about memory allocation,
multitasking, or anything else
• When the program is in execution, the Operating System also handles
deadlock i.e. no two processes come for execution at the same time
2] Input/output devices
• As there are numerous types of I/O devices within the computer system, and
each I/O device calls for its own precise set of instructions for the operation;
OS manages the input-output operations and establishes communication
between the user and device drivers
3] Communication Between Processes
• The OS manages the communication between processes. It includes data
transfer among them
4] File Management
• The operating system helps in managing files also. If a program needs
access to a file, it is the operating system that grants access. These
permissions include read-only, read-write, etc. It also provides a platform
for the user to create, and delete files.
5] Memory Management
• Let’s understand memory management by OS in simple way. Imagine a cricket team with
limited number of player . The team manager (OS) decide whether the upcoming player
will be in playing 11 ,playing 15 or will not be included in team , based on his
performance . In the same way, OS first check whether the upcoming program fulfil all
requirement to get memory space or not ,if all things good, it checks how much memory
space will be sufficient for program and then load the program into memory at certain
location. And thus , it prevents program from using unnecessary memory.
6] Process Management
• Let’s understand the process management in unique way. Imagine, our kitchen stove as the
(CPU) where all cooking(execution) is really happen and chef as the (OS) who uses kitchen-
stove(CPU) to cook different dishes(program). The chef(OS) has to cook different
dishes(programs) so he ensure that any particular dish(program) does not take long
time(unnecessary time) and all dishes(programs) gets a chance to cooked(execution) .The
chef(OS) basically scheduled time for all dishes(programs) to run kitchen(all the system)
smoothly and thus cooked(execute) all the different dishes(programs) efficiently
7] Security and Privacy
• Security : OS keep our computer safe from an unauthorized user by adding security layer to
it. Basically, Security is nothing but just a layer of protection which protect computer from
viruses and hackers
• Privacy : OS give us facility to keep our essential information hidden like having a lock on our
door, where only you can enter and other are not allowed . Basically , it respect our secrets
and provide us facility to keep it safe.
8] Resource Management
• System resources are shared between various processes. It is the Operating
system that manages resource sharing. It also helps in the memory
management of the system. It also controls input-output devices
10] Networking
• This service enables communication between devices on a network, such as
connecting to the internet, sending and receiving data packets, and
managing network connections.
11] Error Handling
• The Operating System also handles the error occurring in the CPU, in Input-
Output devices, etc. It also ensures that an error does not occur frequently
and fixes the errors
Architecture Of Embedded OS
• Embedded operating systems are specialized operating systems designed to manage and
control the hardware and software resources of embedded systems
• The architecture of an embedded OS is tailored to meet the specific requirements of
these systems, which often include real-time constraints, limited resources, and reliability
• Key Components of an Embedded OS Architecture
1.Kernel
1. Core Functionality: The kernel is the heart of an embedded OS. It manages system
resources, handles tasks, and ensures that operations are executed in an orderly and
controlled manner.
2. Task Management: The kernel schedules tasks, manages task states (e.g., running,
waiting, suspended), and facilitates task switching
3. Inter-Process Communication (IPC): The kernel provides mechanisms for tasks to
communicate with each other, such as message queues, semaphores, and shared
memory.
4. Memory Management: The kernel manages memory allocation and deallocation,
ensuring that tasks have the necessary memory space to execute
2] Task/Thread Management
• Multitasking: Embedded OS supports multitasking, allowing multiple tasks or threads to
run concurrently. This is essential for handling various inputs, outputs, and processes in
real-time.
• Task Prioritization: Tasks are often prioritized based on their urgency or importance. The
OS schedules higher-priority tasks before lower-priority ones, especially in real-time
systems.
• Context Switching: The OS can switch the CPU's focus from one task to another, preserving
the state of the current task so that it can resume later without loss of information
3] Real-Time Clock and Timers
• Timing Mechanisms: Embedded OS typically includes a real-time clock (RTC) and timers
that allow precise timing operations. These are crucial for tasks that must be executed at
specific intervals or within strict time constraints.
• Delay and Timeout Management: Timers are used to manage delays, timeouts, and
periodic task execution.
4] Interrupt Handling
• Interrupt Service Routines (ISRs): The OS handles hardware and software
interrupts through ISRs, which are small routines that respond to interrupt
signals. This allows the system to respond quickly to external events.
• Interrupt Prioritization: In systems with multiple interrupts, the OS manages
priorities, ensuring that more critical interrupts are handled first
• Types of Embedded OS Architectures
1. Monolithic Kernel
• In this architecture, all the OS functions, including task management, IPC, device drivers, and file
systems, are part of a single, large kernel. This can lead to efficient performance but might be less
modular (meaning it's difficult to update or replace individual services) and harder to maintain.
2. Microkernel
• The microkernel architecture reduces the kernel to the most essential functions, such as task
scheduling and IPC. Other services, like device drivers and file systems, run in user space as
separate processes. This makes the system more modular and easier to update or modify
3. Hybrid Kernel
• Hybrid kernels combine elements of both monolithic and microkernel architectures, aiming to
balance performance and modularity
4. Real-Time Operating System (RTOS)
• RTOS is a special class of embedded OS designed to handle real-time constraints
Categories Of Embedded OS
1] Real-Time Operating System
• RTOS 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
2] Multi-tasking Operating System
• The multi-tasking Operating System may execute multiple tasks at the same
time
• The multitasking operating system is switched between the multiple tasks
• Some tasks are waiting for events to occur, while others are receiving events
and preparing to run
3] Preemptive Operating System
• A multitasking operating system that interprets task preemption (the act
of temporarily stopping a task to work on a higher priority task, and
then resuming the original task later) is known as a preemptive
operating system
• A task with a higher priority is always defined and executed before a task
with a lower priority
• Such systems can fail to meet a system's deadline, and the program is
unaware of the missed deadline
4] Rate Monotonic Operating System
• It is an operating system that assures that tasks in a system may operate
for a specific amount of time and duration of time
• It is a priority-based scheduling algorithm. It is used in operating systems
as a preemptive
• It is generally used to perform shorter tasks with higher priority.
5] 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
6] General-Purpose Embedded OS: These are lightweight versions of
general-purpose OS tailored for embedded systems
7] Network Operating Systems (NOS): NOS are designed to manage network
resources, ensuring data is transmitted efficiently across networked embedded
devices
8] Mobile Operating Systems: Designed for mobile devices with touch interfaces,
mobile OS handle a wide range of applications while managing limited resources
9] TinyOS: TinyOS is a lightweight, flexible OS designed specifically for wireless
sensor networks and low-power embedded systems
Application Software