Curso Libre de Linux

Duración
Del 10 Al 26 de junio 2009 (3 semanas)
Horario:
De 10a.m. a 12 p.m.
Dias: Miércoles y viernes
Costo: Q.500.00
Salon: Laboratorio 215

MAS INFORMACION AQUI

Curso Libre de XNA

Duración
Del 10 Al 26 de junio 2009 (3 semanas)
Horario:
De 2 p.m. a 4 p.m.
Dias: Martes y jueves
Costo: Q.500.00
Salon: Laboratorio 215

MAS INFORMACION AQUI

Frases

Si deseas empezar y desarrollar algo grandioso, no necesitas millones de dólares de capitalización. Necesitas suficiente pizza y Diet Coke en la nevera, una PC barata y trabajo y dedicación para realizar tu idea.
John Carmack

CC7 - FASE 1.5 (4, Marzo 2009 11:55 PM)
in
  • 1.5 (35%, 125 lines) Implement priority scheduling in Nachos by completing the PriorityScheduler class. Priority scheduling is a key building block in real-time systems. Note that in order to use your priority scheduler, you will need to change a line in nachos.conf that specifies the scheduler class to use. The ThreadedKernel.scheduler key is initially equal to nachos.threads.RoundRobinScheduler. You need to change this to nachos.threads.PriorityScheduler when you're ready to run Nachos with priority scheduling.

    Note that all scheduler classes extend the abstract class nachos.threads.Scheduler. You must implement the methods getPriority(), getEffectivePriority(), and setPriority(). You may optionally also implement increasePriority() and decreasePriority() (these are not required). In choosing which thread to dequeue, the scheduler should always choose a thread of the highest effective priority. If multiple threads with the same highest priority are waiting, the scheduler should choose the one that has been waiting in the queue the longest.

    An issue with priority scheduling is priority inversion. If a high priority thread needs to wait for a low priority thread (for instance, for a lock held by a low priority thread), and another high priority thread is on the ready list, then the high priority thread will never get the CPU because the low priority thread will not get any CPU time. A partial fix for this problem is to have the waiting thread donate its priority to the low priority thread while it is holding the lock.

    Implement the priority scheduler so that it donates priority, where possible. Be sure to implement Scheduler.getEffectivePriority(), which returns the priority of a thread after taking into account all the donations it is receiving.

    Note that while solving the priority donation problem, you will find a point where you can easily calculate the effective priority for a thread, but this calculation takes a long time. To receive full credit for the design aspect of this project, you need to speed this up by caching the effective priority and only recalculating a thread's effective priority when it is possible for it to change.

    It is important that you do not break the abstraction barriers while doing this part -- the Lock class does not need to be modified. Priority donation should be accomplished by creating a subclass of ThreadQueue that will accomplish priority donation when used with the existing Lock class, and still work correctly when used with the existing Semaphore and Condition classes.

    You will probably find that there are two completely different ways to implement priority donation; one is extraordinarily simple and extraordinarily slow, and the other is much faster but a little more complicated. You will not receive full points on your design if you choose the easy route here. However, you will also not receive full points on your design if your solution is unnecessarily complicated, because it's better to do things correctly and slowly than to do them incorrectly and quickly. [I have an update to this paragraph at home, but my cable is down. update soon.] -->

     

Quién está en línea

Actualmente hay 0 usuarios y 1 invitado en línea.

Usuarios nuevos

  • cralph
  • dieguapo
  • alkabedam
  • EshkaOlssen
  • javier