F

Here is where the computer is not just a "stupid machine"
Scroll Up
start.. image1
 
image2
 
image3
 
image4
 
image5
 
image6
 
image7
 
image8
 
image9
 
image10
 
end.
Scroll Down

// this tells jquery to run the function below once the DOM is ready $(document).ready(function() { // choose text for the show/hide link var showText="Show the hidden text"; var hideText="Hide the text"; // create the toggle link $("#hide_this").before("

"+showText+""); // hide the content $('#hide_this').hide(); // capture clicks on the newly created link $('a#toggle_link').click(function() { // change the link text if ($('a#toggle_link').text()==showText) { $('a#toggle_link').text(hideText); } else { $('a#toggle_link').text(showText); } // toggle the display $('#hide_this').toggle('slow'); // return false so any link destination is not followed return false; }); });

Showing posts with label HW: Basics. Show all posts

What are system resources, and why do I run out of them?

What are system resources, and why do I run out of them?
In many cases, an "out of memory" message is misleading, since your whole system really did not run out of memory. Instead, certain areas of memory (Microsoft calls "heaps") used by Windows have run low on space. Windows maintains an area of memory for operating system resources. The maximum size of this area is 128K, in two 64K areas. Windows 95/98 uses this area of memory to store fonts, bitmaps, drop-down menu lists and other on-screen information used by each application.
An employee of Samsung Electronics Co., Ltd., show new 32-Gigabyte NAND memory chip during the news conference at the Shilla hotel on September 11, 2006 in Seoul, South Korea.
Chung Sung-Jun/Getty Images
A memory chip, like the one above, contains an area for system resources.
When any program begins running, it uses up some space in the "system resources" area in memory. But, as you exit, some programs do not give back system resources they were temporarily using. Eventually the system will crash as it runs out of memory. The crash happens sometimes if you start and close many programs, even the same ones, without a periodic reboot. This is what Microsoft calls a resource leak or memory leak.
When you tell your system to exit a program, the program is supposed to give back the resources (memory) it was using. But, because programs are written by humans, mistakes can happen and the program may not give back all to the operating system. This failing to "give back" is the "memory leak," eventually leading to a message that your computer is low on resources. Memory leaks can also be caused by programs that automatically load every time you boot your Windows system. In Windows 95/98 you can see the list of active programs via the usual Ctrl-Alt-Del sequence. The Windows Startup folder contains programs that launch every time your system boots. In Windows 98, set the folder contents with MSCONFIG. In Windows 95, click the right mouse button on the Task Bar, click Properties, click Start Menu Programs, click Advanced and look for the Startup folder in the left pane.
The system resources problem is something you might have to live with until the misbehaving application is found. If you are sure a certain application is causing the problem, be sure to contact the software vendor.

Maintaining System Resources
The best preventive maintenance is to periodically reboot your Windows system. No conspiracy, no need to buy memory, unless you only have 4M of RAM. Buying memory does not fix the "system resources" problem, because its size is fixed, no matter how much physical memory is installed.

You can keep track of your system resources via the handy tool at Start >> Programs >> Accessories >> System Tools >> Resource Meter. If you do not have a copy, you can download it at UtilMind Solutions. The resource meter adds the "fuel gauge" to your Windows task bar, to help you keep track of your system's resources. As the bar graph gauge turns from green to yellow, then the dreaded red, you know you have a problem! But you need to remember that the resource meter also consumes what you are trying to conserve: system resources.

Is it better to turn my computer off when I am not using it or leave it on all the time?

This is one of those questions where there is no single right answer. In other words, it depends on how you use your computer.
There are at least three situations that force you to leave your computer on 24 hours a day:
  • You are on a network, and the network administrators back up files and/or upgrade software over the network at night. If that is the case, and you want your machine backed up or upgraded, then you need to leave it on all the time.
  • You are using your machine as some sort of server. For example, HowStuffWorks has a machine that creates the images for the How Webcams Work article. It needs to be on 24 hours a day. If your machine acts as a file server, print server, Web server, etc., on a LAN (local area network) or the Internet, then you need to leave it on all the time.
  • If you are running something like SETI@home and you want to produce as many result sets as possible, you need to leave your machine on all the time.
If you do not fall into any of these categories, then you have a choice about whether or not to leave your machine on. One reason why you might want to turn it off is economic. A typical PC consumes something like 300 watts. Let's assume that you use your PC for four hours every day, so the other 20 hours it is on would be wasted energy. If electricity costs 10 cents per kilowatt-hour in your area, then that 20 hours represents 60 cents a day. Sixty cents a day adds up to $219 per year.
It's possible to use the energy-saving features build into modern machines and cut that figure in half. For example, you can have the monitor and hard disk power down automatically when not in use. You'll still be wasting $100 per year.
The argument for leaving your computer on all the time is that turning it on and off somehow stresses the computer's components. For example, when the CPU chip is running, it can get quite hot, and when you turn the machine off it cools back down. The expansion and contraction from the heat probably has some effect on the solder joints holding the chip in place, and on the micro-fine details on the chip itself. But here are three ways to look at that:
  • If it were a significant problem, then machines would be failing all the time. In fact, hardware is very reliable (software is a whole different story, and there is a lot to be said for rebooting every day).
  • I don't know a single person who leaves the TV on 24 hours a day. TVs contain many of the same components that computers do. TVs certainly have no problems being cycled on and off.
  • Most vendors will sell you a three-year full-replacement warrantee for about $150. If you are worried about it, spend some of the money you are saving by turning your machine off and buy a service contract. Over three years, you come out way ahead!

How the Year 2000 Problem Worked

Introduction to How the Year 2000 Problem Worked

Archived Edition

Although the Y2K problem came and went in January of 2000, we have saved this article as an archived editon of HowStuffWorks because of its historical value. Published at the beginning of 1999 at the height of the Y2K panic in the media, this article is noteworthy for the sentence, "In reality, nothing will happen." In retrospect, that sentence was completely correct, but in January 1999 that was definitely not the picture the mainstream media was painting. HowStuffWorks received quite a bit of flaming email for making this simple prediction.
You will be hearing about the "Year 2000" problem constantly in the news this year. And you will hear a lot of conflicting information in the process. There is also a good bit of "end of the world" rhetoric floating around on the Internet. What should you believe? In this edition of How Stuff Works we will discuss the Year 2000 problem (also known as the Y2K problem) so that you understand exactly what is happening and what is being done about it. You can also explore a variety of links. From this information you draw your own informed conclusions.
What Is the Y2K Problem?
The cause of the Y2K problem is pretty simple. Until recently, computer programmers have been in the habit of using two digit placeholders for the year portion of the date in their software. For example, the expiration date for a typical insurance policy or credit card is stored in a computer file in MM/DD/YY format (e.g. - 08/31/99). Programmers have done this for a variety of reasons, including:
  • That's how everyone does it in their normal lives. When you write a check by hand and you use the "slash" format for the date, you write it like that.
  • It takes less space to store 2 digits instead of 4 (not a big deal now because hard disks are so cheap, but it was once a big deal on older machines).
  • Standards agencies did not recommend a 4-digit date format until recently.
  • No one expected a lot of this software to have such a long lifetime. People writing software in 1970 had no reason to believe the software would still be in use 30 years later.
The 2-digit year format creates a problem for most programs when "00" is entered for the year. The software does not know whether to interpret "00" as "1900" or "2000". Most programs therefore default to 1900. That is, the code that most programmer's wrote either prepends "19" to the front of the two-digit date, or it makes no assumption about the century and therefore, by default, it is "19". This wouldn't be a problem except that programs perform lots of calculations on dates. For example, to calculate how old you are a program will take today's date and subtract your birthdate from it. That subtraction works fine on two-digit year dates until today's date and your birthdate are in different centuries. Then the calculation no longer works. For example, if the program thinks that today's date is 1/1/00 and your birthday is 1/1/65, then it may calculate that you are -65 years old rather than 35 years old. As a result, date calculations give erroneous output and software crashes or produces the wrong results. The important thing to recognize is that that's it. That is the whole Year 2000 problem. Many programmers used a 2-digit format for the year in their programs, and as a result their date calculations won't produce the right answers on 1/1/2000. There is nothing more to it than that.
The solution, obviously, is to fix the programs so that they work properly. There are a couple of standard solutions:
  • Recode the software so that it understands that years like 00, 01, 02, etc. really mean 2000, 2001, 2002, etc.
  • "Truly fix the problem" by using 4-digit placeholders for years and recoding all the software to deal with 4-digit dates. [Interesting thought question - why use 4 digits for the year? Why not use 5, or even 6? Because most people assume that no one will be using this software 8,000 years from now, and that seems like a reasonable assumption. Now you can see how we got ourselves into the Y2K problem...]
Either of these fixes is easy to do at the conceptual level - you go into the code, find every date calculation and change them to handle things properly. It's just that there are millions of places in software that have to be fixed, and each fix has to be done by hand and then tested. For example, an insurance company might have 20 or 30 million lines of code that performs its insurance calculations. Inside the code there might be 100,000 or 200,000 date calculations. Depending on how the code was written, it may be that programmers have to go in by hand and modify each point in the program that uses a date. Then they have to test each change. The testing is the hard part in most cases - it can take a lot of time. If you figure it takes one day to make and test each change, and there's 100,000 changes to make, and a person works 200 days a year, then that means it will take 500 people a year to make all the changes. If you also figure that most companies don't have 500 idle programmers sitting around for a year to do it and they have to go hire those people, you can see why this can become a pretty expensive problem. If you figure that a programmer costs something like $150,000 per year (once you include everything like the programmer's salary, benefits, office space, equipment, management, training, etc.), you can see that it can cost a company tens of millions of dollars to fix all of the date calculations in a large program.
What will happen on 1/1/2000?
On January 1, 2000, software that has not been fixed will stop working or will produce output that is incorrect. The big question is, "How big an effect will that have on the world as we know it?" Some people are predicting that the world will end. For example, worldwide power failures, a total breakdown of the transportation infrastructure (meaning food cannot get to stores, etc.), planes falling out of the sky, and so on are the scenarios these people foresee. The prediction is that the fabric of society will collapse, people everywhere will riot and the world will burn to the ground. Of course, the people making these predictions all tend to be: A) militia members, B) survivalists and C) religious zealots. It is important to recognize the source of these predictions.
In reality, nothing will happen. There may be a week or two of inconvenience as unforeseen problems present themselves and are worked around. Otherwise there will be no effect. That is an easy prediction to make because:
  1. Most companies and government agencies will have their software fixed, or will have work-arounds in place, by the end of 1999. If they don't they will go out of business, and that's a strong incentive to get the job done.
  2. No matter how dependent we think we are on computers, most everything is run by people, not silicon. Take food for example. The tomatoes and lettuce will keep growing, and the people that pick it will keep picking, and the cannery will still can it, the truck drivers will still drive their trucks and the grocery stores will still sell it. In other words, the world will not stop even if a few computers do.
  3. Some companies will not have their acts together and will have problems. They will go out of business. That is normal capitalism at work. There will be a little disruption as the winners and losers sort it out, but what else is new?
Another thing to keep in mind is that we experience inconvenience all the time and it has little or no effect on us. For example, when UPS (United Parcel Service) went on strike in 1997, it shut down something like 80% of the package delivery infrastructure in the U.S. The world did not end - everyone used the Post Office and Fedex instead. On 1/3/1999 Chicago and Detroit experienced their worst snowstorms in 30 years. It shut down air travel nationwide, delayed the opening of the Detroit auto show, stranded tens of thousands of people, etc. Somehow we all managed to survive with the inconvenience. On 1/1/2000 there will be a some companies that have problems. But there will be lots of other companies that don't. It may create inconvenience, but that is all that it will create and two weeks later we will have sorted it out. It's no different from a big snowstorm or a big strike - we figure out ways around the problems and life goes on. There are many scare tactics and exagerations used around the Year 2000 problem. In all of them there is a fairly broad assumption that people cannot do their jobs anymore. The important thing to recognize is that, even if many of the computers in the world were to suddenly shut down on 1/1/2000, the total effect would be minimal because people know what they are doing. Let me show you why:
  • Let's say that every ATM in the U.S stopped working. There are still tellers and you can still talk to a teller at the bank during normal business hours to make deposits and withdrawals.
  • Let's say that every computer at UPS were to shut down. UPS is a bunch of people driving around their brown trucks, and they can all read address labels. The packages will still get delivered.
  • Let's say that every barcode scanner in the stores stopped working. Cashiers can still type in the prices.
  • Let's say that every computer at the FAA were to shut down, and all the automatic pilot computers in airplanes stopped working. Air traffic controllers are people, and pilots can still fly airplanes. We might not be able to land 2 planes every minute at busy airports, but planes will still fly.
  • One of the biggest scare tactics used around the Y2K problem is "failure of the power grid". Let's say that there was something that went wrong somewhere. There are thousands of competent people who manage and repair the power grid - these are the same people who put the grid back together after every major hurricane, ice storm, etc. Also important to note is that the power grid is not something magical. Please read How the Power Grid Works and educate yourself. The grid is made up of passive wires and transformers. Electrons will still flow through wires on 1/1/2000.
There is an assumption among doomsdayers that somehow, on 1/1/2000, every computer will fail (which is silly), AND that every human being will somehow "fail" as well. If you think about it, you can see how untrue that is. We all know how to do our jobs, and we all want to live our lives. On 1/1/2000 we will all be the same. We will get in our cars and we will want to go buy something. The people selling the something will still want to sell it so they can make money. That is never going to change.

How is the LCD in a laptop computer so bright?

How is the LCD in a laptop computer so bright?
Most computer Liquid Crystal Display (LCD) panels are lit with built-in fluorescent tubes above, beside and sometimes behind the LCD. A white diffusion panel behind the LCD redirects and scatters the light evenly to ensure a uniform display. This is known as a backlight. A fluorescent light is most often a long straight glass tube that produces white light. Inside the glass tube there is a low-pressure mercury vapor. When ionized, mercury vapor emits ultraviolet light. Human eyes are not sensitive to ultraviolet light (although human skin is). The inside of a fluorescent light is coated with phosphor. Phosphor is a substance that can accept energy in one form and emit the energy in the form of visible light. For example, energy from a high-speed electron in a TV tube is absorbed by the phosphors that make up the pixels. The light we see from a fluorescent tube is the light given off by the phosphor coating the inside of the tube. The phosphor fluoresces when energized, hence the name.


Compare the size of this fluorescent tube from a laptop computer to the pencil beside it and you see how tiny it is.
A typical laptop display uses a tiny Cold Cathode Fluorescent Lamp (CCFL) for the backlight. One of these small tubes is able to provide a bright white light source that can be diffused by the panel behind the LCD. In addition to providing ample light, CCFLs do not rise far above the ambient temperature. This makes them ideal for LCD panels since the light source is in close proximity to other components that could be ruined by excessive heat.
One amazing thing about these lamps is their incredible size. They are very thin and the board that drives the lamp is very small as well. However, it is not that hard to break them, which is why your display may go dark if you drop your laptop.

How can a totally logical machine like a computer generate a random number?

How can a totally logical machine like a computer generate a random number?
There are two ways that computers can generate random numbers:
  • You can create some sort of device that monitors a completely random natural event and sends its results to the computer. For example, you could place a piece of radioactive material in front of a Geiger counter and connect the Geiger counter to a computer. Since radioactive decay is random, the Geiger counter would create truly random numbers. This approach is pretty rare, because not many people have Geiger counters connected to their machines.
  • You can create a formula that generates a pseudo-random number. When designing the formula, the idea is for it to produce a string of numbers that would look random to anyone who did not know what the formula is. Characteristics of a good formula include:
    • No repetition: The sequence does not cycle around and repeat itself.
    • Good numeric distribution: If the formula is producing random numbers between 0 and 9, the number of zeros, ones, twos, etc. that it produces should be roughly equal over a long period of time.
    • Lack of predictability: You have no way to predict what the next number will be unless you know the formula and the seed (the initial value).
Here's an example of a simple random-number formula from the book "The C Programming Language," by Kernighan and Ritchie:
int rand() 
{
  random_seed = random_seed * 1103515245 +12345; 
  return (unsigned int)(random_seed / 65536) % 32768; 
}

[See How C Programming Works for more information on the C programming language.]
This formula assumes the existence of a variable called random_seed, which is initially set to some number. The random_seed variable is multiplied by 1,103,515,245 and then 12,345 gets added to the product; random_seed is then replaced by this new value. This is actually a pretty good pseudo-random number generator. It has a good distribution and it is non-repeating. If you use it to produce random numbers between 0 and 9, here are the first 20 values that it produces if the seed is 10:
4
4
6
0
7
4
2
3
5
0
5
6
6
4
5
6
7
6
7
4

If you have it produce 10,000 values between 0 and 9, here's the distribution:
0 - 1015
1 - 1024
2 - 1048
3 - 996
4 - 988
5 - 1001
6 - 996
7 - 1006
8 - 965
9 - 961

Any pseudo-random number formula depends on the seed value to start the sequence. If you start with the same seed, you will get the same sequence of values from the formula. So if you give the rand() function shown above the seed of 10 on one computer and look at the stream of numbers it produces, it will be identical to the stream of numbers produced on any computer that runs it with a seed of 10. In the case of the Global Positioning System, this reproducibility is used as a way to give each satellite a predictable but different pattern of values that the GPS receiver can track.
To create a random and unpredictable sequence, the seed must be a truly random number. To get this truly random number for the seed, most programs use the current date and time, converted to an integer value (for example, converted to the number of seconds that have elapsed since January 1, 1970). Since this is a different number every time you start the program, it makes a good seed.

What are the different types of computers?
There are a lot of terms used to describe computers. Most of these words imply the size, expected use or capability of the computer. While the term computer can apply to virtually any device that has a microprocessor in it, most people think of a computer as a device that receives input from the user through a mouse or keyboard, processes it in some fashion and displays the result on a screen.

laptop with binary code
John Foxx/Getty Images
Laptops are portable computers that integrate components in a battery-operated package slightly larger than an average hardcover book.
  • PC - The personal computer (PC) defines a computer designed for general use by a single person. While a Mac is a PC, most people relate the term with systems that run the Windows operating system. PCs were first known as microcomputers because they were a complete computer but built on a smaller scale than the huge systems in use by most businesses.
  • Desktop - A PC that is not designed for portability. The expectation with desktop systems are that you will set the computer up in a permanent location. Most desktops offer more power, storage and versatility for less cost than their portable brethren.
  • Laptop - Also called notebooks, laptops are portable computers that integrate the display, keyboard, a pointing device or trackball, processor, memory and hard drive all in a battery-operated package slightly larger than an average hardcover book.
  • Palmtop - More commonly known as Personal Digital Assistants (PDAs), palmtops are tightly integrated computers that often use flash memory instead of a hard drive for storage. These computers usually do not have keyboards but rely on touchscreenhandheld computer. technology for user input. Palmtops are typically smaller than a paperback novel, very lightweight with a reasonable battery life. A slightly larger and heavier version of the palmtop is the
  • Workstation - A desktop computer that has a more powerful processor, additional memory and enhanced capabilities for performing a special group of task, such as 3D Graphics or game development.
  • Server - A computer that has been optimized to provide services to other computers over a network. Servers usually have powerful processors, lots of memory and large hard drives.
  • Mainframe - In the early days of computing, mainframes were huge computers that could fill an entire room or even a whole floor! As the size of computers has diminished while the power has increased, the term mainframe has fallen out of use in favor of enterprise server. You'll still hear the term used, particularly in large companies to describe the huge machines processing millions of transactions every day.
  • Minicomputer - Another term rarely used anymore, minicomputers fall in between microcomputers (PCs) and mainframes (enterprise servers). Minicomputers are normally referred to as mid-range servers now.
  • Supercomputer - This type of computer usually costs hundreds of thousands or even millions of dollars. Although some supercomputers are single computer systems, most are comprised of multiple high performance computers working in parallel as a single system. The best known supercomputers are built by Cray Supercomputers.
  • Wearable - The latest trend in computing is wearable computers. Essentially, common computer applications (e-mail, database, multimedia, calendar/scheduler) are integrated into watches, cell phones, visors and even clothing!

Followers