Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can one program have multiple processes?

Tags:

People also ask

Can a program create multiple processes?

Yes, fairly obviously - you can run two or more copies of most programs - I routinely have about 5 copies of vim running, and each of those is a separate process. As to how, the OS loads the executable file, creates a process and then tells that process to start executing the file contents.

Can 2 processes run at the same time?

Short answer, yes. A single core cpu(a processor), can run 2 or more threads simultaneously. These threads may belong to the one program, or they may belong different programs and thus processes. This type of multithreading is called Simultaneous MultiThreading(SMT).

How many programs can a process run?

A single processor can run only one instruction at a time: it is impossible to run more programs at the same time. A program might need some resource, such as an input device, which has a large delay, or a program might start some slow operation, such as sending output to a printer.

Can a thread have more than one process?

A thread is generated and owned by a process. It cannot be shared. There are a whole lot of security considerations that make doing so a bit of a nightmare. Best to save thread state somewhere that can be accessed by another process.


after reading and searching about OS and process and threads, I checked on wiki and it said,

A computer program is a passive collection of instructions, a process is the actual execution of those instructions. Several processes may be associated with the same program; for example, opening up several instances of the same program often means more than one process is being executed.

Now is it possible for a program to have more than one process and I am not including the possibility of running more than one instance of the same program. I mean one instance of one program is running, is it possible for a program to have more than one process? If yes, how? If no, why not?

I am a newbie in this, but damn curious :) Thanks for all your help..