Documente Academic
Documente Profesional
Documente Cultură
Student’s
Signature:
surendra
Evaluator’s comments:
________________________________________________________________
_____
Examples of such resources are files, devices and certain data structures.
ANSWER:
The priority inversion is the state when a lower priority task is holding
resource and the higher priority task needs that resource which is already held
by lower priority task. Then the higher priority task waiting until the resource is
not released by lower priority task. So the higher priority task is gone to under
priority inversion. That’s the simple priority inversion.
The unbounded priority inversion is that when some intermediate priority task
are comes and usage the CPU, they don’t need the resource. The intermediate
task are executed and then the lower priority task is using the resources and
higher priority task is waits for releasing the resource then the higher priority
task is gone under the unbounded priority inversion.
There is TH is higher priority task and TL is lower priority task and holding the
resource R. Then the intermediate tasks T11, T12, T13...... so on are come and
use the CPU and they don’t need the resource. So the TH is waits the
intermediate task and lower priority task. Then the TH is gone under unbound
priority inversion.
This task can be done by increasing the priority level of the lower
priority task to be equal to that of the waiting higher priority task.
The means is that the lower priority tasks inherit the priority of the
higher priority task.
In the above figure scenario 1 the Ti task is holding a critical resource and the
priority is 5.
In the scenario 2 the other task Tj is requesting the resource and its priority is
10.
In the centralized clock one is the master clock and other connected clocks
are slave clock. The master clock is connected to every slave clocks. So the
master clock is having all information regarding the slave clock.
Centralized clock synchronization scheme disadvantages:
There is a problem if slave clocks are wants to share information with other
slave clocks. The cost of centralized clock is high.
These systems allow the sharing of information and resources over a wide
geographic spread and are usually better than traditional centralized systems in
terms of sharing, cost, growth and autonomy.
The distributed nature of these systems has to cope with unreliable and insecure
communications and independent failures. These problems become aggravated
when the system is operating critical real time applications such as aerospace
systems, life support systems, nuclear power plants, drive-by-wire systems and
computer-integrated manufacturing systems. Common to all these applications
is the demand for maximum reliability and high performance from computer
controllers, since a single controller failure in these applications can lead to
disaster.
Part-B
ANSWER:
These are following four properties that scalable real-time kernels for function
distributed multiprocessors are required to satisfy.
(C) The maximum interrupt response time on each processor can be determined
independently of the other processors' activities and the number of contending
processors.
(D) The interrupt service overhead can be determined independently of the other
processors' activities and the number of contending processors.
5. Explain the time services that a real time operating system (RTOS) is
expected to support. Also briefly highlight how timer services are
implemented in a real time operating system?
ANSWER:
The time services provided by an operating system are based on a software
clock called the system clock maintained by the operating system. The system
clock is maintained by the kernel based on the interrupts received from the
hardware clock. Since hard real-time systems usually have timing constraints in
the micro seconds range, the system clock should have sufficiently fine
resolution1 to support the necessary time services. However, designers of real-
time operating systems find it very difficult to support very fine resolution
system clocks.
In current technology, the resolution of hardware clocks is usually finer than
a nanosecond (contemporary processor speeds exceed 3GHz). But, the clock
resolution being made available by modern real-time operating systems to the
programmers is of the order of several milliseconds or worse.
The hardware clock periodically generates interrupts (often called time service
interrupts). After each clock interrupt, the kernel updates the software clock and
also performs certain other work.
Answer: One of the biggest problems that real-time programmers face while
using UNIX for real-time application development is that UNIX kernel cannot
be preempted. That is, all interrupts are disabled when any operating system
routine runs.
Note that spinlocks in Linux are not recursive as they may be in other
operating systems. Spinlocks should be used to lock data in situations
where the lock is not held for a long time—recall that a waiting process will
spin, doing nothing, waiting for the lock.
It is ideal from the scalability point of view that the worst-case execution time of
each run-time system service