Linux News|Linux Install sidebyside windows|Ubuntu|Linux Help|Installing Apache and php from source

Sunday, January 8, 2012

What is the difference between static RAM and dynamic RAM?


Your computer probably uses both static RAM and dynamic RAM at the same time, but it uses them for different reasons because of the cost difference between the two types. If you understand how dynamic RAM and static RAM chips work inside, it is easy to see why the cost difference is there,­ and you can also understand the names.
Dynamic RAM is the most common type of memory in use today. Inside a dynamic RAM chip, each memory cell holds one bit of information and is made up of two parts: a transistor and a capacitor. These are, of course, extremely small transistors and capacitors so that millions of them can fit on a single memory chip. The capacitor holds the bit of information -- a 0 or a 1 . The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state.
A capacitor is like a small bucket that is able to store electrons. To store a 1 in the memory cell, the bucket is filled with electrons. To store a 0, it is emptied. The problem with the capacitor's bucket is that it has a leak. In a matter of a few milliseconds a full bucket becomes empty. Therefore, for dynamic memory to work, either the CPU or the memory controller has to come along and recharge all of the capacitors holding a 1 before they discharge. To do this, the memory controller reads the memory and then writes it right back. This refresh operation happens automatically thousands of times per second.


A capacitor stores electrons in computer memory cells. The memory must then be refreshed or flip-flopped.
                                                             
This refresh operation is where dynamic RAM gets its name. Dynamic RAM has to be dynamically refreshed all of the time or it forgets what it is holding. The downside of all of this refreshing is that it takes time and slows down the memory.
Static RAM uses a completely different technology. In static RAM, a form of flip-flop holds each bit of memory . A flip-flop for a memory cell takes 4 or 6 transistors along with some wiring, but never has to be refreshed. This makes static RAM significantly faster than dynamic RAM. However, because it has more parts, a static memory cell takes a lot more space on a chip than a dynamic memory cell. Therefore you get less memory per chip, and that makes static RAM a lot more expensive.
So static RAM is fast and expensive, and dynamic RAM is less expensive and slower. Therefore static RAM is used to create the CPU's speed-sensitive cache, while dynamic RAM forms the larger system RAM space.


What is the BIOS or CMOS setup program?

The motherboard BIOS, which is short for Basic Input/Output System. PCs typically have what is called a flash BIOS, allowing the user to update the BIOS if necessary. The BIOS also includes a sort of diagnostic routine known as the POST (Power On Self Test). This test ensures that the computer meets the necessary requirements to boot up correctly. If the computer doesn't pass the POST you will hear a pattern of beeps that indicate the problem encountered.
CMOS (Complementary Metal Oxide Semiconductor) is the type of semiconductor chip on the motherboard which stores the system information and computer settings such as date, time, hard drive settings, boot sequence, parallel port settings, on-board audio & video, etc. This information can be accessed and changed through the BIOS/CMOS setup program which is available as the computer begins to boot up. As the computer boots, there will typically be some text on the screen such as "Press Del to enter Setup". Depending on the manufacturer, the key required to enter the BIOS setup may be F1, F2, Del, or Esc.Unlike earlier generations of PC's, the user is no longer required to go into the BIOS Setup and enter new information such as the number of cylinders, heads, sectors, etc. when changing IDE hard drives. These and many other settings are now detected automatically.

Note: If the CMOS battery dies, any changes made in the the BIOS Setup will be lost. After replacing the battery, the user will need to re-enter the Setup program and make the changes again

Friday, January 6, 2012

Running a C/C++ program in ubuntu


First check for the compiler installation as follows on your terminal:
[g++ --version]
if it gives the version of your compiler then run the programs as given below other wise just go through this tutorial:
Installing C/C++ compiler in Ubuntu


Running a c++ program


#include<iostream>
using namespace std;
int main()
{
cout<<"Hello world"<<endl;
}

Save it as first.cpp on your desktop.
Open the terminal and do as follows.
[g++ Desktop/first.cpp -o Desktop/first.o]
                                                         ^
                                                      first.o will be created if no error occurs
[cd Desktop]
[./first.o]

Running a C program


#include<stdio.h>
//using namespace std;
int main()
{
printf("Hello world\n");
}


Save it as second.c on your Desktop.

[g++ Desktop/second.c -o Desktop/second.o]
[cd Desktop]
[./second.o]

Here you can use gcc or g++ as g++ supports both.

If you have any question then write down the comments,I will be pleased to help you.

Removing Broken packges through command line in Ubuntu

Some times broken packages creates problem in installing new software so do the following step to remove the broken packages,some times some packages can't be removed they are upgraded so you need internet connection at that time so make sure that you have internet connection available:

[sudo apt-get clean]

[sudo apt-get install -f]

If you any questions regarding apt-get utility then do as follows:

[man apt-get]
ubuntuway.blogspot.com