I nte rna t io na l J o urna l o f   E lect rica l a nd   Co m p ute E ng in ee ring   ( I J E CE )   Vo l.   6 ,   No .   6 Dec em b er   201 6 ,   p p .   3 0 1 8 ~ 30 30   I SS N:  2 0 8 8 - 8708 DOI : 1 0 . 1 1 5 9 1 / i j ec e . v 6i 6 . 1 0 1 4 0          3018     J o ur na l ho m ep a g e h ttp : //ia e s jo u r n a l.c o m/o n lin e/in d ex . p h p /I JE C E   Trends   i n Ta s k   A llo ca tion  Techniq ues f o r Mul ticore  Sy ste m s       Arun K u m a S un da Ra j a n 1 ,   Sh rira m   K   Va s ud ev a n 2 ,   Ni r m a la   Dev i M 3   1 ,3 De p a rt m e n o f   El e c tr o n ics   a n d   Co m m u n ica ti o n   E n g in e e rin g ,   Am rit a   S c h o o o f   En g in e e rin g   Co im b a to re ,     Am rit a   V ish w a   V id y a p e e th a m ,   Am rit a   Un iv e r sit y ,   In d ia   2 De p a rtme n o f   Co m p u ter S c ien c e   En g in e e rin g ,   Am rit a   S c h o o l   o f   En g in e e rin g   Co im b a to re ,     Am rit a   V ish w a   V id y a p e e th a m ,   Am rit a   Un iv e r sit y ,   In d ia       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Feb   1 1 ,   2 0 1 6   R ev i s ed   Sep   7 ,   2 0 1 6   A cc ep ted   Sep   21 ,   2 0 1 6     A th e   f u n c ti o n a li ty   in   re a l - ti m e   e m b e d d e d   sy st e m b e c o m in g   c o m p lex ,   th e re   h a b e e n   a   d e m a n d   f o h ig h e c o m p u tatio n   c a p a b il it y ,   e x p lo it a ti o n   o p a ra ll e li sm   a n d   e ff e c ti v e   u sa g e   o f   th e   re so u rc e s.  F u rt h e r,   tec h n o lo g ica l   li m it a ti o n in   u n ip r o c e ss o in   te rm o f   p o we c o n su m p ti o n ,   sa tu ra ti o n   in   in stru c ti o n   lev e l   p a ra ll e li sm ,   d e lay   in   a c c e ss   o f   m e m o r y   b lo c k s ,   e tc .   led   t o   th e   e m e rg e n c e   o f   m u lt ico re .   M u lt ico r e   d e sig n   h a it c h a ll e n g e a w e l l.   In c re a se   in   n u m b e o f   c o re h a ra ise d   th e   d e m a n d   f o p ro p e lo a d   d istri b u t io n ,   p a ra ll e li z in g   e x isti n g   se q u e n ti a l   c o d e s,  e n a b l in g   e f fe c ti v e   c o m m u n ica ti o n   a n d   sy n c h ro n iza ti o n   b e tw e e n   c o re s,  m e m o r y   a n d   I   /   d e v ice s.  T h is  p a p e h a d   i d e n ti f ied   a n d   c o m p a re d   th e   d istri b u ti o n   sc h e m e f o tas k   d istri b u ti o n   in   a   m u lt ico re   e n v iro n m e n a n d   a ls o   th e   a lg o rit h m su it a b le  f o d e c e n tralize d   tas k   s c h e d u li n g   sc h e m e .   In   a d d it i o n ,   t h is  p a p e h a d   a d d re ss e d   th e   tec h n iq u e o f   f o r m u latin g   p a ra ll e tas k   b lo c k f ro m   se q u e n ti a c o d e .   K ey w o r d :   D ec en tr alize d   s c h e m e   Glo b al  s ch e m e   Har d w ar s p ec u lat io n   P ar titi o n ed   s ch e m e   R ea l ti m o p er atin g   s y s te m   Sch ed u l in g   al g o r ith m     T h r ea d   lev el  p ar allelis m   Co p y rig h ©   2 0 1 6   In stit u te o A d v a n c e d   E n g i n e e rin g   a n d   S c ien c e   Al rig h ts  re se rv e d .   C o r r e s p o nd ing   A uth o r :   A r u n   K u m ar   Su n d ar   R aj an   Dep ar t m en t o f   E lectr o n ics a n d   C o m m u n icat io n   E n g i n ee r in g ,   Am r ita  Sc h o o l o f   E n g i n ee r in g   C o i m b ato r e ,   Am r ita  Vi s h w a   Vid y ap ee th a m ,   Am r ita  Un iv er s it y I n d ia.   E m ail:  s _ ar u n k u m ar @ cb . a m r i ta. ed u       1.   I NT RO D UCT I O N   W ith   co n ti n u o u s   i m p r o v e m e n in   s e m ico n d u cto r   m a n u f a ctu r in g   tec h n o lo g y ,   e m b ed d in g   m an y   p r o ce s s in g   u n it s   o n   s in g le  c h ip   h as   b ec o m a   f ea s ib le  tec h n o lo g ical  tr en d .   S in g le  e m b ed d ed   ch ip   w it h   m a n y   in d iv id u al  p r o ce s s i n g   u n its   i s   ter m ed   as  m u ltico r an d   its   u s a g ca n   b s ee n   i n   m a n y   r ea ti m ap p licatio n s   lik n u clea r   p o w er   p lan t s ,   a u t o m o b ile  a n d   ae r o s p ac i n d u s tr y .   E m b ed d ed   s y s te m s   w it h   m u ltico r ar d ev elo p ed   w ith   e x p ec tatio n s   t o   ac h iev h ig h er   p er f o r m a n ce   an d   f aster   p ar allel  ex ec u tio n b u th r ep lace m e n t   o f   s i n g le  co r to   m u l ti co r h ar d w ar alo n e   d o es  n o al w a y s   g u ar an tee   th ex p ec ted   h i g h er     p er f o r m a n ce   [1 - 3 ] .   A lt h o u g h   ea ch   co r is   an   i n d i v id u al  p r o ce s s i n g   u n it  w it h   c ap ab ilit y   to   w o r k   i n d ep en d en t l y ,   h i g h er   p er f o r m a n ce   ca n n o b ac h ie v ed   u n les s   t h er ar s t ep s   to   en s u r p r o p er   lo ad   d is tr ib u tio n   a n d   s y n c h r o n izatio n   b et w ee n   co r es,  m e m o r y   a n d   I n p u t - O u tp u d e v ices   ar tak e n   in to   co n s id er atio n .   L o ad   d is tr ib u tio n   is   h an d led   b y   a   tas k   d is tr ib u to r ,   w h ic h   w il b ca p ab le  o f   av o id in g   p r io r ity   i n v er s io n   b et w ee n   ta s k s   i n   d if f er en co r es,  lo n g er   w aiti n g   ti m an d   u n n ec ce s ar y   m is s in g   o f   ta s k   d ea d lin es.    R o les  o f   ta s k   d is tr ib u to r   ca n   b d iv id ed   in to   2   lev els .   First   o n   d ec id in g   w h ic h   co r s h o u l d   ex ec u te   th tas k .   S ec o n d   is   o n   d ec id in g   t h ti m an d   o r d er   o f   th task   ex ec u tio n .   Fo r m er   is   te r m ed   as  allo ca tio n   ac tiv it y w h ile  t h latter   is   ter m ed   as sc h ed u li n g   ac tiv it y .   Af ter   id e n ti f y i n g   t h n ee d   f or   ef f icien tas k   d is tr ib u to r   an d   it s   r o le,   n e x is   to   d is ti n g u i s h   th t y p o f   task s .   T ask s   ca n   b b r o ad ly   cl ass i f ied   in to   t w o   t y p es  n a m el y   s eq u en tia l   an d   p a r a llel .   Seq u en tial  ta s k s   h a v to   b ex ec u ted   u n d i v id ed l y   a n d   as  p er   th p r o g r a m   o r d er .   Vio latin g   t h is   r u le  ca n   m o r e   o f ten   lead   to   d ata   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       Tr en d s   in   Ta s A llo ca tio n   Tech n iq u es fo r   Mu ltico r S ystem  ( A r u n   K u ma r   S u n d a r   R a ja n )   3019   in co n s is te n cie s .   P ar allel  task s   ar in d ep en d en co d s e g m e n t s   th at   ca n   b e x ec u ted   i n   p ar al lel  a m o n g   d i f f er en t   co r es.   Han d lin g   o f   tas k   t y p e s   i s   elab o r ated   in   th Sectio n   4 .     W ith   b r ie f   i n tr o d u ctio n   to   t h b asic  ter m i n o lo g ies   ( as  d ep i cted   in   Fi g u r 1 ) ,   t h is   p ap er   b eg in s   w i th   an   h i s to r ical  o v er v ie w   o f   t h r esear ch   ac tiv ities   i n   Sectio n   2 .   Sectio n   3   d escr ib es  in   d etail  th tas k   allo ca tio n   s ch e m es  s u itab le  f o r   m u lt ico r s y s te m . P ar allel  ex ec u tio n   o f   tas k   b lo ck s   u s i n g   co m p il er   an d   s p ec u lati v e   h ar d w ar tec h n iq u is   d is c u s s ed   in   Sect io n   4 .   I n   ad d itio n ,   c o n tr o f lo w   a n d   d ata  d ep en d en cies  th at   w ill   ar is e   w it h   s p ec u la tiv e   h ar d w ar e   i s   also   ex p lai n ed   w i th   s u itab le  ex a m p le s .   L ater ,   m at h e m a tica m o d eli n g   o f   tas k   allo ca tio n   alg o r ith m s   f o r   d ec en tr alize d   task   s c h ed u l in g   s c h e m e   is   b r o u g h o u t.  Fin a ll y ,   co n s o lid ated   r ev ie w   is   p r esen ted   in   Sectio n   5.           HW     Har d w ar e;     Fig u r 1 .   B u ild in g   B lo ck s   Des cr ib in g   Step s   t h at  ar I n v o lv ed   f r o m   T ask   B lo ck   Fo r m ati o n   t o   C o r A llo ca tio n       2.   RE L AT E W O RK   T h is   Sectio n   b r in g s   o u a n   o v er v ie w   o f   t h r esear ch   ac ti v iti es  t h at  w er ca r r ied   o u t   w it h   r esp ec to   th tas k   s c h ed u li n g   an d   allo ca t io n ,   s tar tin g   f r o m   s i n g le  co r an d   ti m li n ed   to   m u ltico r s ce n ar io .   Sch ed u l in g   a lg o r it h m s   w er o f   t w o   t y p e s ,   n a m el y   ti m eli n d r iv en   ap p r o ac h   ( al s o   ter m ed   as  t i m eli n e   s ch ed u lin g )   an d   p r io r it y   d r iv e n   ap p r o ac h .   I n   ti m eli n s ch ed u li n g   [ 4 ] ,   th ti m p er io d   w as  d iv id ed   in to   s lo ts   o f   f i x ed   len g th   a n d   tas k s   w er e   s taticall y   allo ca ted   to   s lo b ased   o n   th eir   f r eq u e n c y   a n d   ex ec u tio n   ti m e.   A lt h o u g h   t i m e lin e   s c h ed u l i n g   w as   s tr ai g h t f o r w ar d   to   i m p le m e n t,  it   w as   f r ag il u n d er   o v er lo ad     co n d itio n s - w h er tas k   co u ld   ex ce ed   its   p r ed icted   ex ec u tio n   ti m a n d   g e n er ate  d o m i n o   k in d   o f   ef f ec o n   th s u b s eq u en t   tas k s   to   s u r p ass   th e ir   ti m eli n e.   A   s o lu tio n   to   th d i f f icu lties   o f   ti m el i n d r iv en   ap p r o ac h   w a s   f o r m u lated   i n   p r io r it y   d r iv e n   ap p r o ac h .   I n   th is   ap p r o ac h ,   task s   w er as s ig n ed   a - p r io r   an d   s ch ed u ler   w o r k ed   b ased   o n   th p r io r ity   v al u e.     Ou o f   th m a n y   p r io r it y   b a s ed   ap p r o ac h es  [ 5 - 7 ] ,   th p r ed o m in a n w er R ate  Mo n o to n i ( R M)     w h er th p r io r ities   w er s ta ticall y   as s ig n ed   to   th task s   an d   E ar lies Dea d lin First  ( E DF)     w h er th e   p r io r ities   w er d y n a m ical l y   ass ig n ed   to   th tas k s ,   i n   ac h iev i n g   r ea ti m b eh a v io r   f o r   s in g le  co r e   en v ir o n m e n t.  I n   p ar allel,   ex p e r i m en ts   o n   f in d i n g   s u itab l an d   ef f icie n al g o r ith m s   f o r   m u l tico r en v ir o n m e n h ad   g ai n ed   i m p o r tan ce .   E x p er i m en ts   co m b i n i n g   p r io r it y   b ased   alg o r ith m s   ( R an d   E DF)   th at  w er e   s u cc e s s f u in   s i n g le  co r w as  t r ied   o v er   m u ltico r en v ir o n m en t.    Ma j o r   co n ce r n s   in   m ap p i n g   s u c h   alg o r it h m s   we r co m p lex it y ,   lac k   o f   r eu s ab ilit y   a n d   s c h ed u lin g   a n o m alie s   w i th   r esp ec to   lo ad   d is tr ib u tio n   an d   s y n ch r o n izatio n   b et w ee n   th c o r es [ 8 - 1 0 ] .   I n   o r d er   to   ac h ie v e f f ec ti v l o ad   d is tr ib u tio n ,   r esear c h er s   h ad   co m e   u p   w it h   v ar io u s   h e u r is tic   tas k   s ch ed u lin g   tec h n iq u e s   b ased   o n   ex ec u tio n   ti m e,   co m p le t io n   ti m o f   th e   tas k   a n d   als o   co m b i n atio n s   o f   alg o r ith m s   s u ch   a s   MI N M A d u r atio n   al g o r ith m s ,   s w it ch in g   al g o r ith m ,   s u f f er ag al g o r ith m s   etc. ,   [ 1 1 ] .   An o th er   ap p r o ac h   w a s   to   r e d u ce   th e   m a k esp a n   b y   u t iliz atio n   o f   p ar alle l   tas k   m o d el s .   C o m b i n atio n   o f   s eq u en tial  a n d   p ar allel  ta s k   s ch ed u li n g   al g o r ith m s   li k MI N   /   M AX     R o u n d   R o b in ,   M I N   /   M A X     L o ad   B alan ce ,   MI N   /   M A X     M in   Nu m b er   o f   T ask   an d   MI N   /   MA X     NT W P   w as  e x p er i m e n ted   [ 1 2 ] .   Deta ils   o f   th ese  al g o r ith m s   ar e x p lain ed   in   Sectio n   5   o f   t h is   p ap er .   T ask   s ch ed u li n g   alg o r it h m s ,   w h ic h   w er m o r o r   less   co m b in at io n   o f   s i n g le  co r al g o r ith m s ,   w er e   ass u m ed   to   b r in g   in   t h r eq u ir ed   p er f o r m an ce   u p li f to   m u ltico r s y s te m .   Ho w e v er   th r esu lt s   w er n o t   f r u it f u l.  A   s tr o n g   s u p p le m e n t   f r o m   e f f ec ti v tas k   al lo ca tio n   s c h e m w as   n ee d   o f   t h h o u r .   T y p icall y ,   th e   allo ca tio n   s c h e m es  ca n   b cl ass i f ied   u n d er   g lo b al,   p ar titi o n ed   o r   d ec en tr alize d   s ch e m e s .   Sectio n   4   o f   th i s   p ap er   f o cu s es i n   d etail  ab o u t th tas k   allo ca tio n   s c h e m es,  t h eir   m eth o d s   a n d   th eir   p r o s   &   c o n s .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  6 ,   No .   6 Dec em b er   2 0 1 6   :   3 0 1 8     30 30   3020   B r an d en b u r g   [ 1 3 ]   p er f o r m ed   an   ex p er i m e n tal  s tu d y   b et w ee n   p ar titi o n ed   E DF  an d   g lo b al  E DF  u s i n g   L I T MU S RT   -   d er iv a tiv o f   L i n u x   Ker n el  o n   2 4 - co r I n te Xeo n   p lat f o r m .   His   e x p er i m e n s h o w ed   th at   p ar titi o n ed   E DF  w o u ld   b m o r p r ef er ab le  f o r   h ar d   r ea l - t i m s y s te m   w h ile   g lo b al  E D w o u ld   b e   m o r ef f ec tiv e   in   s o f r ea l - ti m s y s te m .   An o t h er   ex ten s iv e   w o r k   in   t h p r io r it y   b ased   al g o r it h m   f o r   m u ltico r w a s   don b y   Z ap ata  &   A l v ar ez   [ 1 4 ] ,   w h er R a n d   E DF  al g o r ith m s   w er s u b j ec ted   to   b e s k n o w n   h e u r is t ic  f u n ctio n s w o r s f it  ( W F),   f ir s t   f it  ( F F),   b est  f it  ( B F)  an d   n e x f it  ( N F)  f o r   b o th   p ar titi o n ed   an d   g lo b al  s c h e m e.   Fu r t h er   s tatic  s ch ed u li n g   o n   p ar titi o n ed   s ch e m f o r   s in g le  co r an d   m u ltico r p r o ce d u r w er e     d em o n s tr ated   [ 1 5 - 1 6 ] .   Me an w h ile  L au za e t   al. ,   [ 1 7 ]   h ad   p er f o r m ed   co m p ar ativ e   s tu d y   o f   g lo b al  R a n d   p ar titi o n ed   R M   s ch e m e.   T h eir   o b s er v atio n   als o   s h o w ed   th at  f o r   s o f r ea l - ti m s y s te m s - g lo b al  s c h ed u li n g   ca n   p er f o r m   b etter   b ec au s o v er lo ad ed   p r o ce s s o r s   ca n   d is tr ib u te  ta s k s   to   u n d er   lo ad ed   p r o ce s s o r s   d y n a m i ca ll y ,   w h er ea s   i n   a   p ar titi o n ed   s c h e m e   ta s k   allo ca tio n   w a s   f i x ed .   T h e y   h ad   al s o   p o in ted   o u t   t h s c h ed u lin g   ef f ec ts   o f   R w it h   r esp ec t to   d elay   s ee n   i n   lo w   p r io r it y   tas k s   u n d er   g lo b al  an d   p ar titi o n i n g   s c h e m o f   m u l tic o r en v ir o n m en t.    L ee   et  al . ,   [ 1 8 ]   h ad   c o m u p   w it h   th r ee   alg o r it h m s   th at  o p er ate  o n   d ec en tr alize d   s ch em n a m el y   L o ca s c h ed u li n g ,   I n ter n o d es  s ch ed u lin g   a n d   Qu e u b alan c in g .   E ac h   o f   t h eir   tech n iq u w a s   ev al u ated   in   a   clu s ter ed   e n v ir o n m e n a n d   t h e ir   ex p er i m e n tal  r e s u lt s   s h o w e d   o f   th r o u g h p u i m p r o v e m e n u s i n g   d ec en tr alize d   s ch e m e.   W ith   g r o w i n g   i m p o r tan ce   f o r   p ar allelis m ,   w h ic h   ca n   b r in g   i n   h i g h er   p er f o r m a n ce ,   r ea l - ti m e   ap p licatio n s   s tar ted   to   f o cu s   o n   p ar allel  task   m o d els.  T r ad iti o n all y   co m p iler   an d   h ar d w ar s p ec u latio n   b ased   ap p r o ac h es  w er u s ed   to   d iv id s eq u e n tial  tas k s h o w e v er   it  h as  b ec o m co m p licate d   f o r   co m p iler   to   s taticall y   d eter m i n all  t h d ep en d en cies  esp ec ial l y   f o r   p r o g r a m s   w it h   d y n a m ic  d ata  s tr u ctu r es.  C o n tr o f lo an d   d ata  d ep en d en cies  w er e   also   co m m o n   to   o cc u r   w h i le  p ar titi o n in g   tas k   b ased   o n   s p ec u latio n .   I n     Sectio n   2   o f   th is   p ap er ,   p ar titi o n in g   tech n iq u e s   an d   d ep en d en cies  t h at  w o u ld   ar is ar ex p lain ed   in   d etail  w it h   ex a m p l e s .   Div er s i f icat io n   o f   tas k   i n to   p ar allel  m o d els  an d   ap p l y i n g   t h tr ad itio n al  d ea d lin al g o r ith m s   w er e   d escr ib ed   in   w o r k s   o f   L et   al . ,   [ 1 9 ] .   A n o th er   ap p r o ac h   in   co m b in i n g   D A d ir ec ac y clic  g r ap h s   w as   d escr ib ed   in   w o r k s   o f   Sai f u l lah   et  a l. ,   [ 2 0 ] .   T h ese  ap p r o ac h es  co u ld   n o h a n d le  d ep en d en cie s   t h at  w er e   d y n a m ic  i n   n at u r e.   I n   o r d er   to   h an d le  d y n a m ic  d ep en d e n cies,  h ar d w ar b ased   ap p r o ac h   u s i n g   ca ch li k e     s tr u ct u r es - ad d r ess   r eso l u tio n   b u f f er   ( AR B )   f o r   ce n tr ali ze d   s h ar ed   m e m o r y   m u ltip r o ce s s o r   [ 2 1 ]   an d   s p ec u lat i v v er s io n i n g   ca ch e   ( SVC )   f o r   d is tr ib u ted   s h ar ed   m e m o r y   m u ltip r o ce s s o r   [ 2 2 ]   h av e   b ee n   ex p lo r ed .   I n   th e s tech n iq u es,  ea ch   co r b u f f er ed   th v alu a n d   v al u w as  w r it ten   to   m ai n   m e m o r y   o n l y   w h e n   th e   o p er atio n   w as  co m m itted ,   el s d is ca r d ed   b y   b u f f er   f lu s h i n g   tech n iq u e s .   E x te n s iv e   r ep o r o n   s p ec u lati v m u ltit h r ea d   ar ch itect u r ca n   b s ee n   i n   t h w o r k s   o f   So h a n d   Vij ay k u m ar   [ 2 3 ] .   Sp ec u latio n   f o r   d ata  to   av o id   d ep en d en c y   w as a l s o   tr ied   an d   th s a m ca n   b s ee n   in   t h wo r k s   o f   Ha m m o n d   et  al. ,   [ 2 4 ] .   Of   late,   s eq u en tia p r o g r a m   ca n   b co n v er ted   to   p ar al lel  p r o g r a m   u s i n g   Op en MP   Fo r k - j o in   s tr u ctu r e.   B est  an d   w o r s ca s s ce n ar io s   o f   u s in g   t h is   f o r k - j o in   m o d el  w er ill u s tr ated   in   t h w o r k s   o f     L a k s h m a n a n   et  al. ,   [ 2 5 ] .   Fo r   b etter   u n d er s ta n d in g   o f   s c h ed u lin g   ter m i n o l o g y ,   b o o k   b y   L ab r o s s e   [ 2 6 ]   o n     µc - OS   I I   an d   f o r   to p ics   o n   p ar allelis m ,   b o o k   b y   He n n e s s y   &   P atter s o n   [ 2 7 ]   o n   C o m p u ter   A r ch itect u r i s   r ec o m m e n d ed   as th e y   p r o v id g o o d   in s i g h t.       3.   P ARAL L E L   E X E CU T I O O F   T ASK S   I n   o r d er   to   i m p r o v th e   p er f o r m an ce   a n d   to   u tili ze   th e   ca p ab ilit y   o f   m u ltico r s y s te m ,   tas k s   ar e   s p li t   in to   s m aller   b lo ck s   an d   m ad to   ex ec u te  s i m u l tan eo u s l y   i n   m o r th a n   o n co r e.   T h is   Se ctio n   ad d r ess es  o n   tech n iq u es  n ee d ed   f o r   p ar allel  co d ex ec u tio n .       3 . 1 .   T a s k   T y pe s   T ask s   ar b r o ad ly   class i f ied   i n to   t w o   t y p es  n a m e l y ,   s er ial  o r   s eq u en tial  tas k s   an d   p ar allel  o r   h ig h   p er f o r m a n ce   co m p u ti n g   tas k s .   Seq u en tia tas k s   h av to   b ex ec u ted   u n d i v id ed l y   a n d   as  p er   th p r o g r a m   o r d er .   Vio latin g   th i s   r u le  w o u ld   lead   to   d at in co n s i s te n c ies.  On   t h o th er   h an d ,   p ar allel  task s   ar co d s eg m e n ts   t h at  ar in d ep en d en t   an d   as  th eir   n a m s u g g est s ,   ca n   b o p er ated   in   p ar allel.   A d v an ta g o f   p ar allel   task   i s   r ed u ctio n   in   o v er all  e x ec u t io n   ti m e.   T h ca teg o r y   u n d er   w h ic h   tas k   f all s   p u r el y   d ep en d s   o n   th e   s y s te m   d es ig n .     B ased   o n   d ep en d en c y   i n   co d i n g ,   s o m e   Sectio n s   o f   s er ial  t ask   ar e   d iv id ed   i n to   s u b tas k s   an d   ea c h   s u b tas k   is   m ad to   r u n   in   p ar allel  a m o n g   th co r es.  B u wh o   p er f o r m s   th b r ea k i n g   o f   t ask s   in to   s u b tas k s ?   Su b tas k s ,   w h ich   ar e   co n ti g u o u s   p ar ts   o f   in s tr u ct io n   s tr ea m   an d   ar ex ec u ted   in   p ar allel,   is   id en tif ied   eit h er   b y   p r o g r am m er   d u r i n g   t h d esi g n   a n d   co d in g   p h a s o r   b y   co m p iler   o r   b y   u s i n g   s p ec u lati v h ar d w ar e   ( So h i& Vij a y k u m ar   ( 2 0 0 9 ) ) .   D etails o f   ea c h   tech n iq u ar el ab o r ated   in   th f o llo w in g   s u b S ec tio n .   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       Tr en d s   in   Ta s A llo ca tio n   Tech n iq u es fo r   Mu ltico r S ystem  ( A r u n   K u ma r   S u n d a r   R a ja n )   3021   On ce   t h s u b tas k s   ar id en tifi ed ,   th e y   ca n   b allo ca ted   to   o n o f   m u ltip le  co r es,  eit h er   s t atica ll y   o r   d y n a m icall y ,   u s i n g   t h allo c atio n   s c h e m e s .   Sectio n   4   el ab o r ates  o n   th allo ca tio n   s ch e m e.   P ar allelis m   ac h iev ed   b y   b r ea k i n g   p r o g r a m   i n to   s u b tas k s   i s   o f te n   r e f e r r ed   to   as  T h r ea d   lev el  p ar allelis m   T L P   an d   th i s   tech n iq u i s   d i f f er en f r o m   I n s tr u ctio n - lev el   p ar allelis m   I L P ,   as  ea c h   s u b tas k   i n   T L P   ca n   c o n tain   h u n d r ed s   to   m illi o n s   o f   i n s tr u ctio n s   t h at  ar ex ec u ted   i n   p ar allel  w i th   o t h er   s u b tas k s .   A r c h itect u r th at  u s es  t h r ea d s   o r   s u b task s   to   ex ec u te  p r o g r a m   in   p ar allel  is   r ef er r ed   to   M u ltit h r ea d   A r c h itect u r e.   E v e n t u all y ,   th is   t y p o f   ar c h itect u r ca n   f ac ilit ate  s i m u ltan eo u s   e x ec u tio n   o f   m u ltip le  ta s k s ,   a s   w ell  a s   m u ltip le  s u b tas k s   /   th r ea d s .   Alo n g   w ith   t h b en ef its   o f   f as ter   ex ec u tio n   d u e   to   p ar allelis m   in   m u ltit h r ea d ed   ar ch itectu r e,   ce r tain   o v er h e ad s ,   n a m el y   r eso u r ce   co n ten tio n - s h ar ed   m e m o r y   h a n d lin g ,   s y n ch r o n izatio n   a n d   lo ad   i m b alan ce   f o llo w .   I n   th u p co m in g   p ar t,  tech n i q u es  u s in g   co m p iler   an d   h ar d w ar to   b r ea k d o w n   s er ial   task   in to   p ar allel  ar d is cu s s ed .     3 . 2 .   Co m pil er   B a s ed  P a ra llelis m   Fo r m u la tio n   o f   s u b tas k s   u s in g   co m p lier   is   s tatic  in   n a tu r e .   Du r in g   co m p ila tio n   o f   p r o g r a m ,   th e   co m p lier   id en ti f ie s   co d s eq u en ce s   w h er s a m s e o f   o p er atio n s   ar ap p lied   to   m u lt ip le  d ata  ite m s   an d   f ac ilit ate s   p ar allel  o p er atio n   to   th at  co d s eq u en ce   .   F o r   ex a m p le,   co n s id er   iter atio n   f o r   ad d in g   n   o b j ec ts   o f   an   ar r a y .         Let  A   b th A r r a o s iz e     n   ,   e‟   b th ex ec u tio n   time  f o r   1   a d d itio n   o p era tio n   a n d   th n u mb er  o co r es  b m‟   Th ere   w ill  a ls o   b a d d itio n a ex ec u tio n   time  fo r   b r a n ch in g   o p era tio n   a n d   th is   b r a n ch in g   time  is   cu r r en tly  ig n o r ed   fo r   ea s u n d ers ta n d in g   o f th u n d erlyin g   co n ce p t.     I n   s eq u en tial  u n ip r o ce s s o r ,   th lo o p   p er f o r m i n g   ad d itio n   w il iter ate  n   ti m e s   an d   th r e s u lt  w i ll  b e   av ailab le  o n l y   af ter   t h d u r atio n   o f   n *   e   an d   th s a m i s   d e m o n s tr ated   in   A l g o r ith m   1 .       Initialize    m   number of Cores( C)   A   array of ‘n’ ele ments   Sum    result of add ition operation     m   = 1; uniprocessor /single cores   Sum = 0; initial value    i = 0;      for   every ‘i’  do until  ‘i’   is equal to   ‘n’       Sum = Sum + A[i];        Increment i;   end for     A lg o r ith 1 .   A d d itio n   o p era tio n   in   s in g le  c o r e   s eq u en tia l e x ec u tio n   C o mp lexity:   n   *   ;   n -   n u mb er   o f e n tr ies to   a d d ,   e -   ex ec u tio n     time  fo r   1   a d d itio n   o p era tio n       I n   m u ltit h r ea d ed   ar ch itect u r w it h   t h e   s u p p o r o f   co m p iler ,   t h ad d itio n   o p er ati o n   ca n   b e   p ar titi o n ed   a m o n g   th co r es  t o   co m p lete  in   p ar allel.   T h is   t ec h n iq u w o u ld   th e n   co n s u m       ( n /m  m)   *   e   ex ec u t io n   ti m e.   A d d itio n al  ef f o r o f   m   i s   i n cl u d ed   to   in d ica te  t h at  r es u lt s   f r o m   m   co r es  h a v to   b e   m er g ed /s u m m ed   u p   to g et h er .   I n   A l g o r ith m   2 ,   f u n ctio n   f o r   s p lit,  m er g a n d   ad d   is   s h o w n   f o r   r ef er en ce .     Initialize    m   number of Cores( C)   A   array of ‘n’ ele ments   Sum    result of add ition operation   Split   the ‘n’ addition operations among ‘m’ cores,   1              to n/m   for core P 0   [n/m + 1]      to 2n/m  for core P 1   ….   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  6 ,   No .   6 Dec em b er   2 0 1 6   :   3 0 1 8     30 30   3022   ….   [n(m - 1)/m + 1] to n  for core P m     add(start,end):   i = start;   count = count + 1; to identify the subtask number   for   every ‘i’  do until  ‘i’   is equal to   ‘end’ cores       Sum [count] = Sum [count] + A[i];        Increment i;     end for     merge:   for   every ‘i’  do until  ‘i’   is equal to   ‘m’ cores       Result =  Sum   (Values calculated in each core);       Increment i;   end for     A lg o r ith 2 .   A d d itio n   o p era tio n   in   Mu ltit h r ea d ed   A r ch itectu r w ith   co mp lier   o p timiz a tio n   C o mp lexity:   ( n /m  + m )   *   e;   n -   n u mb er o f e n tr ies to   a d d ,   e -   e xe cu tio n   time  fo r   1   a d d itio n   o p era tio n ,   m - n u mb er o f c o r es.       3 . 3 .   Sp ec ula t iv ely   M ultit hrea ded  A rc hite ct ure   I n   Sp ec u lati v el y   m u ltit h r ea d ed   ar ch itectu r e,   h ar d w ar p la y s   an   i m p o r ta n r o le  in   p ar titi o n i n g   s eq u en tial  p r o g r a m   i n to   s u b ta s k s .   T h h ar d w ar d o es  t h p ar titi o n in g   b y   s p ec u lati n g   th at  th e   s u b tas k s   ar e   in d ep en d en t.  E ac h   s u b tas k   is   s p a w n ed   f r o m   a n o t h er   s u b ta s k   an d   m ad to   p r o ce ed   in   p ar all el.   T h k e y   id ea   i n   s p ec u latio n   is   to   allo w   o u o f   o r d er   ex ec u tio n   b u f o r ce s   t h in s tr u ctio n s   to   co m m it  in   o r d er .   Hier ar ch y   o f   t w o   lev el  in s tr u c tio n   co m m it m e n t   is   r eq u ir ed   in   th is   ar ch itect u r e:  I n s tr u ctio n s   w it h i n   ea ch   co r ( s u b task s )   m u s t   lo ca ll y   co m m it  a n d   th o v er all   task   a m o n g   all  co r es  m u s g lo b all y   co m m it i n   g i v e n   p r o g r am   o r d er .   Dep en d en c y   h az ar d s   t h at  w o u ld   ar is in   a   s p ec u la tiv e   ap p r o ac h   an d   p o s s ib le  s o l u tio n s   f o r   h an d li n g   th d ep en d en c y   ar d is c u s s ed   as f o llo w s .     3 . 3 . 1 .   Depende ncy   T h o u g h   t h is   ar ch i tectu r s p e cu lates  t h at  th s u b tas k s   ar in d ep en d en t,  i n   r ea ti m s ce n ar io s   th e   s u b tas k s   ca n   h a v co n tr o o r /an d   d ata  d ep en d en cies.  C o n tr o l   d ep en d en cies  w il o cc u r   w h e n   b r an c h   d ec is io n   in s id e   s u b tas k   d eter m i n es  wh ich   s u b tas k   to   b ex ec u ted   n ex t.  So   s i m ilar   to   b r an ch   p r ed icto r s   s ee n   i n   I L P ,   s u b tas k   lev e p r ed icto r s   ar e   n ee d ed   to   p r e d ict  th f lo w .   L i k e w is d ata  d ep en d en cies  ca n   also   ar is w h e n   m e m o r y   o r   r eg is ter   v al u ca l cu lated   in   o n s u b tas k   is   co n s u m ed   in   o t h er   s u b tas k s .   I f   t h h ar d w ar d etec ts   co n tr o o r   d ata  d ep en d en cies  ac r o s s   th s u b ta s k s ,   th e n   th h ar d w ar en f o r ce s   t h co r r ec o r d er   o f   ex ec u tio n   o f   d ep en d en in s tr u ctio n s   a m o n g   th s u b tas k s .   Har d w ar w o u l d   b a b le  to   d etec th d ep en d en c y   o n l y   d u r in g   ex ec u t io n   o r   ea r l y   if   R eOr d er   B u f f er s   ( R OB )     co m m o n   to   all  co r es is   u s ed   i n   s p ec u la tio n .   I f   t h er h ad   b ee n   v io latio n   o f   co n tr o l - f lo w   d ep en d en c y   d u to   m i s p r ed ictio n   o r   d ata  d ep en d en c y   w h er co n s u m er   h ad   e x ec u ted   b ef o r its   p r o d u ce r ,   th en   t h h ar d w ar r o lls   b ac k   t h o f f e n d in g   s u b ta s k s   a n d   all   s u b tas k s   i n   later   p r o g r am   o r d er   [ 2 3 ] .   A s   g en er al  s a f et y   p r o ce d u r all  th s u b task s   f o llo w i n g   th o f f en d i n g   s u b tas k s   ar r o lled   b ac k .   Me c h an i s m s   to   id en ti f y   s u b tas k s   t h at  ar n o a f f ec ted ,   h elp s   to   r ed u ce   n u m b er   o f   u n w an ted   r o llb ac k s .   Fo r   ex am p le,   co n s id er   th b elo w   co d s n ip p et  w h ic h   h i g h li g h t s   th co n tr o f lo d ep en d en c y .     Subtask A   {   while(1)          {   .....   if (condition > 0)     .....     spawn subtask B     .....   else     spawn subtask C           }   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       Tr en d s   in   Ta s A llo ca tio n   Tech n iq u es fo r   Mu ltico r S ystem  ( A r u n   K u ma r   S u n d a r   R a ja n )   3023   }     C o n tr o f lo w   o f   th p r o g r a m   is   p ar titi o n ed   in to   th r ee   s u b ta s k s   n a m el y   A ,   B   an d   C .   Su b t ask   A   is   a   lo o p   b o d y   w h er ea ch   i ter atio n   is   a n   i n s ta n ce   o f   th s u b task .   On i n s ta n ce   o f   Su b ta s k   is   p r ed icted   co r r ec tl y   an d   s p a w n s   s u b tas k   B .   Har d w ar p r ed icts   th at  n e x iter atio n   w il also   ch o o s s u b tas k   B   an d   s p a w n s   an o t h er   in s ta n ce   o f   s u b task   B .   T h s ec o n d   p r ed ictio n   is   i n co r r ec t! !   N o w   t h e   r o ll  b ac k   m ec h a n is m   f l u s h es   th e   i n s ta n ce   o f   s u b ta s k   B   an d   lo ad s   w it h   s u b task   C .   W it h   b etter   task   le v el   p r ed icto r s ,   r o ll b ac k   co s t c an   b av er ted .   Si m i lar l y ,   d ata  d ep en d en cies  ca n   also   b r in g   d o w n   th p er f o r m an ce   o f   m u ltit h r ea d ed   ar ch itectu r e.   k e y   id ea   f o r   d etec tin g   d ep en d en cies  is   to   k ee p   tr ac k   o f   th p r o g r am   o r d er   a m o n g   t h s u b tas k s .   W h e n   o n e   s u b tas k   e x ec u tio n   d eter m i n es   th n e x t,  ta s k   p r ed ictio n   ca n   b d o n co r r ec tl y   o n l y   if   t h n e x s eq u e n ce   i n   p r o g r am   o r d er   is   k n o w n .   Si m ilar l y ,   th is   o r d er in g   i s   cr iti ca in   d etec ti n g   a n d   en f o r cin g   tr u r e g is ter   a n d   m e m o r y   d ep en d en cies.     3 . 3 . 2 .   H a za rds   Fo r   ex a m p le,   co n s id er   t h b elo w   co d s n ip p et  w h ic h   h ig h li g h ts   o n   t h d ata  d ep en d en c y     m ult     a,b,c;     h ere,   a   = b   *   c   s ub      x,y,z;     h ere,   = y   -   z   m ult     d,v,x;     h ere,   d   = v   *   x   store    d,10(r1);  h ere,   d   is   s to r ed   in   mem o r [ 1 0 +R 1 ]   add      y,a,x;     h ere,   = a   + x   div     d,u,t;     h ere,   d   = u   /t   store    d,8(r2);   h ere,   d   is   s to r ed   in   mem o r [ 8 +R 2 ]            * R 1   a n d   R 2   a r r eg is ters   o f th co n tr o ller .     T h is   s eq u en tial  co d b lo ck   is   d iv id ed   in to   t w o   s u b ta s k s   an d   B   to   f ac ilit ate  p ar allel  ex ec u t io n .   No te:   Su b tas k s   m u s t b co n ti g u o u s   co d b lo ck s .     Su b ta s k   A             Su b ta s k   B   m ult    a,b,c;               a dd     y,a,x;   s ub     x,y,z;               d iv     d,u,t;   mult    d,v,x;               store  d,8(r2);   store  d,10(r1);        T h er ar e   3   p o s s ib le  d ata   in co n s is ten cie s   th at  m a y   r is f r o m   p ar allel  ex ec u tio n   o f   s u b ta s k   A   an d   s u b tas k   B   n a m el y ,   R A W   ( R ea d   Af ter   W r ite)   v io latio n     i f     a dd   in s tr u c tio n   o f   s u b tas k   B   r ea d s   th e   s o u r ce   'a '   b efo r   mult   i n s tr u ctio n   o f   s u b tas k   A   w r i tes o n   to   it.  Su b ta s k   B   w i ll  h a v e   o ld   v al u o f   'a ' ,   w h ic h   i s   d i f f er e n t   f r o m   th ac t u al  p r o g r a m   o r d er .   W A R   ( W r ite  A f ter   R ea d )   v io latio n   if   sub   in s tr u c tio n   o f   s u b tas k   A   r ea d s   'y f r o m   r e g is ter   a fte r   add   i n s tr u ctio n   o f   s u b tas k   B   w r ite s   to   th s a m e   s o u r ce   'y ' .   T h is   r esu lt s   i n   ' x '   to   h a v e   in co r r ec v alu f o r   s u b tas k   A.   W A W   ( W r ite  A f ter   W r ite)   v io latio n   i f   store   in s tr u ctio n   o f   s u b tas k   A   a n d   s u b tas k   B   in ter c h an g in   ex ec u tio n   o r d er .   B o th   in s tr u cti o n s   m a y   s to r s a me  va lu a b o th   th mem o r y   lo ca tio n s   w h ic h   i s   i n co r r ec t.  Div   o r   mult   r esu lt  in   s u b ta s k s   w il b to tall y   lo s a n d   o n l y   t h last   ex ec u ted   r esu lt  w il l b r ep licated   in   b o t h   th m e m o r ie s .       3 . 3 . 3 .   So lutio n   T h k e y   id ea   to   ac h ie v p er f o r m an ce   a n d   at  th s a m ti m e   t o   av o id   h az ar d s   is   to   allo w   o u o f   o r d er   ex ec u t io n   f o r   p ar allelis m   an d   to   f o r ce   t h in s tr u ct io n s   to   c o m m i i n   p r o g r a m   o r d er .   Hier ar ch y   o f   t w o   lev e l   in s tr u ctio n   co m m i i s   r eq u ir ed I n s tr u ctio n s   w it h i n   ea c h   co r ( s u b ta s k s )   m u s t   lo ca ll y   co m m it   an d   th e   o v er a ll   task   a m o n g   all  co r es  m u s t g lo b all y   co m m it i n   g i v e n   p r o g r am   o r d er .       4.   T ASK   A L L O CA T I O SCH E M E S   Hav i n g   i n f o r m atio n   o n   th e   p o s s ib ilit ie s   o f   ta s k   f o r m atio n   n e x i s   to   d is tr ib u te   tas k s   a m o n g   th e   co r es.  T h tech n iq u e s   f o r   task   allo ca tio n   ar class if ied   as  g lo b al  s ch e m e,   p ar titi o n ed   s ch e m e   an d   d ec en tr alize d   s ch e m e.   T h is   Sectio n   elab o r ates in   d etail  o n   t h b en e f it s   an d   d r aw b ac k s   o f   ea c h   s c h e m e .       Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  6 ,   No .   6 Dec em b er   2 0 1 6   :   3 0 1 8     30 30   3024   4 . 1 .   G lo ba l Sche m e   I n   th Glo b al  s ch e m ( Fig u r 2 ) ,   ce n tr alize d   s ch ed u ler   m a n ag e s   tas k   al lo ca tio n   to   i n d iv i d u al  co r es   an d   co n tr o ls   th s ch ed u li n g   s eq u en ce   g lo b all y .   B ein g   ce n tr alize d   s ch ed u ler ,   it  k n o w s   th s tat u s   o f   tas k s   alr ea d y   a llo ca ted   to   th co r e,   s o   w h e n e v er   h ig h   p r io r it y   task   is   r ea d y   to   ex ec u te,   i ca n   b i m m ed iatel y   ass i g n ed   t h p r o ce s s in g   u n it  f o r   ex ec u tio n .   B y   t h is   m et h o d ,   th o cc u r r en ce   o f   p r io r it y   i n v e r s io n   is   a v o id ed .     “Prio r ity  in ve r s io n   is   s a id   to   h a ve   o cc u r r ed   w h en   a   h i g h er  p r io r ity  ta s is   w a itin g   in   th r ea d y   q u eu o f o n c o r w h ile  a   lo w er p r io r ity  ta s is   s elec ted   to   ex ec u te  o n   a n o th er c o r e”.   [ 1 2 ]               n u m b er   o f   tas k s   a n d   T -   i th   T ask   in   th ce n tr al  q u e u e     Fig u r 2 .   Glo b al  Sch e m w i th   3   co r es a n d   ce n tr alize d   s ch e d u ler       I n   th is   s ch e m e,   ta s k s   ar n o a l w a y s   f ix ed   to   p ar tic u lar   co r e.   Mig r atio n   is   a   f ea t u r w h er task s   ca n   b m o v ed   f r o m   o n co r to   an o th er   an d   th i s   f ea t u r is   s u p p o r ted   in   th is   g lo b al  s ch e m e.   E v en   d u r in g   t h tas k   ex ec u t io n ,   tas k s   ca n   b m o v ed   f r o m   o n co r to   an o t h er .   Sc h ed u lin g   s tatic  p r io r it y   ta s k s   u n d er   g lo b al  s ch e m b y   e x ten d i n g   u n ip r o ce s s o r   R alg o r ith m   e x p er i m e n ted   b y   An d er s s o n   et  al .,   [ 1 1 ] .   C o n s id er   s ce n ar io   w h er ein   t h tas k   T1   r u n n in g   i n   C o r e1   is   p r ee m p ted   b y   h i g h   p r io r ity   tas k   T2 ;   n o w   th ce n tr alize d   s ch ed u ler   allo ca tes  T2   to   C o r e1   an d   p u ts   tas k   T1   o n   h o ld   u n til  a n y   co r b ec o m es  av ai lab le.     On ce   co r b ec o m es   av ailab le,   s a y   C o r e2   an d   if   tas k   T1   is   cu r r en tl y   t h h ig h es p r io r ity   ta s k   i n   r ea d y   q u e u e,   th e n   it  is   s c h ed u led   to   r esu m its   e x ec u tio n   f r o m   C o r e2 .   T h is   s ch e m m a y   a ls o   b r ef e r r ed   to   as  ce n tr alize d   s ch e m e - as  it  m ain ta in s   ce n tr al ized   r ea d y   q u eu e   an d   it  en s u r es  th a n o   s a m ta s k   is   b ei n g   e x ec u ted   at  th s a m ti m e,   r ed u n d an tl y   i n   m u lti p le  co r es.  C o n s tr ain t   o f   th i s   s c h e m i s   s ca lab ili t y   i n   s en s e   o f   a m o u n t o f   tas k s   a n d   co r es - s i n g le  s ch ed u ler   h a s   to   m an a g e.     4 . 2 .   P a rt it io ned Sche m e   I n   th p ar titi o n ed   s c h e m ( Fi g u r 3 ) ,   th tas k s   ar allo ca ted   to   in d iv id u al  co r es  s ta tica ll y   b y   t h e   s y s te m   d esi g n er   a n d   h e n ce f o r th   t h tas k s   ar ex ec u ted   o n l y   i n   t h eir   r esp ec ti v d esi g n a ted   co r es.  Sch ed u l in g   i s   f i x ed   in   n a tu r e,   w h er t h p ar titi o n i n g   h as to   b d ec id ed   d u r i n g   t h d esi g n   o r   i m p le m e n tati o n   p h ase.   T h p ar titi o n in g   s c h e m i s   p r ef er r ed   to   g lo b al  s c h e m e,   as  s c h ed u li n g   f o r   m u ltico r ca n   b s ee n   a s   a n   alg o r ith m   f o r   s c h ed u li n g   o n   s in g le  co r e,   to   w h ic h   a   g r ea v ar iet y   o f   s c h ed u li n g   al g o r ith m s   alr ea d y   e x is an d   task s   ar e x ec u ted   o n l y   o n   th s a m d e s ig n ated   co r e.   S tatic  s c h ed u li n g   u n d er   p ar titi o n ed   s ch e m w as   ex p er i m e n ted   in   liter at u r [ 1 2 ] ,   [ 1 5 - 1 6 ] .   E f f icien c y   o f   a llo ca tio n   d ep en d s   o n   t h d esi g n   o f   h o w   th task s   ar allo ca ted   ac r o s s   t h co r es.   A cc u r atel y   id en ti f y in g   w h ic h   task   r u n s   at  g i v en   m o m e n is   n o p o s s ib le  an d   th is   m ak e s   t h s ch e m e   v u l n er ab le  to   p r io r it y   i n v er s i o n .   Hen ce   it   is   t h d esi g n er s   r esp o n s ib ilit y   to   e n s u r th a n o   t w o   ta s k s   ar e   r ed u n d an tl y   e x ec u ted   i n   d if f er en t c o r es.       Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       Tr en d s   in   Ta s A llo ca tio n   Tech n iq u es fo r   Mu ltico r S ystem  ( A r u n   K u ma r   S u n d a r   R a ja n )   3025       n , m , k     n u m b er   o f   tas k s   allo ca ted   to   ea ch   co r an d   T -   i th   T ask   o f   t h at  co r e     Fig u r 3 .   P ar titi o n ed   Sch e m w it h   3   co r es a n d   ea ch   co r h a v in g   a n   in d i v id u al  s ch ed u ler       4 . 3 .   Dis t ribute d   o D ec ent ra lized   Sche m e   Dec en tr alize d   s c h e m co m b i n es  t h ad v a n ta g es  s ee n   in   g lo b al  an d   p ar titi o n ed   s c h e m e,   th er eb y   r ed u cin g   p r io r ity   i n v er s io n   a n d   at  th s a m ti m i m p r o v i n g   t h s y s te m   p er f o r m a n ce .   I n   th d ec en tr alize d   s ch e m ( Fi g u r 4 ) ,   th er ar tw o   lev e ls   o f   s ch ed u ler .   No r m all y ,   th le v el s   o f   s c h ed u ler   ar r ef er r ed   as  L1   an d   L2 .   L ev el  1   s c h ed u ler   ( L1 )   is   s i m ilar   to   th o n i n   ce n t r alize d   s ch e m a n d   its   d u t y   is   to   allo ca te  th e   d y n a m icall y   q u eu ed   u p   tas k s   t o   o n o f   th co r es  b ased   o n   th av ailab ilit y .     L e v el  2   s ch ed u ler   ( L2 )   is   s p ec if ic  to   ea ch   co r e   an d   it h an d les t h e   task s   th at  ar allo ca ted   to   it b y   L1   [ 1 2 ] ,   [ 1 8 ] .             Fig u r 4 .   Dec en tr alize d   Sch e m w it h   3   L 2   s c h ed u ler s   a n d   1   L 1   s ch ed u ler       T o   s u m m ar ize,   L1   p er f o r m s   th tas k   allo ca tio n ,   li k m aster   o f   all  co r es  an d   L2   p er f o r m s   t h e   m an a g e m e n o f   a s s i g n ed   co r e.   So ,   f o r   a   s y s te m   w it h   3   c o r es,  th er w i ll  b 1 - L1   a n d   3 - L2   s c h ed u ler s ,   as   d ep icted   in   Fig u r 4 .   Sch ed u le r   L 2   also   m ai n tai n s   i n f o r m atio n   ab o u task s   p er tain in g   to   th a co r e,   lik s tate  o f   th tas k s   i n   t h at  co r e,   n u m b er   o f   tas k s   i n   r ea d y   an d   w ait  q u e u an d   f in al l y   p r io r it y   o f   t h ta s k s .   Sin ce   L1   is   th e   m aster   o f   al co r es,  it   ca n   ac ce s s   t h s tat u s   in f o r m a tio n   v i L2   b ef o r allo ca ti n g   ta s k   to   th co r e.   I n   t h is   d ec en tr alize d   s ch e m e,   ef f icie n d esi g n   o f   th L1   s ch ed u l er   p r o v id es  an   ef f ec ti v s o l u tio n   f o r   th ta s k   s ch ed u lin g   p r o b le m   ( Ki m   &   L ee   ( 2 0 1 5 ) ) .   T h L1   s ch ed u l er   s h o u ld   b ab le  to   ef f icie n t l y   d is tr ib u te  ta s k s   a m o n g   co r es a n d   w it h   m i n i m a l o v er h ea d .       5.   T ASK   A L L O CA T I O A L G O RIT H M S   W ith   clea r   v ie w   o n   t h all o ca tio n   s ch e m e s ,   tech n iq u es  t o   h an d le  s eq u en tial  co d in   m u ltit h r ea d   ar ch itect u r an d   i m p licit   d ep en d en cie s   t h at  w o u ld   ar is e;  n ex t   s tep   i s   to   u n d er s ta n d   t h alg o r ith m s .   T h is   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  6 ,   No .   6 Dec em b er   2 0 1 6   :   3 0 1 8     30 30   3026   Sectio n   b e g i n s   w it h   i n tr o d u ct io n   to   t h ter m i n o lo g ie s   u s ed   in   m a th e m atica r ep r esen ta ti o n   o f   an   alg o r it h m ,   f o llo w ed   b y   t h co r allo ca tio n   alg o r it h m s   t h at  ca n   b u s ed   to   d is tr ib u te  task s   b et w ee n   t h co r es.    C o n s id er   m u ltico r s y s te m   S   w it h   co r es  an d   ea c h   co r is   d en o ted   as  C i ,   f o r   all  i   1   to   n .   L et‟ s   as s u m t h at  t h i s   m u l tico r s y s te m   S   o r g an izes  t h p r o g r a m   i n to   m   tas k s   a n d   ea ch   ta s k   is   d en o ted   as  T j ,   f o r   all  1   to   m   w i th   co r r esp o n d in g   ex ec u tio n   ti m E j   an d   task   p r io r ity   P j .   B ased   o n   th ex ec u tio n   ti m E j ,   th e   ex p ec ted   r e m ain in g   e x ec u t io n   ti m [ E R T ]   o f   th ta s k   o n   p ar ticu lar   co r C an d   th e x p ec t ed   s tar t ti m [ E ST ]   o f   th n e w   tas k   th a w ill b all o ca ted   b y   L1   to   th co r C i   ca n   b ca lcu lated .     5 . 1 .   Co re   a llo ca t io t ec hn iqu es   I n   th i s   p ar t,  alg o r ith m s   f o r   d ec en tr alize d   s c h e m w i th   d y n a m ic  ta s k   i n f lo w   ar p r esen ted   ( Fig u r 5 ) .   R o le  o f   t h ese  al g o r ith m s   is   t o   d y n a m icall y   s elec co r an d   allo ca te  tas k s   to   t h s e le cted   co r e.   Var io u s   alg o r ith m s   p er tai n i n g   to   t h s t u d y   ar d is cu s s ed   as  f o llo w s .                 LB   -   L o ad   B alan ce NT WP   -   Nu m b er   o f   T ask s ,   W aitin g   ti m an d   P r io r ity   M NT   -   Min i m u m   N u m b er   o f   T ask s RR   -   R o u n d   R o b in     Fig u r 5 .   A llo ca tio n   Sch e m a n d   Ass o ciate d   A l g o r ith m       5 . 1 . 1 .   Ro un d Ro bin   ( RR)   a lg o rit hm   I n   R o u n d   R o b in   alg o r it h m ,   ev er y   tas k   is   tr ea ted   w it h   eq u al  p r io r ity   an d   j o b   o f   L1   s ch ed u ler   is   to   d is tr ib u te  t h ta s k s ,   a s   a n d   w h en   t h e y   ar r iv e,   to   d i f f er en t   co r es  o n b y   o n e.   P s eu d o   co d f o r   th R R   al g o r ith m   is   p r esen ted   in   Alg o r it h m   3 .   F o r   ex a m p le,     I ta s T j   a r r ives  fir s t,  s ch e d u ler  a llo ca tes  th is   ta s to   C o r C i   fo llo w ed   b y   ta s T j + 1 to   co r „C i+ 1   a n d   s o   o n .       Initialize    n   number of Cores( C)   m   number of Tasks  to be allocated(T)   i   core number   for   each task ‘j’  do until  ‘j’   is equal to   ‘m’     if   ('i' is less than or equal to 'n')  do       assign Task ‘T j ’  to   Co re  ‘ C i       increment ‘i’ to select next Core     elsedo       reinitialize ‘i’ to select first core   end for     A lg o r ith 3 .   Th R o u n d   R o b i n   a lg o r ith m   fo r   m‟   ta s ks a cro s s   n co r es.       I n   th i s   r o u n d   r o b in   f as h io n ,   allo ca tio n   d ep en d s   o n l y   o n   t h ar r iv al  o r d er   o f   th tas k s .   P r io r ity   i s   ig n o r ed   as a ll tas k s   ar tr ea ted   eq u al .   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       Tr en d s   in   Ta s A llo ca tio n   Tech n iq u es fo r   Mu ltico r S ystem  ( A r u n   K u ma r   S u n d a r   R a ja n )   30 27   5 . 1 . 2 .   M ini m u m   Nu m b er   o f   T a s k s   ( M NT )   a lg o rit h m   I n   MN T   alg o r ith m ,   j o b   o f   th L1   s ch ed u ler   is   to   d is tr ib u t task s   to   th co r co n tain i n g   m in i m u m   n u m b er   o f   tas k s   alr ea d y   allo c ated   [ 1 2 ] .   I n   th i s   al g o r ith m ,   a l lo ca tio n   is   b ased   o n   t h ar r i v al  o r d er   o f   tas k s   a n d   p r io r ity   is   i g n o r ed .   P s eu d o   co d f o r   th MN T   alg o r ith m   i s   p r esen ted   in   A l g o r it h m   4 .   Fo r   ex a m p le,     I C o r „C i   h a s   5   ta s ks,  „C i + 1   h a s   7   ta s ks   a n d   „C i + 2   h a s   3   ta s ks.  Wh en   ta s T x   a r r ives  n ex t ,   s ch ed u ler a llo ca tes th is   ta s to   C o r „C i + 2 ‟,   w h ich   h a s   min imu n u mb er o f ta s ks.     MN T   alg o r ith m   d o es  n o co n s id er   ab o u th v ar iatio n   i n   ex ec u tio n   ti m o f   ea ch   tas k ,   w h ic h   i s   co m m o n   in   r ea l ti m s y s te m s .         Initialize    n   number of Cores( C)   m   number of Tasks  already allocated to each core   i   core number   T x   new task that ha s arrived      for   each core ‘i’  do until  ‘i’   is equal to   ‘n’     index Core number c orresponding to   Min (m i )   end for       assign Task ‘T x ’  to   Co re  ‘ C i n d e x     A lg o r ith 4 .   MN T   a lg o r ith m   w h ich   w o r k s   b a s ed   o n   min i mu n u mb er  o a llo ca ted   ta s ks  o n   ea ch   co r e.       5 . 1 . 3 .   Nu m ber  o f   T a s ks ,   Wa it ing   t im a n d P rio rit y   ( NT WP )   a lg o rit h m   NT W P   alg o r ith m   is   a n   ex te n s io n   o f   MN T   alg o r ith m ,   w it h   t ask   p r io r it y   b ein g   co n s id er ed   b ef o r e   th e   allo t m e n is   m ad e.   Si n ce   r ea ti m s y s te m ,   u s ed   in   m o s a p p licatio n s ,   ca n n o tr ea all  task s   to   h av eq u al   p r io r ity     tas k s   w it h   h ig h er   p r io r ity   h av to   b g i v en   p r e f er en ce   i n   ex ec u tio n   [ 1 2 ] .   P s eu d o   co d f o r   th e   NT W P   alg o r ith m   is   p r ese n ted   in   A l g o r ith m   5 .   I n   NT W P   alg o r ith m ,   j o b   o f   th L1   s ch ed u ler   is   to   ch ec k   f o r   m i n i m u m   n u m b er   o f   task s   ass i g n ed   to   ea ch   co r e,   an d   th en   ch ec k s   f o r   co r es  w it h   m in i m u m   E R T   an d   f in all y   c h o o s es  t h co r w i t h   m i n i m u m   s u m   o f   task   p r io r ities .   C o r w i th   m i n i m u m   s u m   o f   p r io r it y   also   i m p lies   t h at  th is   co r co n tain s   m an y   lo w   p r io r it y   task s   co m p ar ed   to   o th er   co r es  an d   th er i s   h i g h   p o s s ib ilit y   o f   r ed u ce d   w aiti n g   ti m f o r   h i g h   p r io r it y   tas k s   i n   th is   co r e.   NT W P   alg o r ith m   was d esig n ed   in   o r d er   to   r ed u ce   p r io r ity   i n v er s io n .     Initialize    n   number of Cores( C)   m i   number of Tasks  already allocated to each core   i   core number   T x   new task that ha s arrived    E i   total execution  time of m i   tasks in  each core   P i   sum of prioritie s of m i   tasks in eac h core   for   each core ‘i’  do until  ‘i’   is equal to   ‘n’   index Core number c orresponding to   Min (m i )   flag   0   if   there are multiple values for ‘index’  do         E i   Sum   (execution  times of tasks m i )i n  c or         index_1 = Compute  Min (E i )       flag     1   if   there are multiple values for ‘index_1’  do       Pi =  Sum ( priorities of task m i )in core           index_2 = Compute  Min (P i )                 flag     2   end for       Evaluation Warning : The document was created with Spire.PDF for Python.