Wednesday, December 10, 2008

Regime

... tanto per non scordarci che viviamo in un regime de-facto.
E non faccio distinzioni ne a sinistra ne a destra: un regime di solito ha bisogno di un largo consenso.
Vero Walter?

Monday, November 24, 2008

Mani pulite, tasche sporche

Un signore dalle tasche sporche ha detto:
"Mani pulite mise fine a 50 anni di benessere"
e anche:
"nel 1992 la magistratura iniziò un'azione verso i cinque partiti democratici che, pur con molti errori, erano riusciti a garantire anni di  progresso e benessere"


NO COMMENT

...che se comment stavolta mi sentono anche a Roma...

Sunday, November 16, 2008

Bobby

Ho appena finito di vedere lo splendido "Bobby", di Emilio Estevez.

Certe persone passano, ma le domande e il bisogno che abbiamo di questi uomini restano.

Speriamo Obama sia all'altezza anche solo del ricordo di Robert "Bobby" Kennedy.
E speriamo che anche qui in Italia arrivino prima o poi persone all'altezza dei nostri bisogni.

Buonanotte

Saturday, November 8, 2008

Al mar non si comanda

Ovviamente l'innalzamento dei mari è solo un'invenzione di un gruppo di scienziati "di sinistra":
http://blogeko.libero.it/index.php/2008/innalzamento-del-livello-dei-mari-evacua

Occhio che la pazienza delle persone ha un limite, specie se le costringi ad abbandonare le loro case di una vita (anzi, più di una: quelli li ci sono da sempre).

Wednesday, November 5, 2008

One more reason

I'm still asking myself why people insist on using MySQL.
Today another near-buggy behavior for this DBMS.
Just try to call a MySQL function name and then leave a space between it and the open parenthesis:
"Function FUNCTION_NAME doesn't exist on DB_NAME"
...
Seriously man... migrate to PostgreSQL and leave the old and stupid things behind.

Thursday, October 23, 2008

Licenze di uccidere

Ieri è stata una giornata da dimenticare:io ero su un pullman quando è arrivata l'ondata di piena,
potente, continua, con onde, tronchi, lamiere e persino auto
trascinate da un fiume dove prima erano i campi, le case e persino un asilo.

Quelli che erano nelle loro auto hanno rischiato tutti, dal primo all'ultimo,
di morire (tanto qualcuno deve pur dirlo).

Non si poteva prevedere una simile quantità di pioggia, è vero,
ma appena l'ondata di acqua e fango è passata
ho visto le negligenze e le colpe macroscopiche:
argini e canali di dimensioni ridicole,
vecchi ponti che, ormai sostituiti dai nuovi, sono rimasti li a formare una comoda diga per la natura impazzita,
un servizio di allerta che ha funzionato nella migliore delle ipotesi con lentezza, nella peggiore con una leggerezza tale da far impallidire persino il più sbadato dei bambini all'asilo.
Ho visto le comunicazioni delle aziende preposte ai trasporti pubblici passare dal superficiale al ridicolo, mentre sotto i nostri finestrini l'acqua passava in 10 minuti da mezzo metro a un metro buono di altezza.

Ho visto vecchi stremati perchè rimasti aggrappati a un albero per ore,
mentre sarebbe bastato che qualcuno (sindaci, prefetti, capi e capetti di qualche ente non mi interessa) si fosse fatto carico per una sola volta delle proprie responsabilità
(quelle che si sbandierano solo in tempo di elezioni e di grandi proclama)
e bloccare al traffico una strada, la 195, che solo per miracolo non è diventata la tomba per tutti gli automobilisti che la percorrevano.

Bastavano 4 pattuglie (QUATTRO) a bloccare il flusso dei lavoratori
ed evitare così che tutti coloro che erano in auto rischiassero quello che hanno rischiato.

Ne sarebbero state necessarie di più di pattuglie, molte, tantissime di più,
per sbattere in galera gli idioti e i criminali che hanno rilasciato licenze edilizie
come si elargiscono le caramelle ai bambini.
Licenze per capannoni o case o asili!
Licenze per piccole dighe che hanno ostruito il passaggio dell'acqua
o che si sono trovate sul suo percorso.

Licenze per CINQUE morti che potevano essere cento.
Licenze per CINQUE famiglie che piangono di dolore e di rabbia.
Licenze per rubare, ammazzare e rimanere impuniti.

Licenze per la solita ipocrisia all'italiana che domani ci farà scordare
che i morti, gli sfollati e gli impauriti di ieri sono la responsabilità
di qualcuno.

Qualcuno che ha nomi e cognomi,
qualcuno che dovrebbe pagare per quello che è successo.

Perchè l'Italia di questo ha bisogno:
di nuove licenze.
Licenze per avere giustizia,
licenze per avere la certezza di essere al sicuro,
licenze per avere la tranquillità che merita chi ha sempre fatto la cosa giusta,
licenze che facciano sapere a chi la cosa giusta non l'ha mai fatta che non la farà franca.
Non questa volta.
Non con i morti sulla coscienza.


Nicola Orritos


P.S. Scusate, so che in Italia accadono ogni giorno cose come questa e forse anche peggiori, ma questa l'ho vista con i miei occhi e ho bisogno di scriverne: anche se forse non basterà a farmi stare meglio spero almeno che possa essere letta da qualcuno che può fare ben più di me.

Wednesday, October 1, 2008

Il mondo della moda

Non si parla più di Tibet... Anche le tragedie sono soggette alle leggi della moda.

P.S. Non si parla più di tante cose, ma per oggi una tragedia mi basta e mi avanza.

Monday, August 4, 2008

MySQL vs Ubuntu 8.04: Default settings really annoy me!

By default Ubuntu 8.04 sets MySQL to listen to local connections only.
This really is an annoying and stupid thing I found in the server (!) version of Ubuntu Hardy Heron.

Here the solution.

Here some thoughts of mine:
  • Does a server mantainer need Ubuntu to prevent him from using MySQL for the purpose it has been meant?
  • Does someone still use all-in-one machines, equipped with DBMS, appserver, webserver and whatever else (maybe someone like this still exists...)?
I have to admit it: the only OS I saw doing stupid things like this one is... Windows.

Sunday, August 3, 2008

Tunneling Desktop Environments via SSH

Xorovo "Shared Knowledge" Program


Sometimes working with SSH using the terminal isn't enough. These times SSH could be used to tunnel a graphical interface from the remote machine to the one we are using.


Requires:

Server machine: Linux, Gnome OR KDE OR any other desktop environment running on a X server

Client machine: any X-server-powered OS (Linux works with X by default, but also Windows machines could be equipped with some sort of X server), SSH client installed



Procedure: Starting simple graphical applications

First of all start the console and type:
ssh -X username@remotehostname -p port

providing the right username, remote host name (or remote host IP) and the right port.

After providing the password you are logged in the remote machine.
You can start any application of the remote machine, e.g. you can do:
gedit &

and Gedit will be started on the remote host and displayed on our X server.


Procedure: Starting a desktop environment

First of all start the console and type:
whereis xterm

Remind the path returned by the command and type:
xinit path/to/xterm -- :1

This command opens a new X session (on the display "1").
This session contains an xterm terminal.

In the xterm terminal type:
ssh -X username@remotehostname -p port

providing the right username, remote host name (or remote host IP) and the right port.

After providing the password you are logged in the remote machine.
You can start any application of the remote machine, but the useful thing is you can also start an entire desktop environment:

gnome-session (if you want to start Gnome)
startkde (if you want to start KDE)
startxfce4 (if you want to start XFCE4)

Wednesday, July 16, 2008

Programmers' Golden Rule

  • Let w be your typical work day,
  • Let a b is a bug discovered at m minutes before w is finished,
  • Then, iff m <= 60, the following holds:
(1)  b must be ignored for the following m - 1 minutes
and taken care of at w + 1

This is the same as saying that a good restful night is determinant to solve even the most fearful bug.

And it's also equivalent to saying that ignoring (1) is the best way to introduce more bugs and confusion instead of actually resolving the initial bug.

Trust me.

Saturday, July 12, 2008

Ipocritically correct

Ci siamo quasi: un'altra notizia così e potrei incazzarmi... di brutto!

Fin dove arriverà l'ipocrisia di una classe dirigente corrotta, fino a dove il viscido servilismo di molti organi d'informazione, fino a quando gli italiani ai quali l'attuale stato delle cose sta bene dovranno rovinare la vita alla (probabilmente sempre di meno) brava gente?

Senza contare che magari sarebbe ora di pensare ai problemi veri (volete l'elenco? Ogni giorno qualcuno muore mentre lavora, qualche vecchio muore solo e abbandonato, si fanno le cacce all'immigrato e si ha il coraggio di vantarsene, si ruba, si ammazza e la si fa sempre franca... che dite, proseguo?).

E comunque, visto che ci siamo:
È anche la mia opinione e non solo della Guzzanti che tra 20 anni (io spero prima...) un papa corrotto (uno a caso e con la 'p' minuscola) se la dovrà vedere con qualche "diavolone frocione"... (Oooops! Scusatemi quelli che benpensano: ho detto "frocione"!).

Ed è anche un'altra mia opinione che TUTTI, a partire dal capo dello stato (anche lui minuscolo), fino al più indegno (come se ce ne fossero molti "degni") deputato di questo paese non mi rappresenti più e mi abbia davvero stancato: siete le zecche della nostra società, voi e quelli ai quali sta bene che continuiate a stare dove state.

E siete ancora più zecche voi italiani che appoggiate questi signori, nella consapevolezza che a voi conviene o nella inconsapevolezza di essere troppo stupidi per avere diritto al voto!

VisualVM: graphically profiling Java applications

VisualVM is a new tool Sun is providing for doing runtime analysis of Java applications (both local and remote ones).
It mades available through a simple GUI all sort of graphical data about threads, heap, GC, classes and much more (being it expansible through plugins).
It deeply integrates with a number of CLI ("Command Line Interface") tools the JDK already comes with.

Right now I can't tell you more than this, but I'm looking forward to writing a review if this tool proves itself really useful.

I wonder how it will perform when profiling Tomcat running my webapps...

Friday, July 11, 2008

Cinque poesie incivili


E io ci aggiungo la mia:
Non ero in piazza, non vi sono ancora sceso...

Tuesday, July 8, 2008

Io il Sabato porto a spasso orchi e streghe (a Berlino)

Vorrei asserire pubblicamente una legge dell'universo recentemente scoperta (si badi bene: non un teorema, ne una teoria... una legge):
L'ultimo album degli Afterhours è semplicemente meraviglioso

Go go Hyenas!

Wednesday, July 2, 2008

A great river always starts up as a little spring

Every time I come to read a sentence similar to "new search algorithm will annihilate Google" or something like "X researchers teamed to find the anti-Google technology", well, I always feel the same:
Those pretty heated boys are likely to be first misunderstood, secondarily praised as the new Leonardo Da Vinci of the search-engines market, then beaten up by some quite obvious objections and finally forgotten in no time.

And, 'til now, they proved me right every time.

The reason is pretty simple: this kind of claims may be absolutely correct and these people really found something interesting and new, but they also found the worst possible way of promoting and marketing their idea: going against Google.

Why going against a Mountain with your new car is really a bad idea should be quite obvious, but let me offer some not-always-cited additional reasons:

People do really like Google

This assertion may seem incorrect but the incredible success of the Mountain View giant would never be so explosive without that appeal they have (it's like that other one Apple has too).


Google simply works

And, you may throw a wild goat (or whatever you usually throw at blasphem prophets) at me, their algorithm works damn well.


Today Google is perceived as
THE search-engine

And this one doesn't really need further explanations...


Right by now 
Google isn't only search

Just look at their on-line office suite, GMail, YouTube, AdSense, AdWords, Maps, Android and so on.
All the services Google offer contribute to the appeal we told before and increase the number of data they can reach with their search algorithm.


So, why do you insist on promoting your ideas as alternative to Google?!?
Just be smart: promote them as complimentary to it or, best of all, do not even cite Google when describing your "completely-new-and-mighty-algorithm".

I think someday, by doing so, your ideas could become a Mountain.
Or a great river, if you like it better.

Sunday, April 6, 2008

Io non guarderò le olimpiadi quest'anno

Come da titolo, e non potendo fare molto di più, anche io a modo mio boicotterò il governo cinese, non guardando le olimpiadi.

Giusto per non scordare che in Tibet se non sei d'accordo con il governo cinese sei già praticamente mezzo morto.

Inoltre credo che boicotterò qualsiasi prodotto cinese. Basta poco: controllate il classico "made in china" e agite di conseguenza.

Infine sarebbe splendido se tutta la "blogosfera" iniziasse a ignorare qualsiasi iniziativa, notizia tecnologica/economica proveniente dalla cina, riportando solo quelle di carattere sociale e di denuncia.

Thursday, April 3, 2008

Tuesday, April 1, 2008

Open- o Closed-Source pari sono

Il supporto all'editing tramite documenti Master in OpenOffice è a dir poco imbarazzante: nella migliore delle ipotesi non funziona, nella peggiore... pure.
Insomma a dirla tutta o è spaventosamente buggato o non è stato proprio implementato...

Sul versante Closed-Source le cose non cambiano: Word 2003 è proprio buggato... dal SP1 in poi!
Infatti prima che applicassi il SP1 e il SP2 tutto funzionava meglio (non "bene" si noti... "meglio" o "meno peggio").
E figuratevi se le cose le hanno aggiustate con Office 2007... si vede lontano un miglio che non è altro che un Office 2003 con una diversa interfaccia grafica...

Ora mi sto chiedendo: solo io quando scrivo del software lo testo approfonditamente per evitare simili figure di £$%*# ?!?

Consiglio: se dovete realizzare layout complessi o, almeno, professionali non usate ne l'uno ne l'altro.
Basta elaborare il testo dove volete voi (anche BloccoNote va bene) e poi usare per l'impaginazione i programmi che sono specificatamente pensati per fare impaginazione (sembra ovvio, ma non sempre lo è).

Consiglio Scribus e, se proprio volete fare il botto, InDesign. Punto.

Sunday, March 30, 2008

Dead or Alive?

Comunico alla gentile clientela che sono clinicamente vivo.

Alla meno gentile clientela e, in generale, a tutti quelli che vorrebbero vedermi "orizzontale, possibilmente freddo" (o simile) comunico la cosa con il più profondo dispiacere.

Thursday, February 28, 2008

Google Apps restyled - Updates

Aggiornamento:
Il restyling è verificato sul word-processor non solo di Google Apps ma anche sulla versione individuale di Google Docs.
Attualmente sono stati aggiunti alcuni nuovi pulsanti integrati nella barra che contiene i comandi di editing.
In particolare il pulsante "Save" (quello con il floppy) viene spostato in questa barra a partire dalla posizione (effettivamente un po scomoda) che occupava precedentemente (in alto a destra sopra le schede "Share" e "Publish").

Per ora nessuna traccia di elefanti in tutù...

Google Apps restyled

Sembrerebbe che Google Apps (la versione integrata dei tools Google per le aziende) e in particolare Google Docs stia subendo (o abbia già subito) un leggero restyling grafico.

Per ora non ho ancora notato nuove o modificate funzionalità, ma data l'ora potrei benissimo non trovare niente di strano in un elefante azzurro col tutù rosa che mi chiede dov'è Via Dante...

Wednesday, February 27, 2008

Prima di Mezzanotte

È da un po che non posto e quindi colgo l'occasione per raccomandarvi gli Afterhours.
A quest'ora garantiscono essenzialmente (ma non solo) tre cose: Lucidità, Trasporto e soprattutto Buona Musica (quella con le maiuscole).

Se aveste qualcosa in contrario evitate di comunicarmelo: non reagirei bene.

Thursday, February 14, 2008

Wednesday, February 13, 2008

Overcome fear

Have you ever wondered about importing the Voice XML Schema (see http://www.w3.org/TR/voicexml21/) into an Eclipse EMF model? Well, I have, and the result was a bunch of really annoying errors that came out after about 3 minutes of CPU intense work.

Errors I wasn't prepared to. Just for being sure of what my eyes saw I validated the VXML XSD file (using XSV)... no errors found... mmmmhhh...

What to do next? Two options:
  • find why the Eclipse XML parser (I suspect it is Xerces) isn't working and fix it (I can only imagine the divine punishment I deserved by only thinking of it...) or try to adjust the XML Schema to avoid the errors (if you wanna give it a try I warn you that XML Schema is very hard not only to write but just to understand);
  • google the web to find a Good Samaritan who already solved this

You know? Only one person can solve this. His name is Tim Myer and I want to thank him for his really helpful post. Thank you Tim!

And you folks, whatareyouwaitingfor?!?! Go check Tim's post to make out of this dreadful situation and easily overcome your fear!

Tuesday, February 12, 2008

Back in black

Moved to a new flat (and a new ADSL provider).
So, basically... I'm back!

Monday, January 28, 2008

A Cesare quel che è di Cesare

"Ajò... non hai scritto niente su tuo fratello nel sito... itte melone" *

* L'espressione "itte melone", rivolta al sottoscritto, sta ad indicare una persona poco accorta e di solito un po stupidotta. Letteralmente: "che melone [che sei]".

Friday, January 25, 2008

Ridi Pagliaccio

E venite pure ad esultarmi sotto il muso
Pagliacci!

Io vi canterò
"Ridi",
"Pagliaccio"
Anche se poi, come nell'aria,
saprò che da ridere poco è rimasto

Io poi proprio non riderò,
non oggi;
non di me;
ne di voi

Soprattutto non di voi,
chè son tutto rabbia e livore,
tronfi e grassi come siete;
ben in alto assestati

E se poi questo non fosse già troppo,
sempre più in alto vi tirate
e non vi accontentate mai di aver preso
a noi che si sta in basso

Verrà il giorno
che anche noi pagliacci si rida di nuovo?
Opinioni non ne abbiamo...
Ideali forse



P.S. Ora, siccome mi piace dire le cose come stanno, la dedico agli innumerevoli berlusconiani che in questi giorni mi sfileranno davanti con i loro sorrisi tronfi.
Io dal canto mio mi limiterò a un sorrisetto di accondiscendenza, come si usa fare.
O magari, se vi reputerò abbastanza intelligenti, vedrò di ignorarvi completamente.

P.P.S. A ben pensare poi la dedico a me e a chi ne capisce qualcosa. I berlusconiani, detto volgarmente, si fottano.

I am Generation

System of a Down sing about "a generation that didn't agree".
Well, looking at the actual situation here in Italy, I AM THAT GENERATION

Saturday, January 19, 2008

SENZA TITOLI

A vedere quel che sta succedendo in Italia, gli attacchi ormai plateali alla magistratura, l'imbecillità di chi vorrebbe che i Napoletani si aiutino da soli (dimenticando che le montagne di spazzatura lì ce le hanno sotto casa anche E SOPRATTUTTO le brave persone e non i disonesti e i camorristi), i vari cartelli e le varie multinazionali che alzano i prezzi strangolando la povera gente e ammazzando i propri operai, a guardare tutto questo un solo sentimento dovrebbe essere rimasto alle brave persone (credo poche) rimaste in Italia: l'indignazione.

Ma mi rendo conto di chiedere troppo. Infatti quello che rimane è invece un senso di impotenza, una disperazione cronica e la sicura, certa e ineluttabile sensazione che le cose ci stiano scivolando di mano verso un punto di irrimediabile non ritorno.

Ma l'italiano medio (me compreso) non si rimbocca certo le maniche, men che meno si prepara a fare sacrifici e di sicuro non abbozza nemmeno l'idea di mettersi in discussione.
No, l'italiano medio fa spallucce: "cosa posso farci io?", "se lo stato ruba a me io rubo a lui", "io i napoletani non li aiuterei neanche morto", etc...

No, ma dico: vi rendete conto?!? Siamo a questo punto e ancora aspettiamo che tutti questi problemi si risolvano da soli come per magia, o che, peggio ancora, li risolva chissàchì-dotato-di-chissàquali-superpoteri...

Lo volete sapere chi deve risolvere la cosa (non che non lo si sappia anche fin troppo bene s'intende: semplicemente non lo si vuole accettare) ?

Noi, NOI, N-O-I

Bene, adesso che l'ho scritto non ho più scuse neanche io.

Tuesday, January 8, 2008

"Io ho la macchinina quella rossa della pubblicità e tu no!"

Secondo quanto riferito da "Edit" (il blog di HTML.it), una delle ultime campagne pubblicitarie della Mozilla Foundation stavolta l'ha "fatta un po fuori".

Io concordo... e rilancio anche: secondo me stà storia dei confronti ha fatto il suo tempo (se mai ne ha avuto uno...): io non uso determinati prodotti open/free perchè la controparte made in Redmond "sucks" (il che non è sempre vero tra l'altro).

Io uso Linux perchè mi piace a prescindere, senza confrontarlo con Windows.
Uso Firefox perchè è ricco di funzionalità, accattivante (anche se dopo questa "genialata" lo è molto di meno) e ampiamente estendibile.

Ripeto, secondo me è ora di finirla con questi confronti: il mondo open non è bello perchè "meglio di quello closed", ma perchè ha SUOI E SOLO SUOI punti di forza, del tutto originali, che non hanno riscontro nella contro-parte closed e sui quali bisogna puntare invece che su queste solite, stupide "crociate" nel nome del software libero.

Che poi, a ben guardare, la "libertà" è anche quella di poter dire a qualcuno "a me piace questo, ma tu sei LIBERO DI SCEGLIERE QUALCOS'ALTRO".

An approach to scheduling policies handling and implementation in FreeRTOS

Introduction

The FreeRTOS scheduler is something slightly different from the common concept of "scheduler" people are used to when talking about Operating Systems.
FreeRTOS does indeed provide a scheduling mechanism, not a scheduling policy (C'mon... Round-robin running fixed-priority tasks can't be truly considered a scheduling policy... Can't it?).

1. Possible solutions

Thus the FreeRTOS system lacks a convenient scheduling policy and a convenient way to effortlessly provide it to task developers.
Essentially there are three possible solutions:
  • Hard-coding policies within the FreeRTOS scheduling mechanism
  • Collaborative scheduling
  • Enhanced collaborative scheduling

1.1 Hard-coding policies within the FreeRTOS scheduling mechanism

It essentially means modifying the code which manages context-switches by implementing into this very code the desired scheduling policy.
It is a very comfortable solution, simple and effective, but violates a good software design principle: a neat separation should be kept between mechanisms and policies. Finally, it implies modifying critical portions of the system, potentially introducing very annoying bugs.
These considerations probably make it the worst possible solution among the ones proposed here.

1.2 Collaborative scheduling

Relying on collaborative scheduling (that is: let tasks self-administrate themselves) is another possible choice: tasks share all the same priority and mutually leave the CPU to other ones by calling "taskYELD()". This way tasks are scheduled in a round-robin fashion and each one of them runs for an amount of time decided by the running task itself. This one is kind of an elegant and simple solution, but it lacks in flexibility and, above all, in a real-time environment preemptive scheduling is close to be an unavoidable choice. Least but not last, it often implies each task being aware of the other tasks needs, "intentions" and timings: but such a behavior breaks another very desirable principle: concurrent processes must be kept "isolated".

1.3 Enhanced collaborative scheduling

Probably, the best possible solution is to find a way to build a "Scheduler" task upon the primitives already provided by FreeRTOS, while relying on the preemptive scheduling mechanism it already provides. This approach is the most attractive and elegant one, but it's not simple to think of a way to implement it.

Let's start looking at what primitives and mechanisms FreeRTOS provides.
FreeRTOS has a built-in mechanism for controlling tasks (i.e. them can be suspended, delayed and resumed from an Interrupt Service Request or from an event) and it also provides primitives such as "SetPriority()" and "GetPriority()" for managing the priority of a task.
The fact is we get caught in a sort of deadlock when using these last ones to achieve our objective, as shown from the following example.

Let we have three tasks, aTask, myTask and scheduler. The latter is obviously the scheduler of the system (and it's likely to schedule the other two tasks).

A solution would be to set the highest priority (say "4") for the scheduler and a lower priority for the other tasks (let it be "2"); but by doing so we prevent aTask and myTask by running at all because the scheduling mechanism of FreeRTOS at the moment of the context-switch always chooses the highest priority task.

Well: let's try to play with SetPriority() and GetPriority(): the first time the scheduler gets executed it holds the highest priority; to permit e.g. aTask to run it downgrades its own priority (of the scheduler) and the one of myTask.
But this way, unless aTask calls SetPriority() to boost the scheduler priority before a context-switch occurs, the scheduler and myTask won't have any chance to be executed anymore because of their lower priority.

So a real solution would be to use, instead of the pair Set/GetPriority(), another primitive: taskDELAY() (or, even better, taskDELAY_UNTIL()).
By doing so the algorithm changes as follows: the highest priority task is our scheduler again. When it gets executed it enforces a certain policy (e.g. EDF) by adjusting tasks priorities. Once it has finished its job it just delays its execution of a certain amount of time by calling taskDELAY_UNTIL().
Being the highest priority task, the scheduler it's scheduled immediately once it finishes its delay period (for the sake of precision the scheduler must also wait until a context-switch happens and, because of that, things should be arranged to avoid losing the predictability of the system that assures the hard real-timeness).
During the time the scheduler is sleeping the other, lower-priority, tasks gets executed according to their priority.

Obviously, by using this approach an important effort must be spent in making the amount of processing time used by the scheduler shorter as possible, too.

Although this approach can be considered a particular kind of collaborative scheduling it leaves tasks completely unaware of the policy being applied itself and, best of all, a task isn't required to know nothing nor about other tasks nor about the scheduler (which is, in fact, a task itself).
From a certain point of view, the most attractive feature of this algorithm is the tasks are required to embed no code at all to support it.

Notice how no particular constraints are posed on the policy being chosen, permitting a high degree of freedom to implement in the scheduler whatever we need, without of the tasks becoming aware of that.
This also means this algorithm provides a great flexibility, as explained in the following chapter.

2. Advanced aspects

Three advanced behaviors could be added to our scheme:
  • Dynamic scheduler delay period estimation
  • Multiple-levels schedulers
  • Multiple-policies schedulers

2.1 Dynamic scheduler delay period estimation

With a little effort a powerful feature can be provided to our algorithm: every time the scheduler gets executed it could collect some informations about the tasks and how they are behaving and it may consequently decide different lengths for its delay period to last, resulting in a greatly flexible policy which can try to reserve the highest possible CPU time to the tasks without loosing the advantages of our algorithm.

2.2 Multiple-levels schedulers

Another way of taking advantage of the flexibility of the algorithm is to create a system of multiple schedulers, each one of them acting at a different priority level and managing a group of tasks plus the scheduler of the lower priority level, in a pyramidal partitioning of the tasks.
By performing this partitioning the system could manage e.g. two different groups of tasks, each one of them performing different kind of jobs: one of them could be dedicated to Digital Signal Processing (DSP) and the other could manage all the activities involved in a cell-phone call (which includes DSP operations).

2.3 Multiple-policies schedulers

Multiple-levels schedulers perform a vertical partitioning1 of the scheduling operations, but a "horizontal" partitioning could be adopted as well.

It's the case of a system where more than one scheduler exist, each one of them enforcing a different policy semi-independently from the other schedulers.

Semi-independence is due to the fact that schedulers should avoid as much as possible to reciprocally interfere.

This scheme it's suitable for being used e.g. in a multi-CPU environment when task migration among the CPUs can occur; in such a situation two schedulers can be realised: one of them will manage tasks in a local context and the other one will interact with the other systems of the environment for establishing which task should be migrated and when.


NOTES:
  1. 1 The statement "multiple-levels schedulers perform a vertical partitioning" isn't completely true. In paragraph 2.2 DSP is not "under" other general activities that are performed during a cell-phone call, but is instead part of them. So partitioning should be considered both horizontal and vertical, not only vertical.