Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (kikuo):

A program is a set of instructions that tells a computer what to do while CPU reads the program, right? If so, does that mean that if a program--Google Chrome--isn't working than it's the CPU's fault in all cases? Or, do the instructions that a program have also need to be correct for the CPU to execute it?

OpenStudy (kikuo):

Also, I always see questions saying "My computer won't turn on is my CPU broken". If CPU runs programs and programs are just a set of instructions in a file, why would it be responsible for a computer not staying on?

OpenStudy (rsmith6559):

Here is a Wikipedia link that has three other links that should give you a pretty fair detailed idea of how programs execute: https://en.wikipedia.org/wiki/Execution_%28computing%29

OpenStudy (x__hazel__x):

\[\Huge{\color{red}{\bigstar}\color{blue}{\bigstar}\color{green}{\bigstar}\color{yellow}{\bigstar}\color{orange}{\bigstar}\color{red}{\bigstar}\color{blue}{\bigstar}\color{green}{\bigstar}\color{yellow}{\bigstar}\color{orange}{\bigstar}\color{red}{\bigstar}\color{blue}{\bigstar}\color{green}{\bigstar}\color{yellow}{\bigstar}}\\\color{white}{.}\\\Huge\color{blue}{\mathfrak{~~~~Welcome~\to~OpenStudy!~\ddot\smile}}\\\color{white}{.}\\\\\Huge{\color{red}{\bigstar}\color{blue}{\bigstar}\color{green}{\bigstar}\color{yellow}{\bigstar}\color{orange}{\bigstar}\color{red}{\bigstar}\color{blue}{\bigstar}\color{green}{\bigstar}\color{yellow}{\bigstar}\color{orange}{\bigstar}\color{red}{\bigstar}\color{blue}{\bigstar}\color{green}{\bigstar}\color{yellow}{\bigstar}}\]

OpenStudy (theeric):

Hi! Good article, @rsmith6559 ! So your computer's always running programs. There is actually a program that manages the memory and other resources (operating system). Usually the CPU is fine. The instructions for Chrome might try to do something that the operating system won't allow. So, the CPUs doing its job, and the programs interact. In case you ever code in C++, you can try to access memory locations specifically. Like you can try to overwrite memory vital to your computer's operations. So, this bad program has its instructions that tell the operating system to write to memory that the operating system says is off-limits. Then the operating system can say no, and the bad program is told so. I don't know the details, for sure. But there's a more abstract version of what I think goes on.

OpenStudy (kikuo):

@rsmith6559 Great article! Thanks for it! However, would you mind answering my questions directly. That didn't quite answer them. x)

OpenStudy (kikuo):

You are here thank u based God

OpenStudy (rsmith6559):

The execution environment is so much different than what we're used to, we have to have an idea of it to answer your question, or else the answer is a book. The CPU is a machine with no inherent intelligence beyond executing very simple instructions. The instructions, and the data that they're operating on need to be correct for a program to execute properly. Some errors are fatal at the CPU level, some at the OS level, some at the Application level and worse, the errors that aren't fatal and just give bad results. Data validation and error handling can comprise a good portion of a program.

OpenStudy (kikuo):

Ah, so if there are errors in the instructions it can be fatal? If there are errors with the CPU the errors can be fatal? Also, what is the OS level? @rsmith6559

OpenStudy (rsmith6559):

An OS is Unix, Apple OSX or Microsoft Windows. It's the Operating System. It allows interaction with the kernel (which interfaces with the hardware), handles the house keeping and provides services to applications. Instruction errors, like an opcode (operation code) that doesn't exist, division by zero would both be a CPU level error. If the error is handled, things will keep running. If the error isn't handled, the machine crashes.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
euphoriiic: I drew more people !! ud83eudd17.
36 minutes ago 40 Replies 3 Medals
euphoriiic: I drew markk ud83eudd17.
1 hour ago 34 Replies 2 Medals
LOLIAteYourMom: u2212243 = u22129(10 + x)
4 hours ago 0 Replies 0 Medals
Bubblezz: Art for @jeromeccv
4 hours ago 13 Replies 3 Medals
Bubblezz: Art for @jeromecv
8 hours ago 0 Replies 0 Medals
MakaylaChuck23: no
3 hours ago 9 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!