Hello to all!
I am a new Linux user and I would really appreciate any help you can provide me in order to clarify some things regarding application running in Linux.
I have successfully compiled the below Hello World program:
Code:
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
} and I got an executable named "hello.out"
When I am running the application by typing into bash:
I am getting the "Hello world" message however I have a few questions regarding the involve of kernel scheduler to this application execution.
1) In this case I am running a function from user space without using any of the scheduler routines in order to e.g. add the task to scheduler "run queue" list or to specify the priority of this execution so I can't understand how the scheduler is invoked to the execution of the program without using any of the scheduler's routines in order to provide information about this execution. (how the scheduler knows about the existence of this application?)
What's the process in order finally the task to be executed?
2) How can I have a periodic execution of the application?
3) What's the priority of this execution? Is there a way to see all the applications that kernel scheduler runs and how often?
4) If I was running two applications, which one would be running first? Could I change the priority of its execution somehow?
Any help would be really appreciated.
Thank you!