www.ijecs.in International Journal Of Engineering And Computer Science ISSN:2319-7242

advertisement
www.ijecs.in
International Journal Of Engineering And Computer Science ISSN:2319-7242
Volume 4 Issue 2 February 2015, Page No. 10404-10408
An Efficient Solution To Task Scheduling And Memory Partitioning
For Uniprocessor
Jenish Ponraj Peter.J B.E, Navaneethan.S M.E
Ii Year, M.E-Embedded System Technologies,
Sri Shakthi Institute Of Engineering And Technology, Coimbatore.
Jenishponrajpeter@Gmail.Com
Assistant Professor, Department Of Ece,
Sri Shakthi Institute Of Engineering And Technology, Coimbatore.
Navaneethan.S@Siet.Ac.In
Abstract— A real time operating system (RTOS) is a specified time constraint in the real time application. A process of
RTOS using Open Mp, multiple tasks are concurrently running on the system. A large number of embedded applications
required multiple concurrent real-time tasks. In a concurrent real-time tasks, the task scheduling and memory allocation
are done on Uni-processor. These two functions are performed separately; tasks are scheduled first and then partitioned
among the processors. So, it requires an additional memory and also the waste of time period for every task. Instead of
cache memory, using SPM (Scratch Pad Memory) the execution time of embedded applications will be accurately
prefixed. (RR) Round Robin Scheduling is used to complete a task. Every task had a scratch pad number for the
allocation. Depending upon the Round Robin scheduling and Scratch pad number the task should be completed within a
given time period.
Keywords—Scratch Pad Memory;
Scheduling; Open MP; RTOS.
I.
Round
Robin
Introduction
An RTOS is a class of operating systems that are
intended for real time-applications. A real time application is
an application that guarantees both correctness of result and
the added constraint of meeting a deadline. An operating
system which follows the Real Time criteria. All components
of an RTOS must have Efficiency, Predictability and
Timeliness. Some tasks which may delay things are Interrupt
processing, Context switching, Inter-task communication.
Linux provides a few basic features to support real-time
applications.
An RTOS will provide facilities to guarantee deadlines
will be met. An RTOS will provide scheduling algorithms in
order to enable deterministic behavior in the system. An
RTOS is valued more for predictability than throughput.
Normally in RTOS, a tasks have three different states.
They are Running, Ready and Blocked.
In Scheduling, The data structure of the ready list in the
scheduler is designed so as to minimize the worst-case length
of time spent in the scheduler’s critical section.
Linux provides a few basic features to support real-time
applications. Provides soft-real time guarantees. Variants of
Linux with support for real-time applications. They both use a
real-time kernel which interacts with the main kernel. They
treat the Linux OS as the lowest running task.
II.
SCHEDULING ALGORITHM
ROUND ROBIN SCHEDULING
The round-robin (RR) scheduling algorithm is especially
design for time-distributed systems. A small unit of time,
called a time quantum or time slice, is defined. Round robin
Scheduling is to complete all the task without the priority
base. A time quantum is generally from 10 to 100
milliseconds. The ready queue is like as a circular queue as
shown in fig.2.1.
ALGORITHM:

Ready queue treat as a FIFO queue process..

Whenever new processes are arrived to the end
of the ready queue.

The scheduler catch the first process from the
ready queue and sets a timer to interrupt after 1
time quantum, and terminate that process.

The processes have a CPU burst time of
minimum 1 time quantum.
Jenish Ponraj Peter, IJECS Volume 4 Issue 2 February, 2015 Page No.10404-10408
Page 10404



In it the process itself will release
the CPU automatically.
The CPU scheduler will proceed to
the next process in the ready queue.
Otherwise, if the CPU burst time of the
currently running process is maximum than 1
time quantum,

The timer switch into turn off and
will cause an interrupt to the OS.

When a context switch will be
executed, then the process will be
put at the end of the ready queue.

III.
MEMORY ALLOCATION
CACHE MEMORY:
At first the schedule is done by assuming no available
scratch pad memories. Tasks T1, T2, T3, and T5 are ready to
be scheduled in the example as shown in fig.3.1. Task T5 will
not be scheduled at this point based on its ALAP value. Thus,
first tasks T1 and T2 will be mapped to the two available
processors P1 and P2. The scheduling algorithm will map T3
to P2 as it is free before P1 since the computation time of T2
is less than that of T1. In a similar fashion, the scheduling
algorithm will assign tasks T4 and T6 to processor P1 whereas
task T5 will be mapped to processor P2.
After finished the previous process,
the CPU scheduler select the next
process in the ready queue.
FLOW CHART:
Fig.3.1 Using Cache Memory
EQUAL PARTITIONED SPM:
Partitioning the available SPM memory equally between
the two processors. With such a criterion, the available SPM
budget will be equally divided between processors P1 and P2
regardless of what tasks are mapped to what processors as
shown in fig.3.2. The idle time can be reduced. Equally
partitioned SPM reduces the computation time of the whole
application.
Fig.2.1 Flow chart of Round Robin Scheduling
Fig.3.2 Equal Partitioned SPM
Jenish Ponraj Peter, IJECS Volume 4 Issue 2 February, 2015 Page No.10404-10408
Page 10405
NON EQUAL PARTITIONED SPM:
From the task schedule, we can see that task T4 can only
start after P2 is done executing task T3. The issue now is to try
to reduce the dead time between tasks T1 and T4 imposed by
the computation time for tasks T2 and T3. To minimize this
dead time, techniques usually allocate more SPM budget to
processor P2 to reduce the computation time of tasks T2 and
T3 as shown in fig.3.3.
memory application programming interface (API). Open MP
is not a new programming language. It is based on prior
efforts to facilitate shared-memory parallel programming.
Open MP is intended to be suitable for implementation on a
broad range of SMP architectures. It is use to create programs
for uni-processor. It has the major advantage of being widely
adopted, so that an Open MP application will run on many
different platforms. Board support package is an IAR
workbench. It is help to run a C program in ARM controller.
V.
RESULTS
EQUAL:
Fig.3.3 Non Equal Partitioned SPM
INTEGRATED:
The problem with the previous schedule is that it
allocated T3 to the same processor P2 that is scheduled to
execute T2. This choice is the reason for the dead time in the
schedule as T2 cannot benefit much from more SPM memory
which is clear from the Min, Avg, and Max values as shown in
fig.3.4. A good heuristic should take these values into
consideration where a better choice for T3 is to be scheduled
on P1 with all available SPM memory being allocated to this
processor, and the result is a schedule with the minimal end
time.
NON EQUAL:
Fig.3.4 Integrated
IV.
working
An application specific file is a programming file. It is in
the form of C language program. We have five different
approaches they are equal, non-equal, integrated, ILP and
pipe. Each approach run with a round robin scheduling. Every
approach have own algorithm, it will perform depend upon
this algorithm. These approaches are depends upon the Scratch
Pad Memory (SPM) allocation. Open MP is a shared –
Jenish Ponraj Peter, IJECS Volume 4 Issue 2 February, 2015 Page No.10404-10408
Page 10406
INTEGRATED:
ILP:
PIPE:
The above all diagram shows how the task should be
completed within a specific time period. Round robin
scheduling are used to schedule the task as the procedure of
Jenish Ponraj Peter, IJECS Volume 4 Issue 2 February, 2015 Page No.10404-10408
Page 10407
round1, round2,….round 5. Scratch Pad Number also used to
allocate the memory for every task. The total execution time
of all the task are shown in the above figure. Compare all the
results and choose the best approach for an efficient solution
to task scheduling and memory partitioning.
CONCLUSION
Tasks are concurrently scheduling and memory partitioning
within a specific time period. Scratch Pad Memory is used to
allocate a memory for every task with the help of scratch pad
number. Round Robin Scheduling is used to schedule the task,
as round 1, round 2, round 3, round 4 and round 5 for the
given quantum.
FUTURE SCOPE
In future rate monotonic algorithm is used instead of
round robin scheduling and also to demonstrate the hardware
by using sensor interfacing.
sractch-pad-based embedded systems”,“ACM transactions on
embedded computing systems, Volume -1 no -1,november,
2002.
[9]
Ozturk O. and Kandemir M., “An integer linear
programming based approach to simultaneous memory space
partitioning and data allocation for chip multiprocessors,” in
Proc. IEEE ISVLSI, Mar. 2006, p. 6.
[10]
Steinke S., Wehmeyer L., Lee B.-S., and Marwedel
P., “Assigning program and data objects to scratchpad for
energy reduction,” in Proc. DATE, 2002, pp. 409–415.
[11]
Sjodin J. and Platen C. V., “Storage allocation for
embedded processors,” in Proc. Int. Conf. CASES, Nov. 2001,
pp. 15–23.
[12]
Wayne Wolf, Fellow, IEEE, Ahmed Amine Jerraya,
and Grant Martin, Senior Member, IEEE, “Multiprocessor
System-on-Chip (MPSoC) Technology”, ieee transactions on
computer-aided design of integrated circuits and systems, vol.
27, no. 10, october 2008.
References
[1]
Anuradha B, Hemalatha M , Vivekanandan C,
Associate Professor1, PG Scholar2, Profeesor3 SNS College
of Engineering, Coimbatore, “task allocation and memory
partitioning for mpsoc in embedded system”, “international
journal of engineering science and innovative technology
(IJESIT), Volume 2, issue 3, May 2013.
[2]
Chatha K. S. and Vemuri R., “Hardware-software
partitioning and pipelined scheduling of transformative
applications,” IEEE Trans. Very Large Scale Integr., vol. 10,
no. 3, pp. 193–208, Jun. 2002.
[3]
Cho Y., Zergainoh N.-E., Yoo S., Jerraya A., and
Choi K., “Scheduling with accurate communication delay
model and scheduler implementation for multiprocessor
system-on-chip,” Des. Automat. Embedded Syst., vol. 11, nos.
2–3, pp. 167–191, 2007.
[4]
George Nikiforos, George Kalokairinos, Vassilis
Papaefstathiou, Stamatis Kavadias, Dionisis Pnevmatikatos
and Manolis Katevenis Institute of Computer Science, forth,
Heraklion, Crete, Greece – member of HiPEAC, “A run-time
Configurable Cache/Scratchpad Memory with Virtualized
User-Level RDMA Capability”, 6th hipeac industrial
workshop, palaiseau, france, Nov. 2008 – version: Dec. 2008.
[5]
Hassan Salamy, Member, IEEE, and J. Ramanujam,
Member, IEEE, “An effective solution to task scheduling and
memory partitioning for multiprocessor system on chip”, ieee
transactions on computer-aided design of integrated circuits
and systems, vol. 31, no. 5, may 2012”.
[6]
Hassan salamy, Olalekan sopeju, texas state
university, “an effective resource partitioning heuristic for
embedded applications on an mpsoc”, international journal of
computer applications”, Volume 97, No-10, July 2014.
[7]
Mythili.R, Mugilan.D, “An optimal memory
allocation scheme for scratch-pad-based embedded systems”,
international journal of computer trends and technology (ijctt)
- volume4 Issue5–May 2013.
[8]
Oren avissar, Rajeev barua, Dave stewart, embedded
research solutions, “An optimal memory allocation scheme for
Jenish Ponraj Peter, IJECS Volume 4 Issue 2 February, 2015 Page No.10404-10408
Page 10408
Download