In Real time system correctness of an operation depends not
only on the logical correctness but it should be
deterministic. Real time system are of two types, hard and
real. In hard real time system any output after the
deadline should be treated as useless,so it lead to
complete failure. But in soft realtime some late answer
also consider as a right answer, it tolerate such lateness
A hard real-time system guarantees that critical tasks
complete on time. This goal requires that all delays in the
system be bounded from the retrieval of the stored data to
the time that it takes the operating system to finish any
request made of it. A soft real time system where a critical
real-time task gets priority over other tasks and retains
that priority until it completes. As in hard real time
systems kernel delays need to be bounded
Often a hard real-time system operates on a preemptive,
context switching operating system where tasks will be
switched in and out execution state upon its defined and
scheduled time slots to maintain its real-time
characteristics. A soft real-time system, often denotes a
system that attempts to meet all time constaints imposed by
its tasks or operations or applications by enjoying the
powerful system resources such as high clock rate, faster
processors, speedy cache, and lightening buses. Yet, it is
still a 'soft' real-time system because some critical tasks
might be delayed due to some system-oriented processes that
are bulky and time-consuming and not preemptive.
In hard real time system the late output is harmful and can
not be tolarate,while in soft real time sytem the late
output is annoying and but can be tolarate.
most general purpose OS are made in soft real time system.
*Hard real-time system
1. Secondary storage limited or absent, data stored in short- term memory, or read-only memory (ROM)
2. Conflicts with time-sharing systems, not supported by general-purpose operating systems.
*Soft real-time system
1. Limited utility in industrial control or robotics
2. Useful in applications (multimedia, virtual reality) requiring advanced operating system features.
Hard real-time systems must have at least some actions with hard deadlines. But the converse is not true - soft real-time systems may have actions with hard deadlines. Those systems are soft real-time because they do not employ the hard real-time sequencing timeliness criterion, they employ soft real-time ones such as "minimize the expected number of missed deadlines," regardless of whether the deadlines are hard or soft.
hard real-time" and "soft real-time" apply only to a "system," because their definitions are based on sequencing. In this sense, a system is any resource management facility that includes sequencing (of threads, only by our convention in this document), anywhere from the hardware up through the OS and middleware to the application(s)
What is the difference b/n any GPOS and RTOS?Give suitable
examples or characteristic of RTOS to support your answer.
What changes can be done in a GPOS to make it work like a
RTOS? What basic features will you support, if you have to
design a RTOS?
I have been working on one thread which manage and control
a couple of circular buffers. It has api for other thread
As the thread grows bigger and bigger,
I split it as 3 to 4 threads which need to share common
buffers, and also their api could be used by other threads,
(not these three threads). Inside api, I also allow other
threads to access these three threads' common buffers(more
than one buffer). SO I have to use mutex to avoid race
condition . But I found mutex will be everwhere in all the
threads when they update the common buffer. I am wondering
whether I could reduce mutex usage(more mutex will hure my
system performance). any ideas for how to reduce mutex
usage meanwhile to avoid race condition. Thanks