l4F - Process Process • Process is an instance of...

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

View Full Document Right Arrow Icon
Process
Image of page 1

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

View Full Document Right Arrow Icon
Process Process is an instance of executing program Main function of process is to Execute Instructions residing in main memory Process is characterized by Its code, Data, stack and set of registers During its life time, it can be in different states such as running , not running….
Image of page 2
Reasons for process creation Is created in response to submission of new job When a new user attempts to login Created by OS to provide a service Spawned by existing process
Image of page 3

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

View Full Document Right Arrow Icon
Process execution When a new job to be executed, OS creates data structure for holding the context of process Loads the job in memory In multiprogramming environment, many jobs can be in memory Jobs in memory are ready to execute
Image of page 4
Process execution At any point of time one Job might be running and other are not executing Once a running process terminates or its time slice expires or suspended, OS process (Dispatcher ) dispatches ready to execute process for execution
Image of page 5

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

View Full Document Right Arrow Icon
Memory Layout Dispatcher Process A Process C Process B Program Counter
Image of page 6
Execution Of ready processes D P1 D P2 D P3 D Dispatcher Process P1, P2, P3 are user processes
Image of page 7

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

View Full Document Right Arrow Icon
Two state process model Process may in any of the 2 states Running Not running
Image of page 8
Queuing Diagram Enter Processor Dispatch Exit Pause Queue Queue May contain ready and blocked processes
Image of page 9

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

View Full Document Right Arrow Icon
Dispatcher schedules a Ready process to CPU for execution. In Two State model Not running state contains processes which are : Ready to run Blocked Dispatcher is required to linearly search the queue to find Ready to run process which Increases dispatcher overhead. Solution : Split not running state into Ready state & Blocked state
Image of page 10
Three state model Ready Running Blocked Admit Release Dispatch Time Out Event Wait Event Occurs
Image of page 11

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

View Full Document Right Arrow Icon
Running: The process that is currently being executed Ready: A process that is prepared to execute when given the opportunity Blocked : A process that can not execute until some events occur Occurrence of event is usually indicated by interrupt signal
Image of page 12
Queuing Diagram Enter Processor Dispatch Exit Pause Queue Blocked Queue
Image of page 13

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

View Full Document Right Arrow Icon
Queuing Diagram Enter Processor Dispatch Exit Pause Queue Event 1 Queue Event n Queue
Image of page 14
Five state model Ready Running Blocked Admit Release Dispatch Time Out Event Wait Event Occurs NEW Exit
Image of page 15

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

View Full Document Right Arrow Icon
Why do we need “New” state
Image of page 16
Image of page 17
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