2

How are two processes running on two different terminal's tabs are different from when they run on the same terminal tab? If both processes are running on same CPU core, how CPU time will be assigned to them if both processes start together in Linux system (Ubuntu) {For both cases, on same and different terminal's tab}.

# ./process1.sh&    # Running in a terminal tab
# ./process2.sh     # Running in the same terminal tab where previous one is running in background

Assuming both processes are running for time, enough for looking at the CPU usage by these two processes.

Scissor
  • 153
  • 2
  • 14
  • Each time It will be treated as new process according to me – Punit Vara Dec 31 '15 at 11:04
  • In the same terminal, will it be two different processes or two child processes of the parent process running that tab of the terminal? And what would be the cpu usage? 50 - 50 %? And suppose if one of the processes are multithreaded, then what would be the CPU usage for each process/threads? – Scissor Dec 31 '15 at 11:36
  • It will be two different child process of terminal which executed by `exec` command internally – Punit Vara Dec 31 '15 at 11:41
  • Cpu usage depends on all the process of running on computer .. Now a days computer have many cores so os do load balancing to distribute processor time.. You can look at my so profile i have recently answered how schedular approch each process to share processor time – Punit Vara Dec 31 '15 at 11:44
  • http://stackoverflow.com/q/34442691/4568212 – Punit Vara Dec 31 '15 at 11:46

0 Answers0