Operating Systems 2017F Lecture 19: Difference between revisions
HebaJallad (talk | contribs) |
|||
Line 17: | Line 17: | ||
In many systems, "main" just sets up even handlers | In many systems, "main" just sets up even handlers<br> | ||
* the event loop can be implicit or explicit | * the event loop can be implicit or explicit<br> | ||
** or there may be no loop at all, just handlers and "interrupts" some kind | ** or there may be no loop at all, just handlers and "interrupts" some kind<br> | ||
* event loops poll (check) to see when there are new events | * event loops poll (check) to see when there are new events<br> | ||
* what are event loops for node app? | * what are event loops for node app?<br> | ||
** where are interrupts for node apps? | ** where are interrupts for node apps? <br> | ||
***Incoming network requests, it's an event | ***Incoming network requests, it's an event<br> | ||
Code run differently in the kernel : <br> | |||
1)functions runs on the bhealf of insmod, unles sit is Independence context <br> | |||
2)codes that run on the bhelaf o the process<br> | |||
3)after an interrupt: no process , it is an interrupt cotext <br> | |||
4) file names : regular programs but the square brackets, execution context + address space. they share the kernel's address space, they are called kernel threads which are independently scheduling . You can not kill them but you can change their scheduling , maybe their priority but not 100%. <br> | |||
does it create a proces? no , but it can create a kernel thread (is it a process? virtual adress space, .<br> | |||
multi- threaded: maintains multiple address processes , ex: fire fox. <br> | |||
ps -elF | less "number" : displayes threads. | |||
OS kernels are essentially the same thing | OS kernels are essentially the same thing |
Revision as of 18:50, 21 November 2017
[Notes]
Sample
sample
Additional Notes
Where's main?
- lots of program shave "main" functions - a function that runs first and controls the execution of the program
- Do these have "main" functions?
- Linux kernel modules
- FUSE applications?
- the linux kernel?
- node web applications?
In many systems, "main" just sets up even handlers
- the event loop can be implicit or explicit
- or there may be no loop at all, just handlers and "interrupts" some kind
- or there may be no loop at all, just handlers and "interrupts" some kind
- event loops poll (check) to see when there are new events
- what are event loops for node app?
- where are interrupts for node apps?
- Incoming network requests, it's an event
- Incoming network requests, it's an event
- where are interrupts for node apps?
Code run differently in the kernel :
1)functions runs on the bhealf of insmod, unles sit is Independence context
2)codes that run on the bhelaf o the process
3)after an interrupt: no process , it is an interrupt cotext
4) file names : regular programs but the square brackets, execution context + address space. they share the kernel's address space, they are called kernel threads which are independently scheduling . You can not kill them but you can change their scheduling , maybe their priority but not 100%.
does it create a proces? no , but it can create a kernel thread (is it a process? virtual adress space, .
multi- threaded: maintains multiple address processes , ex: fire fox.
ps -elF | less "number" : displayes threads.
OS kernels are essentially the same thing