I am toying with simple multi-threading program in both Python and C, where main starts multiple threads in a for loop and thread just do while(1). For both cases I ran 20 threads and observed CPU Utilization using 'top' with following outcomes:-
- C: 99.9% Userspace, 0% SysSpace
- Python: 11.3% Userspace, 10.7 SysSpace
Specs: 12 Core i7 8thGen. 16GB Ram
It would be great if someone can comment on why this is happening? Specially commenting on the way python and C execution works. Thank.