Sunday, January 22, 2012

What kind of scheduling policies?

uITRON supports only priority based pre-emptive scheduling. However, Round-Robin scheduling can be implemented by the application through assigning the tasks the same priority and calling rot_rdq periodically from cyclic handler etc.

QNX supports
FIFO Scheduling→Priority based pre-emptive
RoundRobin→Timeslice
Sporadic(spuraadic) scheduling→thread's priority oscillates dynamically between a foreground or normal priority and a background or low priority according to the execution time.This behavior is essential when Rate Monotonic Analysis (RMA) is being performed on a system that services both periodic and aperiodic events. Essentially, this algorithm allows a thread to service aperiodic events without jeopardizing the hard deadlines of other threads or processes in the system.

http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.neutrino_sys_arch/kernel.html#SCHEDULING

See the below post for adaptive scheduling.
----
Adaptive partition schedulers are a relatively new type of partition scheduler, pioneered with the most recent version of the QNX operating system. Adaptive partitioning, or AP, allows the real-time system designer to request that a percentage of processing resources be reserved for a particular partition (group of threads and/or processes making up a subsystem). The operating system's priority-driven pre-emptive scheduler will behave in the same way that a non-AP system would until the system is overloaded (i.e. system-wide there is more computation to perform than the processor is capable of sustaining over the long term). During overload, the AP scheduler enforces hard limits on total run-time for the subsystems within a partition, as dictated by the allocated percentage of processor bandwidth for the particular partition.

If the system is not overloaded, a partition that is allocated (for example) 10% of the processor bandwidth, can, in fact, use more than 10%, as it will borrow from the spare budget of other partitions (but will be required to pay it back later). This is very useful for the non real-time subsystems that experience variable load, since these subsystems can make use of spare budget from hard real-time partitions in order to make more forward progress than they would in a fixed partition scheduler such as ARINC-653, but without impacting the hard real-time subsystems' deadlines.
 ------

Difference between process and threads

In general context, Processes are completely separated from each other in each aspect such as Execution Context(CPU register contents), MMU configuration(Memory space is protected from each other by MMU protection and Virtual address space too has to be reconfigured), address space(Global variables), stack memory and other resources. So, switching between processes consumes a lot of effort such as changing the CPU context and MMU reconfiguration.
But, threads are just different execution units within a process. They just differ in the code what they execute. It means they just differ in the CPU register contents and stack. All other, MMU configuration, Global address space and all other resources are same and shared between them. So, switching between threads require only changing of CPU register contents.

What is adaptive partitioning scheduler?

Difference between SH-2, SH-3, SH-3 and RX


How shared libraries are referred to in run-time?

How modules are linked at run time in Linux?

Anatomy of Linux loadable kernel modules
A 2.6 kernel perspective

http://www.ibm.com/developerworks/linux/library/l-lkm/

What is Copy-On-Write?

Tuesday, January 17, 2012

Static priority scheduling and Dynamic priority scheduling

 Static
----
http://www.intechopen.com/articles/show/title/a-fixed-priority-scheduling-algorithm-for-multiprocessor-real-time-systems

Dynamic
----
Dynamic priority scheduling - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Dynamic_priority_scheduling
Earliest deadline first scheduling - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Earliest_deadline_first_scheduling

Requirements for Hard Real-Time systems.

Minimal Latency during task-switching
Minimal jitter
Run-to-completion
Preemptive multitasking
Priority inheritence
Meet strict deadlines

You at any case meeting the customer deadline is Hard real time system. Mik san who get the and spends time in customer supports, and missing the customer deadline is soft real time system. How do you perform? What is the difference between you people?

Even customer support processing time also taken into consideration. And, finished within a finite time and deadline project is taken at any case. Sometimes, lower priority interrupts are even stopped just by reading the mail and postponing the response later. If the support is related to deadline project, that is taken into it.

Processing the interrupts (Customer support) with long time-slices and missing the deadline.

My OS is Hard Real-Time operating system? At any case, it will finish the higher priority tasks/higher priority interrupts.

Hard real time is Not about High speed or low latency time. It is about deterministic behavior of the kernel. Execution time of all components are constant. Nothing is variable. For example, definition of Task switching time.

----

In computer science, rate-monotonic scheduling is a scheduling algorithm used in real-time operating systems with a static-priority scheduling class. The static priorities are assigned on the basis of the cycle duration of the job: the shorter the cycle duration is, the higher is the job's priority.

These operating systems are generally preemptive and have deterministic guarantees with regard to response times. Rate monotonic analysis is used in conjunction with those systems to provide scheduling guarantees for a particular application.
----
Applicable to Rate monotonic Analysis.
----

Software vendor provides the way to specify the resource and real time restrictions as parameters.
Users guarantees the real time behavior of whole system using these parameters
----

So, hard real time systems are where RMA can be applied.
1) Run-to-completion
2) Priority Pre-emptive
4) Execution time(cycles) of all jobs are determined

Since the execution time(cycles) of each and every RTOS object(system calls, task switching time, interrupt processing) time is fixed, thus every job execution time is fixed. The Jitter caused by task scheduler and Interrupt processing are neglected(near to zero).

With these, apply the RMA using the parameters, number of tasks, total execution time of the job(Cj), period of the job(How long once it has to be executed) where before the next cycle it has to be completed.

-----

In this case, the scheduling algorithm is the method in which priorities are assigned. Most algorithms are classified as static priority, dynamic priority, or mixed priority. A static-priority algorithm assigns all priorities at design time, and those priorities remain constant for the lifetime of the task. A dynamic-priority algorithm assigns priorities at runtime, based on execution parameters of tasks, such as upcoming deadlines. A mixed-priority algorithm has both static and dynamic components. Needless to say, static-priority algorithms tend to be simpler than algorithms that must compute priorities on the fly.

The rate monotonic algorithm (RMA) is a procedure for assigning fixed priorities to tasks to maximize their "schedulability." A task set is considered schedulable if all tasks meet all deadlines all the time.  So, ITRON has static priority and RMA has to be used to achieve hard-real time.
-------------

What is Kernel Jitter?

A Jitter-Free Kernel for Hard Real-Time Systems

Christo Angelov, Jesper Berthing

Abstract. The paper presents advanced task management techniques featuring Boolean vectors and bitwise vector operations on kernel data structures in the context of the HARTEXTM hard real-time kernel. These techniques have been consistently applied to all aspects of task management and interaction. Hence, the execution time of system functions no longer depends on the number of tasks involved, resulting in predictable, jitter-free kernel operation. This approach has been further extended to time management resulting in a new type of kernel component, which can be used to implement timed multitasking - a novel technique providing for jitter-free execution of hard real-time tasks.

predictable dynamic scheduling is more promising but it requires the development of a new generation of safe real-time kernels, which provide a secure and predictable environment for application tasks through predictable task scheduling and interaction, extensive timing and monitoring facilities, and last but not least - predictable behaviour of the kernel itself. Such functionality cannot be efficiently accomplished using conventional kernel algorithms and data structures, i.e. linked lists used to implement system queues. Extensive linked list processing introduces substantial and largely varying overhead known as kernel jitter [4].

highly deterministic (jitter-free)....
------
The interrupts in the middle of execution of a Task or unexpected processing overhead which decreases the deterministic behaviour is called Jitter.

Thursday, November 3, 2011

RTC Magazine's October 2011 Issue

RTC Magazine's September 2011 Issue

http://upload.rtcgroup.com/rtcmagazine/digital/pdf/rtc1109.pdf

Important stories:
  • Conductive Metal Oxide (CMOx) Memory technology to compete with NAND Flash.
  • HP is weaker now, since its tablet lauch is failed
  • MID → Mobile Internet Device: Between smart-phone and tablet
  • Rugged device → Device equipped with for rough handling. Like military dress, devices