the process concept is a little ambiguous to me . I mean I can imagine the PCB because it is a data structure but the process I feel like it is an action happening rather than an entity so I can;t understand how the cpu deals with different processes as different entities
Yeah, I get that the concept of a process could be a bit ambiguous because it’s not just an action but also an entity. A process includes the code from the program as well as its state and other info saved in the PCB. Each process has its own PCB and its own virtual address space. Let’s say you launch two programs; two processes are created, and entries are made in two Process Control Blocks (PCBs). For example, when you compile one program, the CPU receives binary code to work with (lines of 1s and 0s). A line like int y = a; could translate into machine instructions that look like this: LOAD R1, 1, LOAD R2, 1, ADD R1, R2. Your second program would give the CPU different instructions to work with. The CPU processes this binary code line by line and can switch between two or more processes as needed, like when an I/O interrupt occurs. Each time it switches, it saves all the necessary information in the PCB, allowing it to resume from where it left off. So, imagine the CPU processes LOAD first, then saves the register info, the process state, and other necessary info in the PCB for that process. Then it moves on to process a line of code from another process and can switch back and forth. This creates the illusion that multiple processes are running simultaneously because the CPU processes them super fast but treats them as separate entities. Ooo, I hope this clears things up! Let me know! Check out my video on system calls, where I explain in detail how a system call travels from user space to the kernel and back. While it’s not exactly related to processes and this particular topic but they are all related!! It can help you understand how OS controls access to resources and ensures that processes can perform their tasks efficiently without interfering with one another.
@@annakelley7513 thx very much for your reply .Ok I will check it . should I imagine the process as sequence of different things in memory? say for example from 8000 to 12000 where alot of things is there text section data section stack and heap ? and the os especially the dispatcher is the one who shifts the cpu from 8200 for example to 5000? and the start 8000 and end 12000 are in the pcb and that is how the os differentiate ? and if so what is the role of pid in that story?
@aliaatarek7106 This is a fantastic way to visualize the process! You're definitely heading in the right direction. PID stands for Process Identifier, it is essential for differentiating between processes and their respective PCBs. Remember, each PCB has a PID, and the PID uniquely identifies a process within the system.
Criminal that you don’t have more views. Please keep videos like this coming!
We need to issue a warrant to the RUclips algorithm! Thanks for your support-I’ll keep the videos coming!
These are great. Keep it up!
Thank you! Your support-and a lot of caffeine-will keep my enthusiasm levels sky-high!
hope i get to see the follow up with examples,, i love examples,, dont get anything without..
Examples are coming soon! Still working on them :)
when is the start of the training course planned? 🤓
The training course is currently in ‘beta’… also known as ‘my imagination.’ I’ll let you know if it ever makes it to the real world! 😂😂😂
the process concept is a little ambiguous to me . I mean I can imagine the PCB because it is a data structure but the process I feel like it is an action happening rather than an entity so I can;t understand how the cpu deals with different processes as different entities
Yeah, I get that the concept of a process could be a bit ambiguous because it’s not just an action but also an entity. A process includes the code from the program as well as its state and other info saved in the PCB. Each process has its own PCB and its own virtual address space.
Let’s say you launch two programs; two processes are created, and entries are made in two Process Control Blocks (PCBs). For example, when you compile one program, the CPU receives binary code to work with (lines of 1s and 0s). A line like int y = a; could translate into machine instructions that look like this: LOAD R1, 1, LOAD R2, 1, ADD R1, R2. Your second program would give the CPU different instructions to work with.
The CPU processes this binary code line by line and can switch between two or more processes as needed, like when an I/O interrupt occurs. Each time it switches, it saves all the necessary information in the PCB, allowing it to resume from where it left off. So, imagine the CPU processes LOAD first, then saves the register info, the process state, and other necessary info in the PCB for that process. Then it moves on to process a line of code from another process and can switch back and forth. This creates the illusion that multiple processes are running simultaneously because the CPU processes them super fast but treats them as separate entities.
Ooo, I hope this clears things up! Let me know! Check out my video on system calls, where I explain in detail how a system call travels from user space to the kernel and back. While it’s not exactly related to processes and this particular topic but they are all related!! It can help you understand how OS controls access to resources and ensures that processes can perform their tasks efficiently without interfering with one another.
@@annakelley7513 thx very much for your reply .Ok I will check it .
should I imagine the process as sequence of different things in memory? say for example from 8000 to 12000 where alot of things is there text section data section stack and heap ? and the os especially the dispatcher is the one who shifts the cpu from 8200 for example to 5000? and the start 8000 and end 12000 are in the pcb and that is how the os differentiate ?
and if so what is the role of pid in that story?
@aliaatarek7106 This is a fantastic way to visualize the process! You're definitely heading in the right direction. PID stands for Process Identifier, it is essential for differentiating between processes and their respective PCBs. Remember, each PCB has a PID, and the PID uniquely identifies a process within the system.