process life cycle
play

Process Life Cycle Virtualizing the CPU OS keeps a PCB for each - PowerPoint PPT Presentation

Process Life Cycle Virtualizing the CPU OS keeps a PCB for each process It has space to hold a ``frozen Process Control Block version of the process s state Init Zombie PC Program counter Stack Ptr Registers Ready Running Process


  1. Process Life Cycle Virtualizing the CPU OS keeps a PCB for each process It has space to hold a ``frozen” Process Control Block version of the process’ s state Init Zombie PC Program counter Stack Ptr Registers Ready Running Process status (ready, running, etc) PID UID CPU registers Priority CPU scheduling info List of open files Process status Memory management info Kernel stack ptr Account info Location in Memory Location of executable I/O status info on disk to be saved when the process … Waiting relinquishes the CPU and reloaded when the process reacquires the CPU 72 Process Life Cycle Process Life Cycle Init Zombie Init Zombie Admitted to the Ready queue Ready Running Ready Running Waiting Waiting PCB: being created PCB: being created Registers: uninitialized Registers: uninitialized 73 74

  2. Process Life Cycle Process Life Cycle Init Zombie Init Zombie Admitted to Admitted to the Ready the Ready Dispatch queue Ready Running queue Ready Running PCB: on the Ready queue PCB: currently executing Waiting Waiting Registers: pushed by kernel Registers: popped from code onto interrupt stack interrupt stack into CPU 75 76 Process Life Cycle Process Life Cycle Init Zombie Init Zombie Admitted to Admitted to the Ready the Ready Dispatch Dispatch queue queue Ready Running Ready Running Yield Yield PCB: on Ready queue PCB: currently executing Waiting Waiting Registers: pushed onto interrupt Registers: popped from stack (SP saved in PCB) interrupt stack into CPU 77 78

  3. Process Life Cycle Process Life Cycle Init Zombie Init Zombie Admitted to Admitted to the Ready the Ready Dispatch Dispatch queue Ready Running queue Ready Running Yield Yield blocking call blocking call blocking call e.g., read(), wait() completion e.g., read(), wait() PCB: on specific waiting queue Waiting Waiting PCB: on Ready queue (I/O device, lock, etc.) Registers: on interrupt stack Registers: on interrupt stack 79 80 Process Life Cycle Process Life Cycle Init Zombie Init Zombie Admitted to Admitted to the Ready the Ready Dispatch Dispatch queue queue Ready Running Ready Running done exit() Yield Yield blocking call blocking call blocking call blocking call completion e.g., read(), wait() completion e.g., read(), wait() PCB: currently executing PCB: on Finished queue, Waiting Waiting Registers: popped from ultimately deleted interrupt stack into CPU Registers: no longer needed 81 82

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend