View Full Version : how do operating systems control the hardware ?
do_little
02-27-2002, 04:32 PM
i know that processors and other PC's components are only dealing with one's and zero's or electircal volts , but how could the operating system deal with the hardware ? operating system is only a program that is written in high-level language like C++ or any others , how could it write to harddisk , how could it shutdown the computer , .... ?
what i want to know exactly is how these instructions are translated into volts ? what does that ? and how ? and like buses that acts as a path to electrical volts to move from one component to another inside the computer , what ways do the operating system use to transmit data to RAM or to Processor ?
yawningdog
02-27-2002, 05:56 PM
This is a broad question, so I can only give a broad answer.
I think what you ask has to do with digital-to-analog conversion. One must take a digital bit and convert it to a relative number of bits output to a comparator circuit serially. With serial data, its actually relatively simple to convert it to analog if you know how to charge a capacitor quickly and discharge it slowly. This is generally done with a diode, capacitor, and resistor. (In simplest terms)
------------------
Linux- Because you wouldn't buy a car with the hood welded shut, why should your O.S. be different?
[This message has been edited by yawningdog (edited 02-27-2002).]
do_little
02-28-2002, 05:42 AM
i think u didn't understand my question , my question again is how does the instructions let's say " copy " command when we type " copy and then we press " enter " , how does the operating system tell the harddisk that a certain piece of data has to be copied ? how do these four letters is converted into bits ? what does that and how ? as a mentioned above there is no physical link between the operating system and the hardware " like buses between the hardware " , so how does the data is transferred ?
Ghost_Hacker
02-28-2002, 12:45 PM
It's done using the Win32 api
Also most programs ,including the win32 api, have already been converted into "bits" by a compiler. Other programs like scripts are "compiled" at run time by an interperter.
A search on those terms might also help your understanding.
Good Luck http://www.PCGuide.com/ubb/smile.gif
do_little
02-28-2002, 02:05 PM
i'll form my qusetion in another way to make it easy to understand it.
now let's consider this string of 1's snd 0's in machune language " 110001011 " say this means the command " copy " now we don't need a compiler to compile this string to machine language " because it's already in machine language " now let's say that i saved this command in an .exe file , now when i click on the file to run it what happenes ? how could those 1's and 0's reach the processor ? how could they become volts ? what path they go through to reach the processor ? how could the processor knows that they r 1's and 0's not 2's or 3's ????
i hope this form may make the question more easy to understand...
YODA74
02-28-2002, 02:20 PM
http://www.karbosguide.com/
------------------
Death has come to our windows.
-- Jeremiah 9:21
(undoubtedly a Biblical reference to a Microsoft product!)
YODA74@carolina.rr.com
Very simple:
1=on
0=off
All digital circuitry is binary (1 & 0) so impossible to be 2 or 3....
The voltage of a 1 is whatever the cpu operating votlage is, the voltage of a 0 is 0v....
------------------
mjc
Links list:Computer Links (http://www.dreamwater.org/tech/mjc/index.htm)
Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.
Ghost_Hacker
02-28-2002, 03:06 PM
now let's consider this string of 1's snd 0's in machune language " 110001011 " say this means the command " copy " now we don't need a compiler to compile this string to machine language " because it's already in machine language " now let's say that i saved this command in an .exe file....
Uhhh..That's wrong. Exe files are created by the act of compiling. You don't just save a command to a file with an exe extension.
Noone writes code in machine language. The closest you'll come is assembler.
You might want to look here for details on the inner workings of a processor, memory and how data is "piped".
http://www.aceshardware.com/list.jsp?id=4
The PCguild is also full of information on buses and harddrives.
Hope that helps http://www.PCGuide.com/ubb/smile.gif
EDIT It might help if you remember that "exe" files only exist to "you". To the harddrive and the CPU and other computer parts there is only "bits" these "bits" are piped from the hard drive's sectors to the memory banks and finaly to the CPU registers where the commands are run. The "bits" that control computer actions are created by compiling code and the result is stored on your hard drive or other media.
The act of reading a sector off the hard drive or off other media converts "bits" into "volts". Every file on your computer exist either in memory or on a hard drive as bits. That's it "physical" connection. Machine code commands (which are just compiled code) are responisble for moving those bits (via the computers internal busses )into their proper place wherever that may be.
[This message has been edited by Ghost_Hacker (edited 02-28-2002).]
Dear ppl,
i think i understood ur ?
u ask how a OS works....?
i will brush a bit of history...
early before the OS,programs were written as 1 or 0...programs are nothing
but a set of instructions...they had punched cards(nothing but a card with
holes)that fed in to a reader..interprets as 0 or 1...like if u have a hole
then its 0 and if u have a opaque part then its 1(sortof)...
these programming required a lot of skills and was disgusting.....
i mean,only people who know hardware could program a computer....
the real problem was u cant do anything constructive and people were fatigued..
then came the HEX way of programming....if u are a computer engineer or electrical engineer u do it in college...its called Microprocessor programming...u write the hex code directly to the processor...
each hex code has a meaning and called a instruction set....
but even here u cannot do anything big..
so people thought of doing something that hides the hardware info from the
programmers...and thats the objective of OS(its a interface between the dumb user like us and hardware)so they took a one time pain of writting a
very very complex program that sits above the hardware and manages it..
i guess the initial OS was written in Assembly code(hex code)
once the complex OS was written people started building
languages..like ur BAsic,fortron,c ...what we actually mean by building a language is writting a complier for it...anyone can define a language if u can write a compiler for it...more easier the language harder the compiler...
compiler converts ur high level codes to machine codes for interaction with ur hardware making use of ur OS...
the OS is nothing but a EXE file written ina high level language...and so is the compiler..
today building a complier is far easier coz u have lots of language and compiler that helps u write and create the exe....
if u ask how u cut,paste and copy so simply..the answer is the OS takes care of it and u donnt need to worry abt what happens inside...
so u dont worry what happens inside unless u are a Comp engineer....
and if u are curious how a OS works and stuff..there are a lots of book available that teaches u from scratch....
but i still think unless u are Comp engineer or Electrical engineer its
pretty hard to have a grab on what i say...
forgive me..for those people who find it too lengthy...
PS:everything finally boils down to 1 and 0..i mean voltage ON and OFF...
if u look at the present comp in ur desktop...its as complex as the Universe...if u try to understand it from the point of view of both electrical and comp engineer...
sorry for the long reply ppl
nagesh
do_little
03-09-2002, 09:53 AM
thanks a lot that was what i want to know exactly
thank u very much...... http://www.PCGuide.com/ubb/smile.gif
iisbob
03-09-2002, 07:08 PM
Why do you comphrend now, after the previou's post unnecessary lengthy dialog when a very knowledgeable guru { MJC } already gave you the same answer in a more direct and simplified explanantion?!
MJC-Very simple:
1=on 0=off
------------------
iisbob
"It is by the fortune of God that, in this country, we have three benefits: freedom of speech, freedom of thought, and the wisdom never to use either."
-Mark Twain { Samuel Clemen's }
[This message has been edited by iisbob (edited 03-09-2002).]
Ghost_Hacker
03-09-2002, 07:52 PM
Hey, I like snvp's answer. It's correct and to the point.
..the answer is the OS takes care of it and u donnt need to worry abt what happens inside...
so u dont worry what happens inside unless u are a Comp engineer....
and if u are curious how a OS works and stuff..there are a lots of book available that teaches u from scratch....
Couldn't have said it better myself...
Sorry, but I couldn't resist.. http://www.PCGuide.com/ubb/biggrin.gif http://www.PCGuide.com/ubb/biggrin.gif http://www.PCGuide.com/ubb/biggrin.gif
Whyzman
03-09-2002, 08:08 PM
Ghost http://www.PCGuide.com/ubb/biggrin.gif http://www.PCGuide.com/ubb/biggrin.gif http://www.PCGuide.com/ubb/biggrin.gif
------------------
May all your dealings in life be win/win!
Whyzman
----------------------
Reserved for Punishing Humor...A Pessimist's blood is always B-negative!
Hmmm...sometimes all it takes is a different way of saying the same thing, several times.
------------------
mjc
Links list:Computer Links (http://www.dreamwater.org/tech/mjc/index.htm)
Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.
do_little
03-10-2002, 02:18 PM
i don't know how u got to this high level ( Grand Master Geek ) iisbob and Ghost_Hacker , i think posting hundereds of replys saying " hi " maybe the reason which gave u this rank , but ur computer knowledge is OFF " 0 "
Flick
03-10-2002, 09:45 PM
Originally posted by do_little:
i don't know how u got to this high level ( Grand Master Geek ) iisbob and Ghost_Hacker , i think posting hundereds of replys saying " hi " maybe the reason which gave u this rank , but ur computer knowledge is OFF " 0 "
Mr. do_little,
Be advised that all of these folks have gone out of their way to help you. I don't think you are in any position to complain. They gave you some good information and even if you think it's bad, I learned a lot from their input. You sure do have a funny way of saying "Thank you". Please be respectful and polite to these guys. You and I are just learning and we should be very thankful that these honorable folks have been so kind to share their knowledge with us! They could ignore you if they wished!
Paleo Pete
03-10-2002, 11:34 PM
do_little I don't like this attitude at all. These peope have gone out of their way to attempt answering questions while you have mostly complained that the answers are not detailed enough, now you want to insult people. That will not work, nor will it be tolerated.
Ghost_Hacker and iisbob have forgotten more about computers than most people can learn in a couple of years. They are two very well respected members of the PC Guide Discussion Forums, both very intelligent and both have excellent knowledge of computers. They have both also been working with us for quite a while, Ghost_Hacker almost as long as I have been here. I don't claim to be able to even come close to his knowledge and expertise with computers. iisbob is not exacxtly computer illiterate either...
If you have nothing better to do than insult the people trying to answer your questions, you need to Go Here (http://chat.yahoo.com/). Treating these people the way you have so far will not be tolerated,any longer. Any further insults and I promise it will be your last post.
Don't be surprised if, after this, your questions are ignored. You have demanded detailed accounts of the intricate inner workings of computers, complained that the answers were not what you wanted, and now have insulted people whom I and most of the other members of these forums have a lot of respect for.
I will not tolerate it. If you want to continue to use these forums and benefit from the knowledge these people freely share I strongly suggest you treat them with the respect they deserve for being good enough to dig up information you should be looking up at the library yourself to begin with. Insulting them is the quickest way I know of to find yourself unable to post any further messages.
------------------
If your nose runs and your feet smell...
You're built upside down!
Note: Please post your questions on the forums, not in my email.
Computer Information Links (http://www.dreamwater.com/paleopete/computer.htm) has been moved, please update your bookmarks.
do_little
03-11-2002, 02:29 AM
i know that they tried to help me , but when i asked about something they don't know they started saying that i want to be a spoon-fed and started wricking at me , they didn't respect me and u supose me to respect them , u asked me to be polite but u have firsta to figure out it all , u have to know what happened form the beginning , read my topic http://www.pcguide.com/ubb/Forum8/HTML/000679.html and u'll decide who has
to respect whom first.....
Flick
03-11-2002, 09:27 PM
do_little...you and I are just guests here. First, we should always try to be polite and civil with each other. People from all around the world visit this site with questions about their computers. Men, women, boys and girls all come here to learn. While I am very new here, I have observed that there is a group of very dedicated and knowledgeable folks who give freely of their time and expertise to help people like you and me. Sometimes they joke with us or even make a little fun of us or use us as an example in order to educate us and teach the many others that view these posts. I am amazed at how understanding and patient these computer experts have proven to be in answering novice questions from folks like you and me. I read your original post and all the replies. IMHO, no one put you down! Also, you were given some good advice concerning the need to be more specific in your questions. All in all, I think the members did a great job. My advice would be to take their advice and also don't be so "thin skinned" in the future. This forum is a very valuable resource.
As for respect, no one owes it to me or to you. Respect is not something that is given to anyone...it is earned! However, we owe at least a little respect right off the bat to these guys because we are asking for them to help us! For some strange reason, they bend over backwards to help us and sometimes they don't even get a little "thank you" in return. For that alone, these guys have earned my respect. I think you would be well advised to apologize to these fine people. I'm sure it would be in your best interest. Also see www.howstuffworks.com/pc.htm (http://www.howstuffworks.com/pc.htm)
[This message has been edited by Flick (edited 03-11-2002).]
[This message has been edited by Flick (edited 03-11-2002).]
Paleo Pete
03-12-2002, 08:39 AM
Flick: Very well said, not much I can add to that...
do_little You are the one that needs to understand...not us...
I do know what happened all along, I have read every word that has been posted in each of your topics. If the people here had been disrespectful to you I can assure you they would have heard from me long ago. They know it too.
When they post links and recommend search engines instead of providing detailed answers it is to prompt you to put some effort into it yourself instead of expecting them to hand it to you (not "u") on a platter, not because they don't know the answer. If you have to work for it, you will be much more likely to learn from it and remember it, while if we do the work, you won't.
I learned long ago the people who always tried to cheat on tests in school by copying my answers were the ones who wanted to depend on someone else to dig up the answers, rather than doing it themselves. I made sure they did not have the chance to see my answers, I knew by doing that the only thing they learned was how to cheat. The people who were willing to work for it never had any reason to cheat, they knew the answers already, or most of them.
We work on the same principle here, if you want to learn, we are always willing to help, but we make sure you have to work for it. Otherwise we are not helping you.
Complaining that the answers you get are not detailed enough, insulting people and claiming they don't know what they are doing will only make them less likely to try to help.
I have already stated in one of your topics what you need is a college course, probably in Computer Science, to find the level of detail you want. These forums are oriented around repairing computers, not teaching computer science. I don't think you will find the kind of answers you want on the Internet without some determined searching.
Start looking for books, enroll in a college course, or go to a library and look up the resources you need. Librarians can usually help you locate resources related to any topic you can think of.
But don't expect us to come up with detailed explanations of computer processes we have no real reason to learn to begin with. Some of us are familiar with more detail than you may realize, and will still make sure you have to do the research for yourself. That is how they learned it.
Respect? As Flick stated already, you have to earn that. You have not. You are the guest here, and instead of showing some appreciation for the effort they have extended already you complain that it was not enough. That will not gain you any respect. So don't expect it.
------------------
If your nose runs and your feet smell...
You're built upside down!
Note: Please post your questions on the forums, not in my email.
Computer Information Links (http://www.dreamwater.com/paleopete/computer.htm) has been moved, please update your bookmarks.
sea69
03-12-2002, 11:34 AM
whoa nellie!
glad I didn't see this denegrating reply regarding some of the MOST knowlegeable people I have ever had the pleasure to be included in their company!
(before Pete got here, because I'm not as eloquent as he is)
do_little,
in life we have lessons to learn- your lesson of the day is to not insult people who are trying to help you.
with :
i don't know how u got to this high level ( Grand Master Geek ) iisbob and Ghost_Hacker , i think posting hundereds of replys saying " hi " maybe the reason which gave u this rank , but ur computer knowledge is OFF " 0 "
and STILL not even an apology, only some effort at justification.
Your lessons RESULT here will be that when you act this way to others- they do not need the grief and I at least will NOT be answering ANY questions you put forth, because when you insult one of us here you insult us all.[/endoflesson]
http://www.PCGuide.com/ubb/eek.gif
my 2¢
[This message has been edited by sea69 (edited 03-12-2002).]
rahulkothari
03-13-2002, 01:53 AM
dear do_little,
tell me one thing would your parents feed u till u die ? or will they prepare u for the life ahead ?
the same is here. think of this site as your parents, the guys here clear yor doubts, they dont make u an Engineer.
i understand u didnt get the answer u wanted until some "snvp" cleared all yor doubts. even after dat u insulted the guys here. now u dont ditch yor parents after u become an adult.
http://www.programmersheaven.com/community/MsgBoard/read.asp?Board=3&MsgID=81402&Setting=A9999F0001
once, on a C prgming messagebrd(above link) i wrote a prg for some school girl and i was in for lot of flak of doin some else's homework. but then i apologised and felt good. so the best thing u should do is APOLOGISE and forget the posts (read past http://www.PCGuide.com/ubb/wink.gif )
awaiting yor reply, bye.
------------------
An eye for an eye makes the whole world blind.
-Mahatma Gandhi
[This message has been edited by rahulkothari (edited 03-13-2002).]
kidtimes
03-25-2002, 05:04 AM
i think the reason do_litlle didnt understant at first is...
mjc was talkin machine..
ghost was talkin assembly..
snup was talkin basic..)
his semi-flame was the result of youth and frustration....
....me hehe i barely grasp any of it...but im old enough to listen)
i think i can learn alot here......... http://www.PCGuide.com/ubb/smile.gif
no-mbr
03-25-2002, 07:31 PM
I'm no master geek, but if someone with a little knowledge of how the BIOS of a given PCI device is activiated by "level" or "edge" portion of a given sine-wave of a given signal --they could get an answer in here somewhere.
Obviously these PCI "triggers" are implemented in many different ways. However these events do reflect the interaction of binary code discriminating the different parts of a voltage portion of given sine wave.
Even if I don't know what I'm talking about, -- someone else might.
http://www.PCGuide.com/ubb/rolleyes.gif
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.