How does a process table work in an operating system?

In the context of operating systems, how does a process table work exactly? How does it manage the processes as they move from state to state? Are What are the events that occur when a process changes states? Are running, ready and blocked the 3 general process states that my textbook is referring to below?

To implement the process model, the operating system maintains a table (an array of structures), called the process table, with one entry per process. (Some authors call these entries process control blocks.) This entry contains important information about the process' state, including its program counter, stack pointer, memory allocation, the status of its open files, its accounting and scheduling in- formation, and everything else about the process that must be saved when the process is switched from running to ready or blocked state so that it can be restarted later as if it had never been stopped.
shampouyaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
Your textbook is: ISBN-13: 978-0131429383
Just read ahead and you will find the answer
0
shampouyaAuthor Commented:
Saying "look it up" seems to be a common response on this site for conceptual questions. I know what book I'm reading, and I read the entire chapter. I wanted to see if someone could put it into clearer words so that I could better understand the concept. If this is not a valid question, then Admin, please delete it.
0
shampouyaAuthor Commented:
Understood. I'll take note and ask someone for help in person. Maybe the question should be deleted then.
0
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Hamidreza VakilianSenior iOS/Android DeveloperCommented:
Process table (which resides in RAM and accessible by the kernel) is an array of some sort of data structure (like a C++ class) which saves a complete snapshot of the process that was running. Kernel has a scheduler that is responsible for sharing the CPU(s) between processes. A scheduler uses algorithms such as round robin to distribute the CPU time between tasks. It also takes care of task priorities. (Tasks that are more prioritized will get a longer share of CPU time).
Whenever a process is unscheduled, the kernel snapshots the CPU registers and other information for that process and saves it to the process table so that it can be restored exactly to the last running state in the near future. Afterwards, scheduler selects the next task from the process table and restores it to the memory and continues the task. (In the OS literature, suspending a process and restoring another process and switching to it, is often called context switch)
The process states are:
Running: the task is scheduled and running.
Ready: the task is not scheduled.
Blocked: occurs when the process is waiting for some I/O operation. (I/O operations are extremely time consuming, therefore when a process e.g. requires disk access; the kernel unschedule it and marks it as blocked and lets other tasks go on. When the disk I/O is completed the kernel will context switch and schedules that process again)

(Generally speaking, a task and a process is the same in textbooks. But technically a process is a group of several tasks)

I hope it gave you a clearer look of kernel scheduler and process table.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gheistCommented:
In second paragraph where you say "kernel snapshots CPU registers" it should read "timer interrupt stores CPU context  in stack"
0
shampouyaAuthor Commented:
Excellent, thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.