{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ch2 - Chapter 2 Processes Threads Concurrency processes...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Concurrency: processes & threads 1 ©Magee/Kramer 2 nd Edition Chapter 2 Processes & Threads
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Concurrency: processes & threads 2 ©Magee/Kramer 2 nd Edition concurrent processes We  s truc ture  c o m ple x s ys te m s  as  s e ts   o f s im ple r ac tivitie s , e ac h re pre s e nte d  as  a  sequential process . Pro c e s s e s   c an o ve rlap o r be  c o nc urre nt, s o  as  to   re fle c t the  c o nc urre nc y inhe re nt in the   phys ic al wo rld, o r to  o fflo ad tim e - c o ns um ing  tas ks , o r to  m anag e   c o m m unic atio ns  o r o the r de vic e s .  De s ig ning  c o nc urre nt s o ftware  c an be   c o m ple x and e rro r pro ne . A rig o ro us   e ng ine e ring  appro ac h is  e s s e ntial. Model processes as finite state machines. Program processes as threads in Java. Concept of a process as a sequence of actions.
Image of page 2
Concurrency: processes & threads 3 ©Magee/Kramer 2 nd Edition processes and threads Concepts : processes - units of sequential execution. Models :   finite state processes (FSP)                     to model processes as sequences of actions.   labelled transition systems   (LTS)  to analyse, display and animate behavior. Practice :  Java threads
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Concurrency: processes & threads 4 ©Magee/Kramer 2 nd Edition 2.1 Modeling Processes Models are described using state machines, known as Labelled  Transition Systems  LTS . These are described textually as finite  state processes ( FSP ) and displayed and analysed by the  LTSA   analys is  to o l.   LTS  - g raphic al fo rm   FS P  - alg e braic  fo rm
Image of page 4
Concurrency: processes & threads 5 ©Magee/Kramer 2 nd Edition modeling processes A process is the execution of a sequential program. It is modeled as a finite  state machine which transits from state to state by executing a sequence of  atomic actions. a light switch  LTS on off on off on off ………. a s e q ue nc e  o f  ac tio ns  o r  trace on off 0 1 Can finite state models produce infinite traces?
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Concurrency: processes & threads 6 ©Magee/Kramer 2 nd Edition FSP - action prefix If  x  is  an ac tio n and  P  a pro c e s s  the n  (x-> P)  de s c ribe s  a  pro c e s s  that initially e ng ag e s  in the  ac tio n  x  and the n  be have s  e xac tly as  de s c ribe d by  P . ONESHOT = (once -> STOP). O NES HO T s tate   m ac hine (te rm inating  pro c e s s ) C o nve ntio n:  ac tio ns  be g in with lo we rc as e  le tte rs    PRO C ES S ES  be g in with uppe rc as e  le tte rs once 0 1
Image of page 6
Concurrency: processes & threads 7 ©Magee/Kramer 2 nd Edition FSP - action prefix & recursion SWITCH = OFF, OFF = (on -> ON), ON = (off-> OFF).
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern