Requirements Analysis
Architecture
Design
Implementation
Module Testing
Development Process
Consists of cycles of editing-testing debugging.
Processor and hardware part once chosen remains fixed, the application software codes
have to be perfected by a number of runs and tests.
Software Tools
RTOS
Prototyper
Editor
Interpreter
Compiler
Assembler
Cross Assembler
Locator
Comprehension,
Editing,
Debugging,
Compiling
Finds the full effect of any code change on the source code.
Searches and lists the dependencies and hierarchy of included header files.
Process improvements
Product improvements
4. Monitor Quality during development
Software Quality Assurance - a team devoted to encouraging and enforcing quality standards
Reliability
Correctness
Maintainability
Security
Interoperability
Usability
Extensibility
Reusability
Operating System
Operating system is nothing but the interface between the hardware and user of the computer.
In other words, operating system is a software program which will be working according to
the user commands using the hardware parts of the computer. Operating system plays a key
role in offering services like memory management, process management, file management,
resource allocation etc. Examples of operating systems are Windows. Linux, UNIX, apple
leopard, Novel Netware, Solaris etc. All these operating systems come under general purpose
operating systems (GPOS).
Suppose a person is driving a car on a highway at a speed of 70 miles per hour. Now,
somehow the car meets with an accident. Fortunately, the airbag deployed at the right time
and saved the life of the driver. So, we see that airbag is a very good feature in a car which
can save a life someday. But, did we think what would have happened if the airbag would
have deployed a few seconds late? Yes, we would have lost a life. So just imagine the
dependency on the accuracy of opening of the airbag.
So, what makes that airbag deploy at the right time? Its RTOS. RTOS stands for Real time
operating systems. Be it on cell phones, air conditioners, digital homes, cars etc. Most of
these systems use RTOS. Some of the most widely used RTOS are: LynxOS, OSE, QNX,
RTLinux, VxWorks, Windows CE
If we look at real time operating system (RTOS) is also an operating system, which will also
work as an interface between the hardware of the system and user. As the name suggests,
there is a deadline associated with tasks and an RTOS adheres to this deadline as missing a
deadline can cause affects ranging from undesired to terrible. RTOS also do the functions
like file management, process management, memory management etc.
If RTOS does the same functions like general purpose operating system (GPOS) then what is
the difference?
Scheduling: Scheduling is the process of arranging, controlling and optimizing work and
workloads in a production process. The scheduling algorithm is developed for multitasking
operating system which has to manage number of process at a time. RTOS scheduling
algorithm is based on priority, in which the process should be scheduled according to their
priority. In RTOS always highest priority tasks are scheduled first and low priority process
are paused until the high priority process are processed. If any high priority process came for
scheduling the existing process are context switch and schedule the high priority process first
for processing.
In GPOS Scheduling is not based on priority if a high priority process came for processing it
should wait until the existing process is processed.
For GPOS throughput is high (throughput means number of process complete there
processing at one time) for RTOS throughput is always low. RTOS used rate monotonic,
earlier deadline first, pre-emptive scheduling algorithms whereas GPOS uses completely fair
scheduling, round robin, rotary inventor fair scheduling, etc.
Interrupt Latency: interrupt latency of the RTOS is always zero. When we take the GPOS
interrupt latency is more when it has to process when number of process at a time.
Multitasking and Task Scheduling
Manages tasks.
Transparently interleaves task execution, creating the appearance of many programs
executing simultaneously and independently.
RTOS is more economical for embedded devices rather than choosing GPOS.
System is nothing but group of peripherals connected to each other to process the input data
and give output. System which is time dependent that is to process the input data and give
output in given time, such systems are called real time systems. Real time system is divided
into two systems
Important Terms
Memory Management: In simple words how to allocate memory for every program which
is to be run and get processed in the memory (RAM or ROM). The schemes like demand
paging, virtual memory, segmentation will under this management only.
Segmentation: It is a memory management scheme where the physical memory is dividing
into logical segments according to the length of the program. In the segmentation it will avoid
unused memory, sharing will be done easily, protection for the program. Sometime Main
memory cannot allocate memory to the segments Because of its variable length and large
segments
Paging: in this scheme the physical memory is divided in to fixed size pages. It has all
functions of segmentation and also solves its disadvantages. Virtual memory is a memory
management scheme where some part of secondary storage device will be used a physical
memory when program lacks the physical memory to run the program.
Process Management: thread contains set of instructions which can execute independently
of other programs. Collection of thread is called the process or we can say process contains
the sequential execution of program and state control of the operating system. Every
operating system works by executing series of processes by the processor and give result
back to the main memory. Operating systems contains two types of process
System process: these processes are main responsible for working of operating system.
Application process: These processes are invoked when particular application is stared and
start executing with the help of other system process.
Operating system should process each and every process given by the user and give results
back, OS will also process the process according to the priority. Scheduling algorithm will
take care of processes processing and Inter Process communications (IPC) semaphores,
message queues, shared memory, pipes, FIFOs will take care of resource allocation of the
processes.
File Management: How the files are place in the memory which file should be used by user,
file permission (read, write and execute permissions), arrangement of files in the secondary
memory and primary memory using file system etc. all the above functions are done by the
file management.
Device Management: management of devices like tape drive, hard drives, processor speed,
optical drive, and memory devices will be done by the operating system.
Features of RTOS
An RTOS must be designed in a way that it should strike a balance between supporting a rich
feature set for development and deployment of real time applications and not compromising
on the deadlines and predictability.
The following points describe the features of an RTOS :
Context switching latency should be short. This means that the time taken while
saving the context of current task and then switching over to another task should be
short.
Interrupt latency: The time taken between executing the last instruction of an
interrupted task and executing the first instruction of interrupt handler should be
predictable and short. This is also known as interrupt latency.
Interrupt Dispatch latency: Similarly, the time taken between executing the last
instruction of the interrupt handler and executing the next task should also be short
and predictable. This is also known as interrupt dispatch latency.
Reliable and time bound inter process mechanisms should be in place for processes to
communicate with each other in a timely manner.
An RTOS should have support for multitasking and task pre-emption. Pre-emption
means to switch from a currently executing task to a high priority task ready and
waiting to be executed.
Real time Operating systems but support kernel pre-emption where-in a process in
kernel can be pre-empted by some other process.
Task synchronization:
Further responsibilities:
Task States
Run:
Ready:
State of those tasks that are ready to execute but cannot be executed because the
processor is assigned to another task.
Wait:
A task enters this state when it executes a synchronization primitive to wait for an
event, e.g. await primitive on a semaphore. In this case, the task is inserted in a queue
associated with the semaphore. The task at the head is resumed when the semaphore is
unlocked by a signal primitive.
Idle:
A periodic job enters this state when it completes its execution and has to wait for the
beginning of the next period.
Multitasking
:
The kernel is the core component within an operating system. Operating systems
such as Linux employ kernels that allow users access to the computer seemingly
The partitioning can result in easier software testing, work breakdown within
teams, and code reuse.
Complex timing and sequencing details can be removed from the application
code and become the responsibility of the operating system.
Threads
Multiple threads can exist within the same process and share resources such as
memory, while different processes do not share these resources:
Typically, an application will have a separate thread for each distinct activity.
Thread Control Block (TCB) stores information needed to manage and schedule a
thread
Multithreading
Scheduling:
The scheduler is the part of the kernel responsible for deciding which task should be
executing at any particular time. The kernel can suspend and later resume a task many
times during the task lifetime.
The scheduling policy is the algorithm used by the scheduler to decide which task to
execute at any point in time. The policy of a (non real time) multi user system will
most likely allow each task a "fair" proportion of processor time. The policy used in
real time / embedded systems is described later.
While task 2 is executing (4), it locks a processor peripheral for its own
exclusive access.
Task 3 tries to access the same processor peripheral, finding it locked task 3
cannot continue so suspends itself at (7).
The next time task 2 is executing (9) it finishes with the processor peripheral
and unlocks it.
The next time task 3 is executing (10) it finds it can now access the processor
peripheral and this time executes until suspended by the kernel.
Different tasks in an embedded system typically must share the same hardware and software
resources or may rely on each other in order to function correctly. For these reasons,
embedded OSs provide different mechanisms that allow for tasks in a multitasking system to
intercommunicate and synchronize their behaviour so as to coordinate their functions, avoid
problems, and allow tasks to run simultaneously in harmony.
Embedded OSs with multiple intercommunicating processes commonly implement interposes
communication (IPC) and synchronization algorithms based upon one or some combination
of memory sharing, message passing, and signalling mechanisms.
With the shared data model shown in below figure, processes communicate via access to
shared areas of memory in which variables modified by one process are accessible to all
processes.
shown in Figure below, under this scheme, OS tasks send messages to a message queue, or
receive messages from a queue to communicate.