rts kernel design l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
RTS: Kernel Design PowerPoint Presentation
Download Presentation
RTS: Kernel Design

Loading in 2 Seconds...

play fullscreen
1 / 14

RTS: Kernel Design - PowerPoint PPT Presentation


  • 138 Views
  • Uploaded on

RTS: Kernel Design. Kernel & Device drivers. Servers (application ~, web ~, component ~). Shell. XWin. Thread lib. ftp. User applications. System call interface. Process, memory, file system, network managers. Kernel. Device drivers. Hardware/controller.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'RTS: Kernel Design' - meghana


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
kernel device drivers
Kernel & Device drivers

Servers (application ~, web ~, component ~)

Shell

XWin

Thread lib

ftp

User applications

System call interface

Process, memory, file system, network managers.

Kernel

Device drivers

Hardware/controller

Devices

simple kernels
Simple kernels
  • Polled loop: Say a kernel needs to process packets that are transferred into the DMA and a flag is set after transfer:

for(;;) {

if (packet_here)

{

process_data();

packet_here=0;

}

}

Excellent for handling high-speed data channels, a processor is dedicated to handling the data channel.

Disadvantage: cannot handle bursts

simple kernels cyclic executives
Simple kernels: cyclic executives
  • Illusion of simultaneity by taking advantage of relatively short processes in a continuous loop:

for(;;) {

process_1();

process_2();

process_3();

process_n();

}

Different rate structures can be achieved by repeating tasks in the list:

for(;;) {

process_1();

process_2();

process_3();

process_3();

}

cyclic executives example interactive games
Cyclic Executives: example: Interactive games
  • Space invaders:

for(;;) {

check_for_keypressed();

move_aliens();

check_for_keypressed();

check_collision();

check_for_keypressed();

update_screen();

}

}

check_keypressed() checks for three button pressings: move tank left or right and fire missiles.

If the schedule is carefully constructed we could achieve a very efficient game program with a simple kernel as shown above.

finite state automata and co routine based kernels
void process_a(void){

for(;;) {

switch (state_a) {

case 1: phase_a1(); |

case 2: phase_a2(); |

….

case n: phase_an();}}}

void process_b(void){

for(;;) {

switch (state_b) {

case 1: phase_b1(); |

case 2: phase_b2(); |

….

case n: phase_bn();}}}

state_a and state_b are state counters;

Communication between coroutines thru’ global variables;

Example: the fanous CICS from IBM : Customer Information Control System

IBM’s OS/2 uses this in Windows presentation management.

Finite state automata and Co-routine based kernels
interrupt driven systems
Interrupt driven systems
  • Main program is a simple loop.
  • Various tasks in the system are schedules via software or hardware interrupts;
  • Dispatching performed by interrupt handling routines.
  • Hardware and software interrupts.
    • Hardware: asynchronous
    • Software: typically synchronous
  • Executing process is suspended, state and context saved and control is transferred to ISR (interrupt service routine)
interrupt driven systems code example
void main() {

init();

while(TRUE);

}

void int1(void){

save (context);

taks1();

retore (context);}

void int1(void){

save (context);

taks1();

restore (context);}

Foreground/background systems is a variation of this where main does some useful task in the background;

Interrupt driven systems: code example
process scheduling
Process scheduling
  • Scheduling is a very important function in a real-time operating system.
  • Two types: pre-run-time and run-time
  • Pre-run-time scheduling: create a feasible schedule offline to meet time constraints, guarantee execution order of processes, and prevents simultaneous accesses to shared resources.
  • Run-time scheduling: allows events to interrupt processes, on demand allocation of resources , and used complex run-time mechanisms to meet time constraints.
task characteristics of real workload
Task characteristics of real workload
  • Each task Ti is characterized by the following temporal parameters:
  • Precedence constraints: specify any tasks need to precede other tasks.
  • Release or arrival time: ri,j: jth instance of ith task
  • Phase Φi: release time of first instant of ith task
  • Response time: time between activation and completion
  • Absolute deadline: instant by which task must complete
  • Relative deadline: maximum allowable response time
  • Period Pi: maximum length of intervals between the release times of consecutive tasks.
  • Execution time: the maximum amount of time required to complete a instance of the task assuming all the resources are available.
more on cyclic executives
More on Cyclic Executives

Simple loop cyclic executive

Frame/slots

Table-based predetermined schedule cyclic executive

Periodic, aperiodic and interrupt-based task

Lets design a cyclic-executive with multiple periodic tasks. (See notes given in class)

11

the basic systems
The basic systems

Several functions are called in a prearranged sequence

Some kind of cooperative scheduling

You a have a set of tasks and a scheduler that schedules these tasks

Types of tasks: base tasks (background), interrupt tasks, clock tasks

Frame of slots, slots of cycles, each task taking a cycle, burn tasks to fill up the left over cycles in a slot.

12

blind bingo
Blind Bingo

Display();

Read input();

Loop:

update display();

If all done exit();

Read input();

End Loop;

A c b g k

V n m L s

E t y w f

D v z x e

13

period frame and hyper period cyclic executive design
Period, Frame and Hyper-period: Cyclic Executive Design
  • See class notes
  • Design the slots
  • Table-driven cyclic executive