You are not logged in.
Is this correct?
Program executes/begins ---> interrupt is sent to the CPU
|
|
V
CPU places program in main memory, with a pointer pointing
back to the location where the interrupt came from (the int main() in a
C/C++ program?)
|
|
V
CPU begins to load variables/data into the cache that the program
needs, if/when the program slows down due to disk speed or waiting
for something, the CPU will then go to the next program on the
program counter, until the next time to returns to the program on the
program counter.
|
|
V
The CPU juggles programs on the program counter until they finish or
halt due to an error or something. When a program finishes or is
trapped, the program will end and the memory freed.
Offline
That is correct if all you are looking for is a brief version of the whole process (or should I say cycle?). However things can get much more complicated, and there can be exceptions. However as far as basic understanding goes you have a correct image in your head.
I am not a computer scientist so there might be some things that I might be missing.
Offline
Preemptive multitasking, for one.
It's a fairly accurate overview.
Offline
Note that program loading and scheduling generally isn't built into the CPU itself - it's actually the operating system (kernel) that manages all of the scheduling ("juggling") of programs.
Offline
Thanks! I have been reading some fairly complex books on operating systems and wanted to see how well I understood the cycle. I hope to keep expanding what I know. It's very interesting
Offline
You know the book "Operating System Concepts" by Abraham Silberschatz, Peter B. Galvin, Greg Gagne?
It's quite good.
Offline
That's the main book I am reading, it's fantastic. It moves pretty fast and treats the reader like they know what's going on, which is great. I just need to double check my understanding because the book progresses quickly haha
Offline
I have that book for a course I'm doing this semester! I wasn't sure if it was worth the money but now I think I might get it
"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page
Offline
You know the book "Operating System Concepts" by Abraham Silberschatz, Peter B. Galvin, Greg Gagne?
It's quite good.
I can also recommend: "Operating Systems Internals and Design Principles" and "Computer Organization and Architecture", both by W. Stallings.
Offline
Thanks, I will look them both up
Offline
If we are talking OS books then there is one that certainly mustn't go unmentioned.
Tanenbaums Modern Operation Systems
Yes, the author is "Linux is obsolete" Andrew S Tanenbaum, and I can really recommend reading his book :-)
Offline