1 / 12

University Of Palestine

University Of Palestine. College of Applied Engineering & Urban Planning Software Engineering Department. Concurrent and Real Time programming. Concurrent and Real Time programming. Scheduling and Schedulable Objects. Scheduling and Schedulable Objects. 2 st Term2009/2010.

Download Presentation

University Of Palestine

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. University Of Palestine College of Applied Engineering & Urban PlanningSoftware Engineering Department

  2. Concurrent and Real Time programming Concurrent and Real Time programming

  3. Scheduling and Schedulable Objects Scheduling and Schedulable Objects 2st Term2009/2010

  4. Scheduling and Fixed Priority Scheduling The Basic Model The Priority Scheduler The Parameter Classes Parameters Classes and the Priority Scheduler Alternative Schedulers and EDF Scheduling Summary 1 2 3 4 5 6 7 Contents

  5. 1. Introduction • The RTSJ provides a framework from within which on-line feasibility analysis of priority-based systems can be performed for single-processor systems. • The specification also allows the real-time JVM to monitor the resources being used and to release asynchronous event handlers if this use of resources goes beyond that specified by the programmer.

  6. 1. Introduction • The RTSJ introduces the notion of a schedulable objectrather than considering only threads. • A schedulable object is any object that implements the Schedulable interface (although the priority scheduler only supports real-time threads and asynchronous event handlers). • This allows the following attributes to be associated with each schedulable object • ReleaseParameters : Giving the processing cost for each release of the object and its deadline. • SchedulingParameters: The SchedulingParameters class is empty; however, subclasses allow the priority of the object to be specified along with its importance to the overall functioning of the application.

  7. 1. Introduction • This allows the following attributes to be associated with each schedulable object • MemoryParameters : Giving the maximum amount of memory used by the object in its default memory area, the maximum amount of memory used in immortal memory, and a maximum allocation rate of heap memory. • ProcessingGroupParameters : This allows several schedulable objects to be treated as a group and to have an associated period, cost and deadline (see Section 10.4.5).

  8. 1. The Schedulable interface • The methods in the Schedulable interface can be divided into three groups. • Methods that will communicate with the scheduler and will result in the scheduler either adding or removing the schedulable object from the list of objects it manages (called its feasibility set), or changing the parameters associated with the schedulable object (but only if the resulting system is feasible). • Methods that get or set the parameter classes associated with the schedulable object. If the parameter object set is different from the one currently associated with the schedulable object, the previous value is lost and the new one will be used in any future feasibility analysis performed by the scheduler.

  9. 1. The Schedulable interface • The methods in the Schedulable interface can be divided into three groups. • Methods that get or set the scheduler. For systems that support more than one scheduler, these methods allow the scheduler associated with the schedulable object to be manipulated. • The full definition of the Schedulable interface is given below. package javax.realtime; public interface Schedulable extends Runnable { // Methods which result in feasibility being tested. public boolean addIfFeasible(); public boolean addToFeasibility(); public boolean removeFromFeasibility();

  10. 1. The Schedulable interface public boolean setIfFeasible( ReleaseParameters release, MemoryParameters memory); public boolean setIfFeasible( ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters groupParameters); public boolean setIfFeasible( ReleaseParameters release, ProcessingGroupParameters groupParameters); public boolean setIfFeasible( SchedulingParameters sched, ReleaseParameters release, MemoryParameters memory); public boolean setIfFeasible( SchedulingParameters sched, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters groupParameters); public boolean setMemoryParametersIfFeasible( MemoryParameters memory); public boolean setProcessingGroupParametersIfFeasible( ProcessingGroupParameters groupParameters); public boolean setReleaseParametersIfFeasible( ReleaseParameters release); public boolean setSchedulingParametersIfFeasible( SchedulingParameters sched);

  11. 1. The Schedulable interface public MemoryParameters getMemoryParameters(); public void setMemoryParameters(MemoryParameters memory); public ProcessingGroupParameters getProcessingGroupParameters(); public void setProcessingGroupParameters( ProcessingGroupParameters groupParameters); public ReleaseParameters getReleaseParameters(); public void setReleaseParameters( ReleaseParameters release); public SchedulingParameters getSchedulingParameters(); public void setSchedulingParameters( SchedulingParameters sched); // Methods which get or set the scheduler. public Scheduler getScheduler(); public void setScheduler(Scheduler scheduler); public void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters processing); }

  12. Thank You ! Supervisor: Eng : Tasneem Darwish. Done by: Ramy Y. Baraka

More Related