Jump to content
xisto Community
vicky99

How Things Works

Recommended Posts

Hello freindsI always wonder How Operating System Works. I tried to figure it out but failed. How they managed to interact with hardware using some commands? How OS were built? Which languages are used? Which was the first OS and who built it? And one question always trouble me is, when we create data or file or might import it from other storing devices or from internet, what happens to these data when we delete them? Where do these go? According to some these stay in hard drive. If it is so after some days there will not be any space in our hdd.

Share this post


Link to post
Share on other sites

Great question, dude! And I'll be much too glad to answer it..

 

What is an Operating System?

An operating system is basically a program itself, which 'controls' the computer. You can say that it is a 'group of programs' that help you to interact with your computer. You see, the computer understands the binary language (0's and 1's). An OS does the job of a translator, just as a translator would translate English to Japenese when you talk to the people there in Japan, the OS translates your commands into Binary language so that the computer understands them and obeys your commands. Interacting with hardware is a complex process, for which I will write a post only after a little research myself!

 

How were OS built and what were the languages used?

The very first personal computer, as you know, was just a Pentium 100MHz processor, which couldn't do much really! The very first OS developed for the personal computer was the Disk Operating System (DOS), more commonly known as Microsoft's MS-DOS (although there were other DOS(s) like FreeDOS etc.). I really have no idea how Mr.Gates developed that awful OS. But then came 'Unix', which was written entirely in C/C++. But later on, when GUI was introduced publicly by Microsoft, its first OS with a GUI, i.e.Windows 3.1 was realased, after which the Windows family monopolised the software market.

 

Where do things go when we delete them?

When you delete a perticular file(s) manually from your OS, then it appears to be erased from the hard disk (When you see it in recycle bin (Windows only), it is not deleted, when you empty the recycle bin, it appears to be so). But you have heard right, it still remains in the hard disk. But ONLY till that space occupied by the 'deleted' file is not requested by another file. In order to delete a file permanently from your hard disk, the process is called 'shredding', which physically erases the file from the hard disk. This can be a benifit, if we wish to recover an accidentally deleted file, or a nuisance, if we care about privacy.

 

I would like to thank you for revising my computer history and fundamentals, which I wuold have forgotton if I wouldn't have written this post!

 

Kindly excuse me if some part of the information mentioned above is unauthentical, because I do not hold a PhD. in computer history!!

-Omkar Ekbote

Share this post


Link to post
Share on other sites

Definitely not an authority on hardware, but have some knowledge. This would help you while waiting for better answers.

And one question always trouble me is, when we create data or file or might import it from other storing devices or from internet, what happens to these data when we delete them? Where do these go? According to some these stay in hard drive. If it is so after some days there will not be any space in our hdd.

The data does stay in the hard drive until it is written over by new data. Your OS has sort of a table to keep track of the data and their location in the hard disk. When you normally delete, you just delete the entry in the table. The data is still intact in the hard disk. That is why you can recover normally deleted data through some software.


Which languages are used?

I think they use C or C++.


How they managed to interact with hardware using some commands?

There is something sort of called interrupt vectors. There is a fixed amount of them and each of them does certain things. Not just OS can interact with hardware. If you are knowledgable enough, your software can interact with hardware too.

Share this post


Link to post
Share on other sites

Yes C/C++ is used to write OS because these two langauges are dam fast ..[/color]The windows 95 was written with C in 16 million lines (not a small programat all) ...

Your Interrupt theory is correct one can can interact with hardware with interrupt .

Actually whenever we press a key an interrupt is send to microprocessor which interrups its work starts new work after completing that work it resumes its work (thats why named so) same interrupt can be generated by a software called software interrupt ,

eg: interrupt no X023 is generated by pressing Esc key

Share this post


Link to post
Share on other sites

I should thank everyone at the outset for answering my query. It would be very kind of you guys tell me in details about interrupt vectors. Why C and C++ are used to create Operating System? Why not JAVA or some other language? One more question, when first OS was created how they used C or C++? If there was no OS how did the install C or C++? Generally we need to install Turbo C to begin programming.

Share this post


Link to post
Share on other sites

Why not JAVA or some other language?

Actually, there is not that many "heavy duty" programming languages around. Besides C, C++, Java and maybe C#(have no experience in it, but should be able to do quite a lot of stuff with it) the rest of the programming languages are used for certain tasks. Perl, PHP are basically for web programming. Visual Basic is more for ease of use. And then you have Lisp and other AI programming languages that very few people know.

I don't think there is any OS today that was created with Java. Your Java program actually needs to run on top of a Virtual Machine(VM). And if I am not mistaken, the VM is actually created with C or C++.

Share this post


Link to post
Share on other sites

Where did most this information come from?The earliest of Operating Systems, existed in the 1950s and definitely was not created with C since it hadn't even been developed yet (1970s, also the time when the UNIX kernel was changed to C). DOS did not even exist at this stage.Most Operating Systems were created in Machine Code (Binary/Assemby) and was specific for the CPUs that it ran on so it was not portable across different architectures. All hardware of the computer had to be controlled by your program, which is why the only users for computers had knowledge in Programming.Nowadays you would find operating systems are created in higher level languages, although they still use ASM for bottleneck optimisation and speed improvements. C and C++ are languages that would be used in modern operating systems, due to it's level of control, being able to be a low level language and still make use of the higher level. Other languages could achieve similar results but you'll know whether it's suitable or not by whether it can be low level or not. There are device drivers still developed in ASM.I agree that MS-DOS was the first operating system for "personal" computers (IBM PC), being easier to use. It however was developed for the 8086 (80x86)/8088 which is not 100MHz but more like 5MHz or 10MHz. Also Pentium was the successor to the 486 processors, which the 486DX4 and Overdrive could run at a clock speed of 100MHz but was not really stable. I still have an Overdrive Server computer with a 5MB SCSI hard drive which still runs, also got a few 286s and 386s as workstations, but more historical than for use.When deleting files from your harddrive, basically what happens is the operating system writes the data area with a certain symbol which tells it this area has been deleted and can be written over, it does not remove it fully but it can calculate how much space you have freed up with it. So even though you may think it's taking up space, the operating system knows that it can write over it, so it's considered free space to the operating system.Also there was Windows Version 1.0 which was a GUI based operating system, but popularity only came in Windows 3.11 which gave better networking, anything before this was quite buggy to even consider.Cheers,MC

Share this post


Link to post
Share on other sites

Windows was written in C++ beause it is not enviroment specific. Languages like Borland's Delphi and Visual Basic are for purely programming under Windows.How hard disks and Windows work is fairly simple to explain. Windows stuffs crap on your hard disk, when you delete it Windows will simply mark these areas as *writable*. So when you need to fill some more space in it may overwrite deleted data. Hence why it is sometimes possible to recover deleted data.

Share this post


Link to post
Share on other sites

Dear FriendsI asked u questions regarding Operating Systems and How data gets deleted. Now I want to ask you some more basic questions. Frist of all I would like to know how data is saved rather written in hard disk.What type of material is used to biuld hard drives? Whether magnetic medium such as VHS tape are used? How data is written in CD by Cd writer?What is the difference between CD R And CD RW?

Share this post


Link to post
Share on other sites

Well with most hard drives i'm pretty sure they are magnetic though other possibilities are either already in play or are being explored as is to be expected.I'm not sure on the technical details and differents of CD writers with CD-R's and CD-RW's but basically it uses a laser to read and write from the disc (I think their called optical or some such?), And the difference between CD-R and CD-RW is that CD-R's can only be written once and usually last longer where as CD-RW discs can be written to multiple times but usually dont last as long.If anyone knows more indepth about how this all works I would be interested too, I always love hearing about how all this stuff works.

Share this post


Link to post
Share on other sites

Hard disk are really made up of magnetic materials but not like tapes....A harddisk contain rotating very tiny plates known as platters....When we have to read or write an information from these plates (platters)they are bring close to read/write head which applies magnetic field on these plates hence the plates get magnetised and data is stored (thats why datas are not deleted as it is not easy to demagnetise the cells) To read also the same procedure is used....The whole system is rotated fastly so that we get the required flatter (small disk) as soon as possible thats why harddisks have RPM (eg: my harddisk speed is 7200.9 rpm ) Cd's are made up of a photosensetive material (which react towards light) protected by aluminum and fibre plates .......A laser light (produced from GaAs laser diode is used ) is used to itch the photosensetive layer to write datas on it .....An itched portion is known as "1" and unitched portion as "0"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.