วันอังคารที่ 6 สิงหาคม พ.ศ. 2556

FLASH MEMORY


\

Flash Memory (sometimes called "flash RAM") is a type of constantly powered nonvolatile memory that can be erased and reprogrammed in units of memory called blocks.
It is a variation of electrically erasable programmable read-only memory (EEPROM) which, unlike flash memory, is erased and rewritten at the byte level, which is slower than flash memory updating. Flash memory is often used to hold control code such as the basic input/output system (BIOS) in a personal computer. When BIOS needs to be changed (rewritten), the flash memory can be written to in block (rather than byte) sizes, making it easy to
update. On the other hand, flash memory is not useful as random access memory (RAM) because RAM needs to be addressable at the byte (not the block) level.

Flash Memory gets its name because the microchip is so organized that a section of memory cells are erased in a single action or "flash." The erasure is caused by tunneling in which electrons pierce through a thin dielectric material to remove an electronic charge from a floating gate associated with each memory cell. Intel offers a form of flash memory that holds two bits (rather than one) in each memory cell, thus doubling the capacity of memory without a corresponding increase in price. Flash memory is used in digital cellular phones, digital cameras, LAN switches, PC Cards for notebook computers, digital set-up boxes, embedded controllers, and other devices.

CREATE PROGRAM IN C LANGUAGE



There are many "languages" like, for example C, Fortran, PASCAL etc., that help us to convert an algorithm in to something that a computer can understand. We will focus here only on C programming

So. let us start looking at how do we create a "C program".There are basically three steps involved in converting your ideas into what is to be done to make it a working program.  There are three steps involved in converting your idea of what is to be done to a working program

1. Creating a source code in the form of the text file acceptable to the compiler.
2. Invoking the compiler to process the source code and produce an object file.
3. Linking all the object files and libraries to produce an executable 16

We will look at these parts in some more detail here.

The source code is where you express the the whole computation you want to do into a series of instructions.

The tradition is to use the C source code with an extension .c For example myfile.c . Some compilers insist on this extension. This is an acsii file that you can create using any one of the editors that you are familiar with. We will look at the detailed structure of this code in a little while .

We may have different parts of the code in different files. We then compile them separately or together to form object files. During this operation the compiler checks and convert your source code to a language understandable to the particular processor that is used in the computer. These object files that comes with an extension .o, for example myfile.o , are in binary format.

The next step is to link these object files and other libraries and header files etc., to produce an executable. This executable file contains a set of instruction in a language that the processor can understand and is the one which we run on the computer. We will see the use of header files and system libraries in the examples given below.

Before proceed let us summarize the steps that takes us to run a program in the form of a flow chart.

     Structure of C Programme
As we said earlier it is the tradition to write a C program file name ending with the extension .C.

Example: Below we give a program that computes the square root of a number and prints it on the scree. Since it is a C program we name it as "myfile.c" , that is with an extension ".c".

1 #include
2 #include
3 main()
{
4 float x,y;
5 scanf("%f\n",&x);
6 y=sqrt(x); 7 printf("%f\n",y); }

Before we proceed to the compilation of this program let us take a minute to see what does each of the lines mean?
Lines 1 and 2 are header files. These files contain the math library functions and the input output command functions. We need the math function library to use functions like "sqrt", "log", "power" etc. We need the stdio library to use functions like "scanf" and "printf" which reads and prints the data from the screen. More on this a little later.

The program given above just has a main body. Line 3 is declares the starting on this part. The lines inside the { } following this are the part of the main program.
Line 4 is the declaration of the variables. Again we will see more on the variable types later in this course. In this particular example we declare variables "x,y" as floating points.
Line 5 reads the value of the variable from the screen.
Line 6 computes the square root of the variable "x" and put the value into variable "y".
Line 7 prints out this value of y.
We first compile this code to produce an object code using the command cc -c myfile.c or an equivalent command available at your machine.
The object file produced by this, myfile.o is then linked with the system math library using the command, cc -lm myfile.o -o myfile.exe , to produce the executable myfile.exe.

(the second term in the command above "-lm" links the object file to the math library. The file name that comes just after -o is the name of the executable).
We can combine compile and link into one step as will see in later part of the course.
Example: Let us now look at a C program that uses the library and another function.
#include
#include
main()
{
float x,y;
("%f\n",&x); y=sqrt(x); printf("%f\n",y); printit(); printf()
{
printf("The program is Over");
}
This simple C code adds an additional component to the one we saw earlier, it calls a function "printit". As before you can see the "include" files, or what are called header files. Then we will see the main part of the program. This program is basically computing square root of the variable x and it is printing it out on the screen. Then it is calling some function, which prints out a statement.Here we see on of the main feature of a C program. The main part does some of the calculations and it calls another function. The function we called, named printit, which simply prints the sentence "the program is over." can be put it a separate file. Let is call it "print.c". We will see that how it can be compiled and how it can be executed.There are two ways to compile this program.To compile these programs we could type cc -c sample.c and cc -c print.c separately.This commands will create sample.o and print.o files. We can create the executable by typing the command.cc sample.o print.o -lm -o a.out In this linking command we have put together the two files and also included the math library file m.a We can now execute the program by typing a.out.You could try variations of these commands and programs to figure out why we need the math.h file and why we need to include -lm in the linker etc. Also try it for different math functions, for example calculating the logarithm or trigonometric functions etc.Another way to compile and generate an executable from this is to simply type cc sample.c print.c -lm -o a.out In this the compilation and linking is put together.Let us try another program to illustrate the use of math library and the compilation and linking procedure

History of Computer

History of Computer


          The first computers were people! That is, electronic computers (and the earlier mechanical computers) were given this name because they performed the work that had previously been assigned to people. "Computer" was originally a job title: it was used to describe those human beings (predominantly women) whose job it was to perform the repetitive calculations required to compute such things as navigational tables, tide charts, and planetary positions for astronomical almanacs. Imagine you had a job where hour after hour, day after day, you were to do nothing but compute multiplications. Boredom would quickly set in, leading to carelessness, leading to mistakes. And even on your best days you wouldn't be producing answers very fast. Therefore, inventors have been searching for hundreds of years for a way to mechanize (that is, find a mechanism that can perform) this task.


This picture shows what were known as "counting tables" [photo courtesy IBM]


A typical computer operation back when computers were people.
The abacus was an early aid for mathematical computations. Its only value is that it aids the memory of the human performing the calculation. A skilled abacus operator can work on addition and subtraction problems at the speed of a person equipped with a hand calculator (multiplication and division are slower). The abacus is often wrongly attributed to China. In fact, the oldest surviving abacus was used in 300 B.C. by the Babylonians. The abacus is still in use today, principally in the far east. A modern abacus consists of rings that slide over rods, but the older one pictured below dates from the time when pebbles were used for counting (the word "calculus" comes from the Latin word for pebble).


A very old abacus


A more modern abacus. Note how the abacus is really just a representation of the human fingers: the 5 lower rings on each rod represent the 5 fingers and the 2 upper rings represent the 2 hands.
In 1617 an eccentric (some say mad) Scotsman named John Napier invented logarithms, which are a technology that allows multiplication to be performed via addition. The magic ingredient is the logarithm of each operand, which was originally obtained from a printed table. But Napier also invented an alternative to tables, where the logarithm values were carved on ivory sticks which are now called Napier's Bones.


An original set of Napier's Bones [photo courtesy IBM]


A more modern set of Napier's Bones
Napier's invention led directly to the slide rule, first built in England in 1632 and still in use in the 1960's by the NASA engineers of the Mercury, Gemini, and Apollo programs which landed men on the moon.


A slide rule
Leonardo da Vinci (1452-1519) made drawings of gear-driven calculating machines but apparently never built any.


A Leonardo da Vinci drawing showing gears arranged for computing
The first gear-driven calculating machine to actually be built was probably the calculating clock, so named by its inventor, the German professor Wilhelm Schickard in 1623. This device got little publicity because Schickard died soon afterward in the bubonic plague.


Schickard's Calculating Clock
In 1642 Blaise Pascal, at age 19, invented the Pascaline as an aid for his father who was a tax collector. Pascal built 50 of this gear-driven one-function calculator (it could only add) but couldn't sell many because of their exorbitant cost and because they really weren't that accurate (at that time it was not possible to fabricate gears with the required precision). Up until the present age when car dashboards went digital, the odometer portion of a car's speedometer used the very same mechanism as the Pascaline to increment the next wheel after each full revolution of the prior wheel. Pascal was a child prodigy. At the age of 12, he was discovered doing his version of Euclid's thirty-second proposition on the kitchen floor. Pascal went on to invent probability theory, the hydraulic press, and the syringe. Shown below is an 8 digit version of the Pascaline, and two views of a 6 digit version:


Pascal's Pascaline [photo © 2002 IEEE]


A 6 digit model for those who couldn't afford the 8 digit model


A Pascaline opened up so you can observe the gears and cylinders which rotated to display the numerical result
Click on the "Next" hyperlink below to read about the punched card system that was developed for looms for later applied to the U.S. census and then to computers...


วันจันทร์ที่ 5 สิงหาคม พ.ศ. 2556

Home network

A home network or home area network (HAN) is a residential local area network (LAN) for communication between digital devices typically deployed in the home, usually a small number of personal computers and accessories, such as printers and mobile computing devices. An important function is the sharing of Internet access, often a broadband service provisioned by fiber-to-the-home or via Cable Internet access, Digital Subscriber Line (DSL) or mobile broadband by Internet service providers (ISPs). If an ISP only provides one IP address, a router including network address translation (NAT), proxy server software and typically a network firewall, allows several computers to share the external IP address. The router function may be assumed by a PC with several network interfaces, but a dedicated router device is more common, often including a wireless accesspoint, providing WiFi access.


Computer network

Computer  network

Computer Network คืออะไร คอมพิวเตอร์ เน็ตเวิร์ค คือระบบเครือข่ายคอมพิวเตอร์

What is a computer network ?

              A computer network (or data network) is a telecommunications network that allows computers to exchange data. The physical connection between networked computing devices is established using either cable media or wireless media. The best-known computer network is the Internet.


History

Before the advent of computer networks, communication between calculation machines and early computers was performed by human users by carrying instructions between them. Today, in spite of the wide use of email and other networking applications, people do continue to transfer information to another person's computer by hand-carrying removable storage media (such as flash drives) — a method jokingly known as "sneakernet".
                Today, computer networks are the core of modern communication. All modern aspects of the public switched telephone network (PSTN) are computer-controlled. Telephony increasingly runs over the Internet Protocol, although not necessarily the public Internet. The scope of communication has increased significantly in the past decade. This boom in communications would not have been possible without the progressively advancing computer network. Computer networks, and the technologies that make communication between networked computers possible, continue to drive computer hardware, software, and peripherals industries. The expansion of related industries is mirrored by growth in the numbers and types of people using networks, from the researcher to the home user. 
Type of network

      Local area network (LAN)

                   - is a small computer network that usually using in short connection.
                   - Connection in same or near area.
                   - Connection from 2 computers and tools or more.
                   - If want far connection, must use repeater together.

      Metropolitan area network

                   - is a large computer network or aggregation of LAN.
                   - Cover wide areas in citys.
                   -  must use Backbone which serves as a connection main line.

      Wide area network

                    - is a computer network that covers a large geographic area.
                    - uses a communications channel that combines many types of media such as telephone lines, cables, and air waves.

Network topology


              Network topology is the layout or organizational hierarchy of interconnected nodes of a computer network.
  • A bus network: all nodes are connected to a common medium along this medium. This was the layout used in the originalEthernet, called 10BASE5 and 10BASE2.
  • A star network: all nodes are connected to a special central node. This is the typical layout found in a Wireless LAN, where each wireless client connects to the central Wireless access point.
  • A ring network: each node is connected to its left and right neighbour node, such that all nodes are connected and that each node can reach each other node by traversing nodes left- or rightwards. The Fiber Distributed Data Interface (FDDI) made use of such a topology.
  • A mesh network: each node is connected to an arbitrary number of neighbours in such a way that there is at least one traversal from any node to any other.
  • A fully connected network: each node is connected to every other node in the network.

 Style of using computer network

                1.Client/Server

                                  - consist with sever and client.
                                  - Server officiate to control working of network,accessing Hardware and Softwere   
                                     tools.
                                  - Client is caller of want to server.

                2.Peer to Peer

                                  - All computers is sever and client.
                                  - Can resource together, low cost,low safety.



Data Center Facebook

Data Center Facebook


             At the edge of the Arctic Circle in Lulea (Sweden) is the newest data center Facebook. The Center handles data about users of social networks around the world.
                 1. Data center in Lulea became the first data center outside of the U.S..



                       2. Facebook Guide believe that Lulea is likely to be one of the most efficient and sustainable data centers in the world.




                       3. All the equipment in the center provides electricity to the local hydroelectric power plant that runs on renewable energy, thus reducing the number of backup generators for more than 70%.


4. In addition to the energy of the water, the center is also used by the northern cold air to cool the servers that store photos, videos, comments and "likes." Any excess heat is used to maintain a comfortable temperature in offices.



5.The so common office of them




6. Almost all of the technology at the center, from servers to power distribution systems, based on the work of Open Compute Project - community of engineers from around the world, which is engaged in designing storage centers.




7. You can see the blue STP (Shield Twisted Pair) cables.


 8.These are the ventilators. 


 9. The ventilators can never work in the cold season.


 10. These are their server computers. 


11. During the first week of work, the coefficient of efficiency of energy consumption in the new center Facebook was 1.07. 






               12. The inscription on the wall of the center: "What would you do if you have nothing to be afraid of?"




              13. It looks like this in the summer, but on the other hand it is covered with heavy snow.



 14. Center Manager - Joel Kelgren.