You are not logged in.

#1 2010-07-21 07:21:18

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Check my understanding, please. CPU/Interupt/Cache/Memory

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

#2 2010-07-21 17:26:06

baion baion
Member
From: Nicosia, Cyprus
Registered: 2009-06-13
Posts: 48

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

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

#3 2010-07-21 18:01:59

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

Preemptive multitasking, for one.

It's a fairly accurate overview.

Offline

#4 2010-07-21 18:39:14

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

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

#5 2010-07-21 23:26:28

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

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 smile

Offline

#6 2010-07-21 23:39:53

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

You know the book "Operating System Concepts" by Abraham Silberschatz, Peter B. Galvin, Greg Gagne?
It's quite good.

Offline

#7 2010-07-22 00:15:58

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

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

#8 2010-07-22 05:06:53

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

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 smile


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#9 2010-07-22 15:05:43

wu.soldier
Member
From: Poland
Registered: 2006-12-19
Posts: 22

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

SoleSoul wrote:

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

#10 2010-07-22 23:17:57

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

Thanks, I will look them both up smile

Offline

#11 2010-07-23 19:50:24

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Check my understanding, please. CPU/Interupt/Cache/Memory

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

Board footer

Powered by FluxBB