Wednesday, November 03, 2010

* UNIX CONCEPTS *




SUCCESS FOR CAREER





* UNIX CONCEPTS *


________________________________________

FILE MANAGEMENT IN UNIX

1. How are devices represented in UNIX?
All devices are represented by files called special files that are located in/dev directory. Thus, device files and other files are named and accessed in the same way. A 'regular file' is just an ordinary data file in the disk. A 'block special file' represents a device with characteristics similar to a disk (data transfer in terms of blocks). A 'character special file' represents a device with characteristics similar to a keyboard (data transfer is by stream of bits in sequential order).

2. What is 'inode'?
All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode. In addition to descriptions about the file, the inode contains pointers to the data blocks of the file. If the file is large, inode has indirect pointer to a block of pointers to additional data blocks (this further aggregates for larger files). A block is typically 8k.
Inode consists of the following fields:
 File owner identifier
 File type
 File access permissions
 File access times
 Number of links
 File size
 Location of the file data

3. Brief about the directory representation in UNIX.
A Unix directory is a file containing a correspondence between filenames and inodes. A directory is a special file that the kernel maintains. Only kernel modifies directories, but processes can read directories. The contents of a directory are a list of filename and inode number pairs. When new directories are created, kernel makes two entries named '.' (refers to the directory itself) and '..' (refers to parent directory).
System call for creating directory is mkdir (pathname, mode).

4. What are the Unix system calls for I/O?
 open(pathname,flag,mode) - open file
 creat(pathname,mode) - create file
 close(filedes) - close an open file
 read(filedes,buffer,bytes) - read data from an open file
 write(filedes,buffer,bytes) - write data to an open file
 lseek(filedes,offset,from) - position an open file
 dup(filedes) - duplicate an existing file descriptor
 dup2(oldfd,newfd) - duplicate to a desired file descriptor
 fcntl(filedes,cmd,arg) - change properties of an open file
 ioctl(filedes,request,arg) - change the behaviour of an open file
The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations.

5. How do you change File Access Permissions?
Every file has following attributes:
 owner's user ID ( 16 bit integer )
 owner's group ID ( 16 bit integer )
 File access mode word
'r w x -r w x- r w x'
(user permission-group permission-others permission)
r-read, w-write, x-execute
To change the access mode, we use chmod(filename,mode).
Example 1:
To change mode of myfile to 'rw-rw-r--' (ie. read, write permission for user - read,write permission for group - only read permission for others) we give the args as:
chmod(myfile,0664) .
Each operation is represented by discrete values
'r' is 4
'w' is 2
'x' is 1
Therefore, for 'rw' the value is 6(4+2).
Example 2:
To change mode of myfile to 'rwxr--r--' we give the args as:
chmod(myfile,0744).

6. What are links and symbolic links in UNIX file system?
A link is a second name (not a file) for a file. Links can be used to assign more than one name to a file, but cannot be used to assign a directory more than one name or link filenames on different computers.
Symbolic link 'is' a file that only contains the name of another file.Operation on the symbolic link is directed to the file pointed by the it.Both the limitations of links are eliminated in symbolic links.
Commands for linking files are:
Link ln filename1 filename2
Symbolic link ln -s filename1 filename2

7. What is a FIFO?
FIFO are otherwise called as 'named pipes'. FIFO (first-in-first-out) is a special file which is said to be data transient. Once data is read from named pipe, it cannot be read again. Also, data can be read only in the order written. It is used in interprocess communication where a process writes to one end of the pipe (producer) and the other reads from the other end (consumer).

8. How do you create special files like named pipes and device files?
The system call mknod creates special files in the following sequence.
1. kernel assigns new inode,
2. sets the file type to indicate that the file is a pipe, directory or special file,
3. If it is a device file, it makes the other entries like major, minor device numbers.
For example:
If the device is a disk, major device number refers to the disk controller and minor device number is the disk.

9. Discuss the mount and unmount system calls
The privileged mount system call is used to attach a file system to a directory of another file system; the unmount system call detaches a file system. When you mount another file system on to your directory, you are essentially splicing one directory tree onto a branch in another directory tree. The first argument to mount call is the mount point, that is , a directory in the current file naming system. The second argument is the file system to mount to that point. When you insert a cdrom to your unix system's drive, the file system in the cdrom automatically mounts to /dev/cdrom in your system.

10. How does the inode map to data block of a file?
Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large maximum file size with efficient access to large files, but also small files are accessed directly in one disk read.

11. What is a shell?
A shell is an interactive user interface to an operating system services that allows an user to enter commands as character strings or through a graphical user interface. The shell converts them to system calls to the OS or forks off a process to execute the command. System call results and other information from the OS are presented to the user through an interactive interface. Commonly used shells are sh,csh,ks etc.

SECTION - II
PROCESS MODEL and IPC

1. Brief about the initial process sequence while the system boots up.
While booting, special process called the 'swapper' or 'scheduler' is created with Process-ID 0. The swapper manages memory allocation for processes and influences CPU allocation. The swapper inturn creates 3 children:
 the process dispatcher,
 vhand and
 dbflush
with IDs 1,2 and 3 respectively.
This is done by executing the file /etc/init. Process dispatcher gives birth to the shell. Unix keeps track of all the processes in an internal data structure called the Process Table (listing command is ps -el).

2. What are various IDs associated with a process?
Unix identifies each process with a unique integer called ProcessID. The process that executes the request for creation of a process is called the 'parent process' whose PID is 'Parent Process ID'. Every process is associated with a particular user called the 'owner' who has privileges over the process. The identification for the user is 'UserID'. Owner is the user who executes the process. Process also has 'Effective User ID' which determines the access privileges for accessing resources like files.
getpid() -process id
getppid() -parent process id
getuid() -user id
geteuid() -effective user id

3. Explain fork() system call.
The `fork()' used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. We can tell which is which by checking the return value from `fork()'. The parent gets the child's pid returned to him, but the child gets 0 returned to him.

4. Predict the output of the following program code
main()
{
fork();
printf("Hello World!");
}
Answer:
Hello World!Hello World!
Explanation:
The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process.

5. Predict the output of the following program code
main()
{
fork(); fork(); fork();
printf("Hello World!");
}
Answer:
"Hello World" will be printed 8 times.
Explanation:
2^n times where n is the number of calls to fork()

6. List the system calls used for process management:
System calls Description
fork() To create a new process
exec() To execute a new program in a process
wait() To wait until a created process completes its execution
exit() To exit from a process execution
getpid() To get a process identifier of the current process
getppid() To get parent process identifier
nice() To bias the existing priority of a process
brk() To increase/decrease the data segment size of a process

7. How can you get/set an environment variable from a program?
Getting the value of an environment variable is done by using `getenv()'.
Setting the value of an environment variable is done by using `putenv()'.

8. How can a parent and child process communicate?
A parent and child can communicate through any of the normal inter-process communication schemes (pipes, sockets, message queues, shared memory), but also have some special ways to communicate that take advantage of their relationship as a parent and child. One of the most obvious is that the parent can get the exit status of the child.

9. What is a zombie?
When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls `wait()'; In the interval between the child terminating and the parent calling `wait()', the child is said to be a `zombie' (If you do `ps', the child will have a `Z' in its status field to indicate this.)

10. What are the process states in Unix?
As a process executes it changes state according to its circumstances. Unix processes have the following states:
Running : The process is either running or it is ready to run .
Waiting : The process is waiting for an event or for a resource.
Stopped : The process has been stopped, usually by receiving a signal.
Zombie : The process is dead but have not been removed from the process table.

11. What Happens when you execute a program?
When you execute a program on your UNIX system, the system creates a special environment for that program. This environment contains everything needed for the system to run the program as if no other program were running on the system. Each process has process context, which is everything that is unique about the state of the program you are currently running. Every time you execute a program the UNIX system does a fork, which performs a series of operations to create a process context and then execute your program in that context. The steps include the following:
 Allocate a slot in the process table, a list of currently running programs kept by UNIX.
 Assign a unique process identifier (PID) to the process.
 iCopy the context of the parent, the process that requested the spawning of the new process.
 Return the new PID to the parent process. This enables the parent process to examine or control the process directly.
After the fork is complete, UNIX runs your program.

12. What Happens when you execute a command?
When you enter 'ls' command to look at the contents of your current working directory, UNIX does a series of things to create an environment for ls and the run it: The shell has UNIX perform a fork. This creates a new process that the shell will use to run the ls program. The shell has UNIX perform an exec of the ls program. This replaces the shell program and data with the program and data for ls and then starts running that new program. The ls program is loaded into the new process context, replacing the text and data of the shell. The ls program performs its task, listing the contents of the current directory.

13. What is a Daemon?
A daemon is a process that detaches itself from the terminal and runs, disconnected, in the background, waiting for requests and responding to them. It can also be defined as the background process that does not belong to a terminal session. Many system functions are commonly performed by daemons, including the sendmail daemon, which handles mail, and the NNTP daemon, which handles USENET news. Many other daemons may exist. Some of the most common daemons are:
 init: Takes over the basic running of the system when the kernel has finished the boot process.
 inetd: Responsible for starting network services that do not have their own stand-alone daemons. For example, inetd usually takes care of incoming rlogin, telnet, and ftp connections.
 cron: Responsible for running repetitive tasks on a regular schedule.

14. What is 'ps' command for?
The ps command prints the process status for some or all of the running processes. The information given are the process identification number (PID),the amount of time that the process has taken to execute so far etc.

15. How would you kill a process?
The kill command takes the PID as one argument; this identifies which process to terminate. The PID of a process can be got using 'ps' command.

16. What is an advantage of executing a process in background?
The most common reason to put a process in the background is to allow you to do something else interactively without waiting for the process to complete. At the end of the command you add the special background symbol, &. This symbol tells your shell to execute the given command in the background.
Example: cp *.* ../backup& (cp is for copy)

17. How do you execute one program from within another?
The system calls used for low-level process creation are execlp() and execvp(). The execlp call overlays the existing program with the new one , runs that and exits. The original program gets back control only when an error occurs.
execlp(path,file_name,arguments..); //last argument must be NULL
A variant of execlp called execvp is used when the number of arguments is not known in advance.
execvp(path,argument_array); //argument array should be terminated by NULL

18. What is IPC? What are the various schemes available?
The term IPC (Inter-Process Communication) describes various ways by which different process running on some operating system communicate between each other. Various schemes available are as follows:
Pipes:
One-way communication scheme through which different process can communicate. The problem is that the two processes should have a common ancestor (parent-child relationship). However this problem was fixed with the introduction of named-pipes (FIFO).

Message Queues:
Message queues can be used between related and unrelated processes running on a machine.

Shared Memory:
This is the fastest of all IPC schemes. The memory to be shared is mapped into the address space of the processes (that are sharing). The speed achieved is attributed to the fact that there is no kernel involvement. But this scheme needs synchronization.

Various forms of synchronisation are mutexes, condition-variables, read-write locks, record-locks, and semaphores.

SECTION - III
MEMORY MANAGEMENT

1. What is the difference between Swapping and Paging?
Swapping:
Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Paging:
Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory.
It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.

2. What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory Management?
Historic Unix uses Swapping – entire process is transferred to the main memory from the swap device, whereas the Unix System V uses Demand Paging – only the part of the process is moved to the main memory. Historic Unix uses one Swap Device and Unix System V allow multiple Swap Devices.

3. What is the main goal of the Memory Management?
 It decides which process should reside in the main memory,
 Manages the parts of the virtual address space of a process which is non-core resident,
 Monitors the available main memory and periodically write the processes into the swap device to provide more processes fit in the main memory simultaneously.

4. What is a Map?
A Map is an Array, which contains the addresses of the free space in the swap device that are allocatable resources, and the number of the resource units available there.









This allows First-Fit allocation of contiguous blocks of a resource. Initially the Map contains one entry – address (block offset from the starting of the swap area) and the total number of resources.
Kernel treats each unit of Map as a group of disk blocks. On the allocation and freeing of the resources Kernel updates the Map for accurate information.

5. What scheme does the Kernel in Unix System V follow while choosing a swap device among the multiple swap devices?
Kernel follows Round Robin scheme choosing a swap device among the multiple swap devices in Unix System V.

6. What is a Region?
A Region is a continuous area of a process’s address space (such as text, data and stack). The kernel in a ‘Region Table’ that is local to the process maintains region. Regions are sharable among the process.

7. What are the events done by the Kernel after a process is being swapped out from the main memory?
When Kernel swaps the process out of the primary memory, it performs the following:
 Kernel decrements the Reference Count of each region of the process. If the reference count becomes zero, swaps the region out of the main memory,
 Kernel allocates the space for the swapping process in the swap device,
 Kernel locks the other swapping process while the current swapping operation is going on,
 The Kernel saves the swap address of the region in the region table.

8. Is the Process before and after the swap are the same? Give reason.
Process before swapping is residing in the primary memory in its original form. The regions (text, data and stack) may not be occupied fully by the process, there may be few empty slots in any of the regions and while swapping Kernel do not bother about the empty slots while swapping the process out.
After swapping the process resides in the swap (secondary memory) device. The regions swapped out will be present but only the occupied region slots but not the empty slots that were present before assigning.
While swapping the process once again into the main memory, the Kernel referring to the Process Memory Map, it assigns the main memory accordingly taking care of the empty slots in the regions.



EXAMAPERS123.BLOGSPOT.COM



9. What do you mean by u-area (user area) or u-block?
This contains the private data that is manipulated only by the Kernel. This is local to the Process, i.e. each process is allocated a u-area.

10. What are the entities that are swapped out of the main memory while swapping the process out of the main memory?
All memory space occupied by the process, process’s u-area, and Kernel stack are swapped out, theoretically.
Practically, if the process’s u-area contains the Address Translation Tables for the process then Kernel implementations do not swap the u-area.

11. What is Fork swap?
fork() is a system call to create a child process. When the parent process calls fork() system call, the child process is created and if there is short of memory then the child process is sent to the read-to-run state in the swap device, and return to the user state without swapping the parent process. When the memory will be available the child process will be swapped into the main memory.

12. What is Expansion swap?
At the time when any process requires more memory than it is currently allocated, the Kernel performs Expansion swap. To do this Kernel reserves enough space in the swap device. Then the address translation mapping is adjusted for the new virtual address space but the physical memory is not allocated. At last Kernel swaps the process into the assigned space in the swap device. Later when the Kernel swaps the process into the main memory this assigns memory according to the new address translation mapping.

13. How the Swapper works?
The swapper is the only process that swaps the processes. The Swapper operates only in the Kernel mode and it does not uses System calls instead it uses internal Kernel functions for swapping. It is the archetype of all kernel process.

14. What are the processes that are not bothered by the swapper? Give Reason.
 Zombie process: They do not take any up physical memory.
 Processes locked in memories that are updating the region of the process.
 Kernel swaps only the sleeping processes rather than the ‘ready-to-run’ processes, as they have the higher probability of being scheduled than the Sleeping processes.

15. What are the requirements for a swapper to work?
The swapper works on the highest scheduling priority. Firstly it will look for any sleeping process, if not found then it will look for the ready-to-run process for swapping. But the major requirement for the swapper to work the ready-to-run process must be core-resident for at least 2 seconds before swapping out. And for swapping in the process must have been resided in the swap device for at least 2 seconds. If the requirement is not satisfied then the swapper will go into the wait state on that event and it is awaken once in a second by the Kernel.

16. What are the criteria for choosing a process for swapping into memory from the swap device?
The resident time of the processes in the swap device, the priority of the processes and the amount of time the processes had been swapped out.

17. What are the criteria for choosing a process for swapping out of the memory to the swap device?
 The process’s memory resident time,
 Priority of the process and
 The nice value.

18. What do you mean by nice value?
Nice value is the value that controls {increments or decrements} the priority of the process. This value that is returned by the nice () system call. The equation for using nice value is:
Priority = (“recent CPU usage”/constant) + (base- priority) + (nice value)
Only the administrator can supply the nice value. The nice () system call works for the running process only. Nice value of one process cannot affect the nice value of the other process.

19. What are conditions on which deadlock can occur while swapping the processes?
 All processes in the main memory are asleep.
 All ‘ready-to-run’ processes are swapped out.
 There is no space in the swap device for the new incoming process that are swapped out of the main memory.
 There is no space in the main memory for the new incoming process.

20. What are conditions for a machine to support Demand Paging?
 Memory architecture must based on Pages,
 The machine must support the ‘restorable’ instructions.

21. What is ‘the principle of locality’?
It’s the nature of the processes that they refer only to the small subset of the total data space of the process. i.e. the process frequently calls the same subroutines or executes the loop instructions.

22. What is the working set of a process?
The set of pages that are referred by the process in the last ‘n’, references, where ‘n’ is called the window of the working set of the process.

23. What is the window of the working set of a process?
The window of the working set of a process is the total number in which the process had referred the set of pages in the working set of the process.

24. What is called a page fault?
Page fault is referred to the situation when the process addresses a page in the working set of the process but the process fails to locate the page in the working set. And on a page fault the kernel updates the working set by reading the page from the secondary device.

25. What are data structures that are used for Demand Paging?
Kernel contains 4 data structures for Demand paging. They are,
 Page table entries,
 Disk block descriptors,
 Page frame data table (pfdata),
 Swap-use table.

26. What are the bits that support the demand paging?
Valid, Reference, Modify, Copy on write, Age. These bits are the part of the page table entry, which includes physical address of the page and protection bits.

Page address
Age Copy on write Modify Reference Valid Protection

27. How the Kernel handles the fork() system call in traditional Unix and in the System V Unix, while swapping?
Kernel in traditional Unix, makes the duplicate copy of the parent’s address space and attaches it to the child’s process, while swapping. Kernel in System V Unix, manipulates the region tables, page table, and pfdata table entries, by incrementing the reference count of the region table of shared regions.

28. Difference between the fork() and vfork() system call?
During the fork() system call the Kernel makes a copy of the parent process’s address space and attaches it to the child process.
But the vfork() system call do not makes any copy of the parent’s address space, so it is faster than the fork() system call. The child process as a result of the vfork() system call executes exec() system call. The child process from vfork() system call executes in the parent’s address space (this can overwrite the parent’s data and stack ) which suspends the parent process until the child process exits.

29. What is BSS(Block Started by Symbol)?
A data representation at the machine level, that has initial values when a program starts and tells about how much space the kernel allocates for the un-initialized data. Kernel initializes it to zero at run-time.

30. What is Page-Stealer process?
This is the Kernel process that makes rooms for the incoming pages, by swapping the memory pages that are not the part of the working set of a process. Page-Stealer is created by the Kernel at the system initialization and invokes it throughout the lifetime of the system. Kernel locks a region when a process faults on a page in the region, so that page stealer cannot steal the page, which is being faulted in.

31. Name two paging states for a page in memory?
The two paging states are:
 The page is aging and is not yet eligible for swapping,
 The page is eligible for swapping but not yet eligible for reassignment to other virtual address space.

32. What are the phases of swapping a page from the memory?
 Page stealer finds the page eligible for swapping and places the page number in the list of pages to be swapped.
 Kernel copies the page to a swap device when necessary and clears the valid bit in the page table entry, decrements the pfdata reference count, and places the pfdata table entry at the end of the free list if its reference count is 0.

33. What is page fault? Its types?
Page fault refers to the situation of not having a page in the main memory when any process references it.
There are two types of page fault :
 Validity fault,
 Protection fault.

34. In what way the Fault Handlers and the Interrupt handlers are different?
Fault handlers are also an interrupt handler with an exception that the interrupt handlers cannot sleep. Fault handlers sleep in the context of the process that caused the memory fault. The fault refers to the running process and no arbitrary processes are put to sleep.

35. What is validity fault?
If a process referring a page in the main memory whose valid bit is not set, it results in validity fault.
The valid bit is not set for those pages:
 that are outside the virtual address space of a process,
 that are the part of the virtual address space of the process but no physical address is assigned to it.

36. What does the swapping system do if it identifies the illegal page for swapping?
If the disk block descriptor does not contain any record of the faulted page, then this causes the attempted memory reference is invalid and the kernel sends a “Segmentation violation” signal to the offending process. This happens when the swapping system identifies any invalid memory reference.

37. What are states that the page can be in, after causing a page fault?
 On a swap device and not in memory,
 On the free page list in the main memory,
 In an executable file,
 Marked “demand zero”,
 Marked “demand fill”.

38. In what way the validity fault handler concludes?
 It sets the valid bit of the page by clearing the modify bit.
 It recalculates the process priority.

39. At what mode the fault handler executes?
At the Kernel Mode.

40. What do you mean by the protection fault?
Protection fault refers to the process accessing the pages, which do not have the access permission. A process also incur the protection fault when it attempts to write a page whose copy on write bit was set during the fork() system call.

41. How the Kernel handles the copy on write bit of a page, when the bit is set?
In situations like, where the copy on write bit of a page is set and that page is shared by more than one process, the Kernel allocates new page and copies the content to the new page and the other processes retain their references to the old page. After copying the Kernel updates the page table entry with the new page number. Then Kernel decrements the reference count of the old pfdata table entry.
In cases like, where the copy on write bit is set and no processes are sharing the page, the Kernel allows the physical page to be reused by the processes. By doing so, it clears the copy on write bit and disassociates the page from its disk copy (if one exists), because other process may share the disk copy. Then it removes the pfdata table entry from the page-queue as the new copy of the virtual page is not on the swap device. It decrements the swap-use count for the page and if count drops to 0, frees the swap space.

42. For which kind of fault the page is checked first?
The page is first checked for the validity fault, as soon as it is found that the page is invalid (valid bit is clear), the validity fault handler returns immediately, and the process incur the validity page fault. Kernel handles the validity fault and the process will incur the protection fault if any one is present.

43. In what way the protection fault handler concludes?
After finishing the execution of the fault handler, it sets the modify and protection bits and clears the copy on write bit. It recalculates the process-priority and checks for signals.

44. How the Kernel handles both the page stealer and the fault handler?
The page stealer and the fault handler thrash because of the shortage of the memory. If the sum of the working sets of all processes is greater that the physical memory then the fault handler will usually sleep because it cannot allocate pages for a process. This results in the reduction of the system throughput because Kernel spends too much time in overhead, rearranging the memory in the frantic pace.
________________________________________




EXAMAPERS123.BLOGSPOT.COM

Oracle PL/SQL



SUCCESS FOR CAREER



Oracle PL/SQL

What is PL/SQL and what is it used for?
PL/SQL is Oracle's Procedural Language extension to SQL. PL/SQL's language syntax, structure and data types are similar to that of ADA. The PL/SQL language includes object oriented programming techniques such as encapsulation, function overloading, information hiding (all but inheritance). PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database.

________________________________________
Should one use PL/SQL or Java to code procedures and triggers?
Internally the Oracle database supports two procedural languages, namely PL/SQL and Java. This leads to questions like "Which of the two is the best?" and "Will Oracle ever desupport PL/SQL in favour of Java?".
Many Oracle applications are based on PL/SQL and it would be difficult of Oracle to ever desupport PL/SQL. In fact, all indications are that PL/SQL still has a bright future ahead of it. Many enhancements are still being made to PL/SQL. For example, Oracle 9iDB supports native compilation of Pl/SQL code to binaries.
PL/SQL and Java appeal to different people in different job roles. The following table briefly describes the difference between these two language environments:
PL/SQL:
• Data centric and tightly integrated into the database
• Proprietary to Oracle and difficult to port to other database systems
• Data manipulation is slightly faster in PL/SQL than in Java
• Easier to use than Java (depending on your background)
Java:
• Open standard, not proprietary to Oracle
• Incurs some data conversion overhead between the Database and Java type systems
• Java is more difficult to use (depending on your background)

________________________________________
How can one see if somebody modified any code?
Code for stored procedures, functions and packages is stored in the Oracle Data Dictionary. One can detect code changes by looking at the LAST_DDL_TIME column in the USER_OBJECTS dictionary view. Example:
SELECT OBJECT_NAME,
TO_CHAR(CREATED, 'DD-Mon-RR HH24:MI') CREATE_TIME,
TO_CHAR(LAST_DDL_TIME, 'DD-Mon-RR HH24:MI') MOD_TIME,
STATUS
FROM USER_OBJECTS
WHERE LAST_DDL_TIME > '&CHECK_FROM_DATE';

________________________________________
How can one search PL/SQL code for a string/ key value?
The following query is handy if you want to know where a certain table, field or expression is referenced in your PL/SQL source code.
SELECT TYPE, NAME, LINE
FROM USER_SOURCE
WHERE UPPER(TEXT) LIKE '%&KEYWORD%';

________________________________________
How can one keep a history of PL/SQL code changes?
One can build a history of PL/SQL code changes by setting up an AFTER CREATE schema (or database) level trigger (available from Oracle 8.1.7). This way one can easily revert to previous code should someone make any catastrophic changes. Look at this example:
CREATE TABLE SOURCE_HIST -- Create history table
AS SELECT SYSDATE CHANGE_DATE, USER_SOURCE.*
FROM USER_SOURCE WHERE 1=2;

CREATE OR REPLACE TRIGGER change_hist -- Store code in hist table
AFTER CREATE ON SCOTT.SCHEMA -- Change SCOTT to your schema name
DECLARE
BEGIN
if DICTIONARY_OBJ_TYPE in ('PROCEDURE', 'FUNCTION',
'PACKAGE', 'PACKAGE BODY', 'TYPE') then
-- Store old code in SOURCE_HIST table
INSERT INTO SOURCE_HIST
SELECT sysdate, user_source.* FROM USER_SOURCE
WHERE TYPE = DICTIONARY_OBJ_TYPE
AND NAME = DICTIONARY_OBJ_NAME;
end if;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20000, SQLERRM);
END;
/
show errors

________________________________________
How can I protect my PL/SQL source code?
PL/SQL V2.2, available with Oracle7.2, implements a binary wrapper for PL/SQL programs to protect the source code.
This is done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than the original). This way you can distribute software without having to worry about exposing your proprietary algorithms and methods. SQL*Plus and SQL*DBA will still understand and know how to execute such scripts. Just be careful, there is no "decode" command available.
The syntax is:
wrap iname=myscript.sql oname=xxxx.plb

________________________________________


Can one print to the screen from PL/SQL?
One can use the DBMS_OUTPUT package to write information to an output buffer. This buffer can be displayed on the screen from SQL*Plus if you issue the SET SERVEROUTPUT ON; command. For example:
set serveroutput on
begin
dbms_output.put_line('Look Ma, I can print from PL/SQL!!!');
end;
/
DBMS_OUTPUT is useful for debugging PL/SQL programs. However, if you print too much, the output buffer will overflow. In that case, set the buffer size to a larger value, eg.: set serveroutput on size 200000
If you forget to set serveroutput on type SET SERVEROUTPUT ON once you remember, and then EXEC NULL;. If you haven't cleared the DBMS_OUTPUT buffer with the disable or enable procedure, SQL*Plus will display the entire contents of the buffer when it executes this dummy PL/SQL block.

________________________________________
Can one read/write files from PL/SQL?
Included in Oracle 7.3 is an UTL_FILE package that can read and write operating system files. The directory you intend writing to has to be in your INIT.ORA file (see UTL_FILE_DIR=... parameter). Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUT with the SQL*Plus SPOOL command.
Copy this example to get started:
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'w');
UTL_FILE.PUTF(fileHandler, 'Look ma, I''m writing to a file!!!\n');
UTL_FILE.FCLOSE(fileHandler);
EXCEPTION
WHEN utl_file.invalid_path THEN
raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.');
END;
/

________________________________________
Can one call DDL statements from PL/SQL?
One can call DDL statements like CREATE, DROP, TRUNCATE, etc. from PL/SQL by using the "EXECUTE IMMEDATE" statement. Users running Oracle versions below 8i can look at the DBMS_SQL package (see FAQ about Dynamic SQL).
begin
EXECUTE IMMEDIATE 'CREATE TABLE X(A DATE)';
end;
NOTE: The DDL statement in quotes should not be terminated with a semicolon.

________________________________________
Can one use dynamic SQL statements from PL/SQL?
Starting from Oracle8i one can use the "EXECUTE IMMEDIATE" statement to execute dynamic SQL and PL/SQL statements (statements created at run-time). Look at these examples. Note that statements are NOT terminated by semicolons:
EXECUTE IMMEDIATE 'CREATE TABLE x (a NUMBER)';

-- Using bind variables...
sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)';
EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;

-- Returning a cursor...
sql_stmt := 'SELECT * FROM emp WHERE empno = :id';
EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id;
One can also use the older DBMS_SQL package (V2.1 and above) to execute dynamic statements. Look at these examples:
CREATE OR REPLACE PROCEDURE DYNSQL AS
cur integer;
rc integer;
BEGIN
cur := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cur, 'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE);
rc := DBMS_SQL.EXECUTE(cur);
DBMS_SQL.CLOSE_CURSOR(cur);
END;
/
More complex DBMS_SQL example using bind variables:
CREATE OR REPLACE PROCEDURE DEPARTMENTS(NO IN DEPT.DEPTNO%TYPE) AS
v_cursor integer;
v_dname char(20);
v_rows integer;
BEGIN
v_cursor := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(v_cursor, 'select dname from dept where deptno > :x', DBMS_SQL.V7);
DBMS_SQL.BIND_VARIABLE(v_cursor, ':x', no);
DBMS_SQL.DEFINE_COLUMN_CHAR(v_cursor, 1, v_dname, 20);
v_rows := DBMS_SQL.EXECUTE(v_cursor);
loop
if DBMS_SQL.FETCH_ROWS(v_cursor) = 0 then
exit;
end if;
DBMS_SQL.COLUMN_VALUE_CHAR(v_cursor, 1, v_dname);
DBMS_OUTPUT.PUT_LINE('Deptartment name: '||v_dname);
end loop;
DBMS_SQL.CLOSE_CURSOR(v_cursor);
EXCEPTION
when others then
DBMS_SQL.CLOSE_CURSOR(v_cursor);
raise_application_error(-20000, 'Unknown Exception Raised: '||sqlcode||' '||sqlerrm);
END;
/

________________________________________
What is the difference between %TYPE and %ROWTYPE?
The %TYPE and %ROWTYPE constructs provide data independence, reduces maintenance costs, and allows programs to adapt as the database changes to meet new business needs.
%ROWTYPE is used to declare a record with the same types as found in the specified database table, view or cursor. Example:
DECLARE
v_EmpRecord emp%ROWTYPE;
%TYPE is used to declare a field with the same type as that of a specified table's column. Example:
DECLARE
v_EmpNo emp.empno%TYPE;

________________________________________
What is the result of comparing NULL with NULL?
NULL is neither equal to NULL, nor it is not equal to NULL. Any comparison to NULL is evaluated to NULL. Look at this code example to convince yourself.
declare
a number := NULL;
b number := NULL;
begin
if a=b then
dbms_output.put_line('True, NULL = NULL');
elsif a<>b then
dbms_output.put_line('False, NULL <> NULL');
else
dbms_output.put_line('Undefined NULL is neither = nor <> to NULL');
end if;
end;

________________________________________
How does one get the value of a sequence into a PL/SQL variable?
As you might know, one cannot use sequences directly from PL/SQL. Oracle (for some silly reason) prohibits this:
i := sq_sequence.NEXTVAL;
However, one can use embedded SQL statements to obtain sequence values:
select sq_sequence.NEXTVAL into :i from dual;
Thanks to Ronald van Woensel

________________________________________
Can one execute an operating system command from PL/SQL?
There is no direct way to execute operating system commands from PL/SQL in Oracle7. However, one can write an external program (using one of the precompiler languages, OCI or Perl with Oracle access modules) to act as a listener on a database pipe (SYS.DBMS_PIPE). Your PL/SQL program then put requests to run commands in the pipe, the listener picks it up and run the requests. Results are passed back on a different database pipe. For an Pro*C example, see chapter 8 of the Oracle Application Developers Guide.
In Oracle8 one can call external 3GL code in a dynamically linked library (DLL or shared object). One just write a library in C/ C++ to do whatever is required. Defining this C/C++ function to PL/SQL makes it executable. Look at this External Procedure example.

________________________________________
How does one loop through tables in PL/SQL?
Look at the following nested loop code example.
DECLARE
CURSOR dept_cur IS
SELECT deptno
FROM dept
ORDER BY deptno;
-- Employee cursor all employees for a dept number
CURSOR emp_cur (v_dept_no DEPT.DEPTNO%TYPE) IS
SELECT ename
FROM emp
WHERE deptno = v_dept_no;
BEGIN
FOR dept_rec IN dept_cur LOOP
dbms_output.put_line('Employees in Department '||TO_CHAR(dept_rec.deptno));
FOR emp_rec in emp_cur(dept_rec.deptno) LOOP
dbms_output.put_line('...Employee is '||emp_rec.ename);
END LOOP;
END LOOP;
END;
/

________________________________________
How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy?
Contrary to popular believe, one should COMMIT less frequently within a PL/SQL loop to prevent ORA-1555 (Snapshot too old) errors. The higher the frequency of commit, the sooner the extents in the rollback segments will be cleared for new transactions, causing ORA-1555 errors.
To fix this problem one can easily rewrite code like this:
FOR records IN my_cursor LOOP
...do some stuff...
COMMIT;
END LOOP;
... to ...
FOR records IN my_cursor LOOP
...do some stuff...
i := i+1;
IF mod(i, 10000) THEN -- Commit every 10000 records
COMMIT;
END IF;
END LOOP;
If you still get ORA-1555 errors, contact your DBA to increase the rollback segments.
NOTE: Although fetching across COMMITs work with Oracle, is not supported by the ANSI standard.

________________________________________
I can SELECT from SQL*Plus but not from PL/SQL. What is wrong?
PL/SQL respect object privileges given directly to the user, but does not observe privileges given through roles. The consequence is that a SQL statement can work in SQL*Plus, but will give an error in PL/SQL. Choose one of the following solutions:
• Grant direct access on the tables to your user. Do not use roles!
• GRANT select ON scott.emp TO my_user;

• Define your procedures with invoker rights (Oracle 8i and higher);
• Move all the tables to one user/schema.

________________________________________
What is a mutating and constraining table?
"Mutating" means "changing". A mutating table is a table that is currently being modified by an update, delete, or insert statement. When a trigger tries to reference a table that is in state of flux (being changed), it is considered "mutating" and raises an error since Oracle should not return data that has not yet reached its final state.
Another way this error can occur is if the trigger has statements to change the primary, foreign or unique key columns of the table off which it fires. If you must have triggers on tables that have referential constraints, the workaround is to enforce the referential integrity through triggers as well.
There are several restrictions in Oracle regarding triggers:
• A row-level trigger cannot query or modify a mutating table. (Of course, NEW and OLD still can be accessed by the trigger) .
• A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete.
• Etc.

________________________________________
Can one pass an object/table as an argument to a remote procedure?
The only way the same object type can be referenced between two databases is via a database link. Note that it is not enough to just use the same type definitions. Look at this example:
-- Database A: receives a PL/SQL table from database B
CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL.VARCHAR2S) IS
BEGIN
-- do something with TabX from database B
null;
END;
/

-- Database B: sends a PL/SQL table to database A
CREATE OR REPLACE PROCEDURE pcalling IS
TabX DBMS_SQL.VARCHAR2S@DBLINK2;
BEGIN
pcalled@DBLINK2(TabX);
END;
/

________________________________________
Is it better to put code in triggers or procedures? What is the difference?
In earlier releases of Oracle it was better to put as much code as possible in procedures rather than triggers. At that stage procedures executed faster than triggers as triggers had to be re-compiled every time before executed (unless cached). In more recent releases both triggers and procedures are compiled when created (stored p-code) and one can add as much code as one likes in either procedures or triggers.

________________________________________
Is there a PL/SQL Engine in SQL*Plus?
No. Unlike Oracle Forms, SQL*Plus does not have an embedded PL/SQL engine. Thus, all your PL/SQL code is sent directly to the database engine for execution. This makes it much more efficient as SQL statements are not stripped off and sent to the database individually.

________________________________________
Is there a limit on the size of a PL/SQL block?
Yes, the max size is not an explicit byte limit, but related to the parse tree that is created when you compile the code. You can run the following select statement to query the size of an existing package or procedure:
SQL> select * from dba_object_size where name = 'procedure_name';

________________________________________
Where can one find more info about PL/SQL?
• Oracle FAQ: PL/SQL code examples
• Oracle FAQ: PL/SQL Books
• PLNet.org - An open source repository for PL/SQL developers
• RevealNet PL/SQL Pipeline - A free community for Oracle developers worldwide
• The PL/SQL Cellar - Free Oracle PL/SQL scripts including a bitwise operations package and message digest algorithms
• PLSolutions.com - PL/Solutions provides consulting and training services for the Oracle PL/SQL language and PL/Vision
• The DMOZ PL/SQL Directory



EXAMAPERS123.BLOGSPOT.COM

Oracle Versions



SUCCESS FOR CAREER

Oracle Versions

1977
Relational Software Inc. (RSI - currently Oracle Corporation) established
1978
Oracle V1 ran on PDP-11 under RSX, 128 KB max memory. Written in assembly language. Implementation separated Oracle code and user code. Oracle V1 was never officially released.
1980
Oracle V2 released - the first commercially available relational database to use SQL. Oracle runs on on DEC PDP-11 machines. Coide is still written in PDP-11 assembly language, but now ran under Vax/VMS.
1982
Oracle V3 released, Oracle became the first DBMS to run on mainframes, minicomputers, and PC's (portable codebase). First release to employ transactional processing. Oracle V3's server code was written in C.
1983
Relational Software Inc. changed its name to Oracle Corporation.
1984
Oracle V4 released, introduced read consistency, was ported to multiple platforms, first interoperability between PC and server.
1986
Oracle V5 released. Featured true client/server, VAX-cluster support, and distributed queries. (first DBMS with distributed capabilities).
1987
CASE and 4GL toolset
1988
Oracle V6 released - PL/SQL introduced.
Oracle Financial Applications built on relational database.
1989
Released Oracle 6.2 with Symmetric cluster access using the Oracle Parallel Server
1991
Reached power of 1,000 TPS on a parallel computing machine.
First database to run on a massively parallel computer (Oracle Parallel Server).
1992
Released Oracle7 for Unix
1993
Rollout of Oracle's Cooperative Development Environment (CDE).
Introduction of Oracle Industries and the Oracle Media Server.
1994
Oracle's headquarters moved to present location.
Released Oracle 7.1 and Oracle7 for the PC.
1995
Reported gross revenues of almost $3 billion.
1995
OraFAQ.com website launched.
1997
Oracle8 released (supports more users, more data, higher availability, and object-relational features)
1998
Oracle announces support for the Intel Linux operating system
1999
Oracle8i (the "i" is for internet) or Oracle 8.1.5 with Java integration (JVM in the database)
2000
Oracle8i Release 2 released
Oracle now not only the number one in Databases but also in ERP Applications
Oracle9i Application Server generally available: Oracle tools integrated in middle tier
2001
Oracle9i Release 1 (with RAC and Advanced Analytic Service)
2002
Oracle9i Release 2
2004
Oracle10g Release 1 (10.1.0) available ("g" is for grid, the latest buzzword)
2005
The Oracle FAQ (this site) is 10 years old!
2006
Oracle 10g XE(small data base free of cost for learning ) HTMlDB.

2007 Oracle 11g




EXAMAPERS123.BLOGSPOT.COM

Data Type Description



SUCCESS FOR CAREER

Data Type Description
VARCHAR2( len) Can store up to len number of characters. Each character would occupy one byte. Maximum width is 4000 characters.
VARCHAR(len) Same as VARCHAR2. But use VARCHAR2 as Oracle might change the usage of VARCHAR in future releases.
CHAR(len) Fixed length character data. If len is given then it can store up to len number of characters. Default width is 1. String is padded on the right with spaces until string is of len size. Maximum width is 2000.
NUMBER Can store numbers up to 40 digits plus decimal point and sign.
NUMBER (p ,s) P represents the maximum significant digits allowed. S is the number of digits on the right of the decimal point.
DATE Can store dates in the range 1-1-4712 B.C to 31-12-4712 AD.
LONG Variable length character values up to 2 gigabytes. Only one LONG column is allowed per table. You cannot use LONG datatype in functions, WHERE clause of SELECT, in indexing and subqueries.
RAW and LONG RAW Equivalent to VARCHAR2 and LONG respectively, but used for storing byte-oriented or binary data such as digital sound or graphics images.
CLOB, BLOB, NCLOB Used to store large character and binary objects. Each can accommodate up to 4 gigabytes. We will discuss more about it later in this book.
BFILE Stores a pointer to an external file. The content of the file resides in the file system of the operation system. Only the name of the file is stored in the column.
ROWID Stores a unique number that is used by Oracle to uniquely identify each row of the table.
NCHAR (size) Same as CHAR, but supports national language.
NVARCHAR2 (size) Same as VARCHAR2, but supports national language.



EXAMAPERS123.BLOGSPOT.COM

Tuesday, November 02, 2010

Cognizant Paper


Cognizant Paper
1. A says " the horse is not black".
B says " the horse is either brown or grey."
c says " the hoese is brown"
At least one is telling truth and atleast one is lying. tell
The colour of horse.
Answer : grey
2. A son and father goes for boating in river upstream . After rowing for 1 mile son notices the hat of his father falling in the river. After 5 min. he tells his father that his hat has fallen. So they turn around and are able to pick the hat at the point from where they began boating after 5 min. Tell the speed of river.
Ans...6 miles/hr

3 A+B+C+D=D+E+F+G=G+H+I=17 where each letter represent a number from 1 to
9. Find out what does letter D and G represent if letter A=4. (8 marks)
ans. D=5 G=1

4. Argentina had football team of 22 player of which captain is from Brazilian team and goalki from European team. For remainig palayer they have picked 6 from argentinan and 14 from european. Now for a team of 11 they must have goalki and captain so out of 9 now they plan to select 3 from argentinian and 6 from European. Find out no. of methods
available for it (2 marks)
Ans : 160600( check out for right no. 6C3 * 14C6)

5 Three thives were caught stealing sheep, mule and camel.
A says " B had stolen sheep "
C says " B had stolen mule"
B says he had stolen nothing.
the one who had stolen horse is speaking truth. the one who had stolen camel is lying . Tell who had stolen what? (5 marks)
ans. A- camel
B- mule
C- horse
6 a group of friends goes for dinner and gets bill of Rs 2400 Two of them says that they have forgotten their purse so remaining make an extra contribution of Rs 100 to pay up the bill. Tell the no. of person in that group. (3 marks)
Ans - 8 person







EXAMAPERS123.BLOGSPOT.COM









7. In a colony there are some families. Each of them have children but different in numbers.
Following are conditions
a> no of adult>no of sons>no of daughters>no of families.
b>each sister must have atleast one brother and should have at the most 1 sister.
c> no of children in one family exceeds the sum of no of children in the rest families.

Tell the no of families.(5 marks)
ans : 3 families

8.There are 6 people W,H,M,C,G,F who are murderer , victim , judge , police, witness, hangman. There was no eye witness only circumtancial witness. The murderer was sentenced to death.
Read following statement and determine who is who.

1. M knew both murderer and victim.
2. Judge asked C to discribe murder incident.
3. W was last to see F alive.
4. Police found G at the murder site.
5 H and W never met.

Desktop tips



Desktop tips :





SUCCESS FOR CAREER

Desktop tips
If you ever lose the Desktop but Explorer is still running with the Start Button,
you can do this to bring back your Desktop in a Windows box.
Click Start
Click Run
Type a period " . "
Then press Enter
Creating a New E-Mail Shortcut

To create a shortcut that will open your default e-mail program starting a new e-mail,
Right click on an open area of the desktop
Select New / Shortcut
For the Command Line, enter mailto:
For the title enter something like New E-Mail
When you click on this your default e-mail program should start with a new e-mail form.


Creating 3D Window Effect

You can create a nice 3D effect for your windows
Start Regedit
Go to HKEY_CURRENT_USER \ Control Panel \ Colors
Make sure the following setting are there:
ButtonHilight=128 128 128
ButtonShadow=255 255 255
Creating Shutdown, Restart and Logoff Icons

To create the icons, create a shortcut on the desktop.

For Shutdown, the command is C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows

For Restart, the command is C:\WINDOWS\RUNDLL.EXE user.exe,exitwindowsexec

For Logoff, the command is C:\WINDOWS\RUNDLL.EXE shell32.dll,SHExitWindowsEx 0
Having your Favorites and Start Menus Sort Alphabetically

If your Start Menu Program or Favorites are not sorting alphabetically, it is easy to fix this:
Start Regedit
Go to HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/MenuOrder
Under here is are Favorites and Start Menu folders
In each there is a value called Order
Simply delete (or rename this) and restart Winodws
Your Favorites or Start Menus should now sort alphabetically
Increasing the Icon Cache
Run Regedit
Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer
Create a new string called Max Cached Icons
Give it a value of 10000
This will increase response time in windows and give the Shellicon cache file more elbow room.
Make Icons 256 Color 16-Bit
Open the Registry
Hit Ctrl+F
Type Shell Icon BPP
When found, right click the Shell Icon BPP icon
Click Modify
Change the value from 4 to 16
Click Ok
Close the registry
Restart your computer
Removing Shortcut Arrows

An easy way to remove those irritating arrows from your desktop shortcut icons and not change their properties
Right click the Desktop / Properties / Appearance tab
Select Item
Scroll for Icon
The default size is 32
Change this to 30
Clicking Apply
Adding the Control Panel to the Start Menu
Open up the Explorer
Go to \WINDOWS\Start Menu
Right click in the right-hand panel
Add a new folder
Name it Control Panel.{21ec2020-3aea-1069-a2dd-08002b30309d}
This makes getting to the Control Panel items a little easier
Making Desktop Changes Permanent

To make changes to the Desktop like window size, positon after rebooting:
Start Regedit
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Create a New Binary Value
Name it NoSaveSettings
Give it a value of 01 00 00 00
Easy Shortcuts on the Desktop

Here is an easy way to put shortcuts on the Desktop where they can easily be moved to other group icons.
Using the Explorer, create a SHORTCUT to the \Windows\Desktop directory in your \Windows\SEND TO directory.
Now whenever you want to make a shortcut and move it to the desktop:
Just make the shortcut you want using Explorer
Right click on that shortcut
In the pop up menu select the Send To and Desktop shortcut.
Changing a Folder's Icon

To change the icon of a Folder on desktop:
Using the Explorer, move the folder from the Desktop directory to another directory on the hard drive
Right click on the new folder and select "Create Shortcut"
Move the shortcut to the Desktop
Right click and select a new icon
Full Window Drag ( Without Plus! )
Start Regedit
Open HKEY_CURRENT_USER /ControlPanel /Desktop /DragFullWindows
On "DragFullWindows" properties change 0 to 1
Fixing Corrupted Desktop Icons

Easier way to reset icons then deleting SHELLICONCACHE.

There's no need to exit Win95 and delete the SHELLICONCACHE file in order to reset icons that you may have changed (like Network Neighborhood).
Go to Control Panel, Display, Appearance Tab.
Select Icon from the Item drop down list.
Change the Size up or down one and apply.
Change the Size back to your original and apply.

If your Start Menu is slow or your icons are black for some reason, it means your Shelliconcache file is corrupt and should be deleted.
Delete the hidden file.
It will be recreated the next time you start Win95
Getting Screen Shots

If you need to get a screen shot, and you do not have a screen capture program, try this:
Hit the Print Screen key. This copies a bitmap of the full screen into the Windows clipboard. Start up a graphics editor and paste it in.
Alt + Print Screen will capture only the active window.
Increasing the Size of the Scroll Bar

How to adjust the width of the scroll bar:
Select Properties
Select the Appearance tab
Go to the item list and find scrollbar.
Increasing the value in the Size field will increase the scrollbar width.
Unable to Create Shortcuts on the Desktop

If you can't create shortcuts on your Desktop, you might have a corrupted registry.
Start Regedit
Go to HKEY_CLASSES_ROOT\.lnk\ShellNew\Command
Make sure it has a value of:
RunDLL32 AppWiz.Cpl,NewLinkHere %1 if you don't have IE 4
or RunDLL32 AppWiz.Cpl,NewLinkHere %2 if you have IE 4.0 or IE 4.01
Removing the InBox from the Desktop


A faster way to remove "Inbox" from the Deskop is to
Right mouse click on "Inbox"
Select delete
It will then tell you "you cannot store the inbox in the recycle bin. . .etc"
Click "Yes"
Wait 2 secs and it's gone.
Customizing Individual Folder Icons

To change a folder's icon:
Open Notepad and enter two lines,

[.ShellClassInfo]
IconFile=file name,number
(e.g. IconFile=C:\Icon\CustomFolder.ico,0)
Save the file as DESKTOP.INI in the folder you wish to change.
Click Start -> Run, type in the command line,
ATTRIB +S "folder name"
Open Explorer or My Computer and refresh (press F5 key).

This tip only work Windows 95/NT 4.0 + IE 4.0 with shell integration, or Windows 98/NT 5.0.
Removing the Recycle Bin

To remove Recycle Bin from the desktop:
Run REGEDIT.
Find NAMESPACE key in left pane (HKEY_Local_Macine \ Software \ Microsoft \ Windows \ Current Version \ Explorer \ Desktop \ Namespace)
Expand NAMESPACE (click '+' box)
Delete the value RECYCLE BIN in right pane
Adding Send To the Recycle Bin


Add a SHORTCUT TO THE RECYCLE BIN in your SEND TO folder.

That way you can just right click on a file you want to delete, and send it to the recycle bin without having to confirm each time.
Having Icons with No Name

Normally you have to have a name for an icon, just spaces are not allowed.
To create an icon with no name attached:
Make sure NumLock is on
Highlight the Icon you want to change
Right-Mouse click and select Rename
While holding down the Alt key, type 0160
Now the icon will have no name below it.

To Create Multiple Icons with No Name - From John R.
Follow directions detailed above
With the second icon simply add one space-bar character AFTER the 0160 number.
Each successive icon gets an additional space-bar character at the end (to prevent a duplicate naming error).
Moving the Start Button

How to move or close the start button!
Click on the Start button
Press the Esc key
Press the Alt and the - keys together
This will give you a menu, you can move or close
But if you move it you need to use the arrow keys and not the mouse.
Aligning Drop-Down Menus to the Right

All dropdown menus can be aligned to the right.
This features becomes useful when trying to access
menus with submenus that appear directly to the right.
Open the Registory editor (e.g. regedit.exe)
Goto \\HKEY_CURRENT_USER\Control Panel\Desktop
Create a string entry called "MenuDropAlignment"
Set its value to 1
Reboot

Note: Will not work under NT 4.0.
Repositioning a Background Bitmap

Normally, you only options for displaying a background bitmap are tiled, centered, or stretch to fit (with the Plus Pack).
You can edit the registry and have a third option which is to place the bitmap anywhere on your screen by specifying the X and Y coordinates.
Start Regedit
Go to HKEY_CURRENT_USER / Control Panel / Desktop
Create new Strings called WallpaperOriginX and WallpaperOriginY
Give them values to position them around your desktop
The bitmap must be smaller than your desktop size
Changing Drive Icons

To change a drive's icon when you open My Computer
Create a file called AUTORUN.INF on the root of your hard drive
Enter the lines

[autorun]
ICON=Name of the ICON file

For the name of the icon file you can either specify the path and name (e.g. ICON=C:\WINDOWS\ICONS\MY_ICON.ICO) or
a specific icon in a library (e.g. ICON=ICONFILE.DLL,2)
Adding AnyFolder and Mail to SendTo

Previous examples of adding items to the SendTo usually require editing the Registry.
An easy way around this is to use the following methods.

To add ANYFOLDER:
Open the Explorer
Go to \Windows\SendTo
Right click in the right hand panel
Select New / Text Document
Name it anything with a .otherfolder extension

When you want to send files to another folder:
Select the files with Explorer
Right Click
Select Send to and the name you just created
You them have the option of copying or moving the file to a folder of your choice

To add Mail:
Open the Explorer
Go to \Windows\SendTo
Right click in the right hand panel
Select New / Text Document
Name it anything with a .MapiMail extension (ignore any warnings about the file extension)

When you want to Mail files as attachments:
Select the files with Explorer
Right Click
Select Send to and the Mail name you just created
This allows you to easily mail multiple files
Adding Shortcuts to Desktop Without "Shortcut To" text
Start Regedit
Go to:HKEY_USERS \ .Default \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer
Add binary value to Explorer:link="00,00,00,00"
Now You can make Shortcuts to desktop without Shortcut To" text.
Easier User Interface

Add a menu item named "Open THIS folder!" to each of your cascading menus off of the Start menu.
This makes it easier to put items wherever you want them!
Go to Windows \ Start Menu \ Programs \ (etc.) in the Explorer
Start right click/dragging folders to the desktop, one by one.
Rename them and left click/drag them back to the same folder.

It takes a little while, but when you are finished you have a much easier interface to work with.
Removing the Start Button
Click on the start menu button twice, so there is a dashed line around the button
Press Alt and the minus sign
Choose Close to make the start button disappear, or move to move it to the right!

Note from Bob: - You have to re-boot to get it back again, or:
Press Ctrl-Alt-Delete
Highlight Explorer
Click on the End Task button
Select No to doing a full shutdown
Wait a few seconds and the click on the End Task button
Changing the clock to 24-Hour Time
To change the display of the clock on the taskbar to 24-hour format:
Open the Control Panel
Double-click on the Regional Settings icon
Click on the Time tab
In the Time style section select H:mm:ss
Removing the InBox and Recycle Bin Icons from the Desktop

To remove the InBox from your desktop, without needing to run the Policy Editor:
Start Regedit
Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ explorer \ Desktop \ NameSpace
Below that should be a few keys
Rename the key {00020D75-0000-0000-C000-000000000046}. I usually put another character before or after the curly braces.
Restart Windows and the InBox icon should be gone
You can do the same for any other items you don't to show such as the Recycle Bin or The Internet icons
Changing or Removing the Start Menu Icons
Download Microangelo and install it.
Create a blank.ico file.
Put it in a directory (C:\Windows. Then double click on the Microangelo Engineer to run it.
When you get it up on the screen click on the "start" tab. You will see a list of all the icons in the start menu.
Highlight the first one (programs) and select "Change". It will bring up a dialog box - select "browse".
Go to the directory that contains the blank icon and select it. Hit OK until you get back to the main
Engineer window and do all the rest exactly the same way.
When you have finished changing them all to the blank icon, Hit "Apply".
Hit your start button and look to see if all the icons are invisible. (They should be.)
Close out Micro Engineer and you're finished.
Adding Drive to the SendTo List
I have recently found that if you want to send something from A: drive or from any where to any drive, you can just make a short cut of that drive in subdirectory SENDTO.
For example I have two hard drives, a Floppy Drive, and a CDROM
After I have make a copy of each of my drive I will be able to send a whole directory of E:\XXX from the CDROM drive to A: drive or any other drive that i have had made the short c t in the SENDTO subdir of WINDOWS.
Adding a Protected Briefcase

You can make your briefcase a shortcut on the on desktop so if you have multiple users on your PC and you don't want to have a password for your briefcase, you can at least protect it from inadvertent deletion by just making the briefcase a hidden file or in a different location other than \Windows\Desktop\My Briefcase, then send a copy or shortcut to the desktop.
Customizing the Start Button's Name and Icon

To change the name of the Start button:
Copy EXPLORER.EXE in your Windows directory to another directory
Start a hex editor (I've been using Diskedit from Norton)
Edit EXPLORER.EXE
Search for the string 53 00 74 00 61 00 72 00 74
This is the word Start with the letters separated by a null character
The section you are in should also have the words "There was an internal error..." also separated with the null character immediately following
Now just replace the Start letters with any of your choice (up to 5 characters only)
Exit Windows
Boot to DOS
Copy your new Explorer file over the original

To change the Start button icon:
Copy USER.EXE in your \WINDOWS\SYSTEM directory to another directory
Use an icon editor that can replace icons in executable files
Edit USER.EXE and replace the flag icons with the icon of your choice
Boot to DOS
Copy the new USER.EXE

The same can be done with NT 4.0, just the offset will be different but the location to just before "There was an internal error..." is the same.
Adding the Device Manager to your Desktop

This allows you to quickly see all the devices attached to your computer.
I use it a lot to select Refresh when I add new external SCSI devices that were not
powered up at startup. This way you do not need to restart the computer. To add the Device Manager Icon:
Right click on an open area of your desktop
Select New / Shortcut
Type in C:\WINDOWS\CONTROL SYSDM.CPL, SYSTEM, 1
Replace C:\WINDOWS with whatever directory you installed Windows95
Click on the Next box
At the next dialog box type in Device Manager
Click on the Finish when you are done

Note: Replacing the 1 with a 3 will bring up the Performance Status
Adding Options to the Right-Click of the Start Menu

To add an option to the Right-Click of the Start button:
Go to Control Panel, View, Options
Click on the File Types Tab
Scroll down until you see File Folder
Click on Edit
Click on New
Type in the Name you want to in the Action box
Type in the Application you want to use

A good option to add is an MS-DOS Prompt:

Try this c:\command.com /k cd %1
It also puts the shortcut on a regular folder.
This command will open a DOS window with that folder as the current directory.
How to make the task bar autohide
Click the right button on a blank area of the task bar
Select Properties
Select Autohide
Click OK

This will make the task bar slide off the screen when the cursor moves away from it,
and it will slide back on when the cursor is moved near it again.

The same can be done for the MS Office task bar. The "sliding" effect is nice, and can free up some desktop space.

More Removing Shortcut Arrows

'lnkfile', 'piffle' and 'internetshortcut' are the three places
that I have seen the isshortcut arrow.
The best way to deal with this is to rename the 'isshortcut' to
'isshortcutbak' by right clicking on the 'isshortcut' then
select rename and add 'bak' to the end.

Closing Nested Folders

If you have several nested folders (folders within folders) and want to close them all,
simply, hold the Shift key while closing the last folder
This will close all previous ones as well.

Changing Application Icons

To have a wider choice of application icons:
Right click on the icon shortcut
Chose Properties
Click on the Program tab
Chose Change icon
Click on Browse
Select Files of type All Files
Browse to the directory where your icon files are kept
You can even use some bitmap files for you icons
Moving and Resizing the Taskbar

You can move the taskbar by pointing on a corner panel and dragging it
It is easier to move if you close all your windows first

You can also resize it by moving the mouse to the edge and dragging it larger or smaller.
Correcting Corrupted Fonts

If you have a problem with your non-true type fonts, here's what you do:
Open the Control Panel
Double click on Fonts
Search for the "Monotype Sorts" font
Delete this Font
Changing Desktop Folders - With No Registry Changes
From the Explorer, create a folder somewhere OTHER than the desktop, and call it something like "Desktop Folders."
Move all your desktop folders into that folder.
Create shortcuts to all of those folders on your desktop.
Now, you are free to change the icons of each shortcut individually, to anything you like!
Updating the Desktop

If you want to update the desktop, for example after you've been changing the registry.
Right-Click anywhere on the desktop
Press F5
Adding the Desktop to your Start Menu

Create a shortcut to the Explorer on your Desktop
Right click on the Start button
Choose Open
Go into the Programs Folder
Drag the Windows Explorer Icon on your Desktop using the RIGHT Mouse button
Choose copy here

Change the command line switch
Right click on the Shortcut you created
Choose Properties
Choose Shortcut
Type in following command line as target:
C:\WINDOWS\EXPLORER.EXE /n, /root,
The last "," is vital!
If you want the two pane Explorer view ad the switch ,/e
Then rename the Shortcut to "Desktop" or whatever you choose and drag the icon onto the start button.
Removing shortcut arrows

One problem when removing shortcut arrows is that
if you delete a desktop item, it will remove it.
If it is a shortcut it will just remove the icon.
If it is not a shortcut, then it will remove the program.
Having the little icon arrow is one way to tell the difference
Getting rid of Click Here to Continue
Start the Registry Editor
Open HKEY_CURRENT_USER / Software / Microsoft / Windows / CurrentVersion / Policies / Explorer
Create a binary value and call it NoStartBanner
Double-click on it and give it a value of 01 00 00 00
You will need to repeat the same steps for HKEY_USERS / .Default / Software / Microsoft / Windows / CurrentVersion / Policies / Explorer
Changing the Desktop and Explorer Folder Icons

The following steps will change the icon that is displayed as the default Folder icon.
Start the Registry Editor.
Search for "Shell Icons".
This will bring you to HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Windows / CurrentVersion / explorer / Shell Icons.
Double-click on the one has the value name of "3" in the right pane.
Type in the new icon you want to use.
If you have a DLL file specified, you need to count for the location of the particular icon you want to use, starting at 0.
To reset the icon cache, use a program such as Tweak with comes with the PowerToys from Microsoft.

Note: I haven't experimented with too many of the other icon changes possible.
Adding Control Panel Icons to the Desktop

This is an easy one..
Simply open up the Control Panel.
Right Click and Drag the icon you want to your desktop or folder.
This will create a shortcut for that icon.
It could come in handy if there are always certain items you need to get to quickly.
Create a Control Panel menu directly below the Start Button
Click the Start Button once with your right mouse button. You should see a right-button menu (called a context menu because it offers different choices in different contexts).
You should see the items Open, Explore, and Find on the context menu. Click Explore with your left mouse button.
An Explorer file management window should open. A directory tree should appear in the left pane, with the right pane displaying the contents of the Start Menu folder.
Right-click any empty space within the right pane. A context menu should appear. Click New and then Folder.
The Explorer will create a highlighted icon called New Folder. Type in the following string, all on one line, replacing the words New Folder with this new line. You must type the period, the curly braces, all four hyphens, and the hexadecimal numbers exactly as shown. After the closing curly brace, press Enter.
Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}

Other Folders can be added following the same instructions.
Dial-Up Networking.{992CFFA0-F557-101A-88EC-00DD010CCC48}
Printers.{2227A280-3AEA-1069-A2DE-08002B30309D}
Inbox.{208D2C60-3AEA-1069-A2D7-08002B30309D}
My Computer.{20D04FE0-3AEA-1069-A2D8-08002B30309D}
Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}
Network Neighborhood.{208D2C60-3AEA-1069-A2D7-08002B30309D}
Desktop.{00021400-0000-0000-C000-000000000046}
Briefcase.{85BBD920-42A0-1069-A2E4-08002B30309D}
Fonts.{BD84B380-8CA2-1069-AB1D-08000948F534}
Minimizing All Windows

To minimize all windows:
Press Ctrl-ESC ESC to bring up the Task Bar
Right Mouse Click on an open area of the Task Bar
Select Minimize all Windows

This makes it a lot easier to minimize windows when all your open applications are full screen.

With the Microsoft Keyboard, you can accomplish the same thing by pressing the Window-M key.
Removing the Shortcut Icon Arrows
Open REGEDIT.EXE
Open the Key HKEY_CLASSES_ROOT
Open the Key LNKFILE
Delete the value IsShortcut
Open the next Key PIFFILE
Delete the value IsShortcut
Restart the Win95
Turning on AutoArrange for Folders

To make all folders keep AutoArrange turned on:
Open up an existing folder
Select View / Arrange
Arrange the Icons the way you would like, (e.g. Name, Size,etc.)
Select View / Arrange again
Select AutoArrange
Press the Ctrl-key while you close the window.
This folder should now have AutoArrange always selected.

This should allow you to create new folders that have AutoArrange selected by default.
You only need to specify by Name, Size, etc. if you want to change it from the default you set above.
Note: I have only tested this on a few computers. Please give me feedback regarding any problems.
Creating Document Scraps

If you are using Microsoft Word 7.0,
you can highlight a section of the document then drag and drop the highlighted area to
your desktop. Windows will create a file for you with a name something like
"Document Scrap From..." followed by the first few words you selected
Quick Access to Your Desktop

How do you access your darn desktop when you have a ton of applications open?
Well you could right click on the taskbar and do a minimize all, but that can be slow.
Instead:
Open a browser window (double-click on "My Computer")
If there is no toolbar, select View from the menu and select Toolbar.
Then from the dropdown list-box in the toolbar select desktop.
Now minimize it and forget about it.
The next time you want to access your desktop just click the desktop window on the taskbar.
As long as you don't close the window when you shutdown, it will reopen when you start windows again.

Additional Note from Bob: You can also drag the Desktop folder to the start menu.
Then you just press Ctrl-ESC and click on Desktop
Restoring Corrupted Icons
If you use a graphic Card and you change the resolution, sometimes the icons are bad.
End Win95 and restart. When you see the starting message press F8 then type standard.
After this start of Win95 exit and restart.
Change back to your Resolution and restart.
The icons should be corrected.
Turn Off Window Animation

You can shut off the animation displayed when you minimize and maximize windows.
This tip makes navigating Windows 95 a lot faster especially for those that don't have
super fast video cards.
Open Regedit
HKEY_CURRENT_USER
Control panel
Desktop
WindowMetrics
Right Mouse Click an empty space in the right pane.
Select new/string value.
Name the new value MinAnimate.
Doubleclick on the new string value (MinAnimate) and click on "Modify"
Enter a value of 0 for Off or 1 for On then hit
Close Regedit and all programs then reboot.
Renaming the Recycle Bin
Start the Registry Editor
Type Ctrl-F to bring up the Find Menu
In the Find What box type Recycle
Double click on the Recycle Bin in the right pane
Type in the new name under Value Data
Restart Win95
Turning off Desktop Icons

If you want to turn off all the icons on your desktop:
Start the System Policy Editor
Select File / Open Registry
Select Local User
Select Shell / Restrictions
Select Hide all items on Desktop

All Icons will now be hidden.

Note: One side effect is the your CD will no longer automatically play when it is inserted.
Adding in Old Windows Groups

If you are setup to dual boot between your old Win 3.x and want to add in the old groups, just click on the *.GRP file in your old windows directory. The programs will be added to your list under Programs in the task bar.

Note: Any DLL's the programs require will need to be copied.
To speed up the Start Menu
Start the REGEDIT program
Search for the word desktop
This should be in HKEY_CLASSES_ROOT / CLSID / {00021400...
Right Click on the right panel
Pick NEW / String Value.
Name it MenuShowDelay, all one word.
Select a value from 1-10, 1 being the fastest.
Exit REGEDIT
Restart Windows

To change the My Computer or Recycle Bin icon
Open Regedit
Find My Computer or Recycle Bin
Tab to the left panel
Double click on the highlighted line
Double click on DefaultIcon in the left panel
Double click on DefaultIcon right panel
Type in the value for the new icon
Note: DLL files can be used. Specify the location of the new icon with the filename,#

Remove the tildes in short filenames
Open Regedit
Go to Hkey_Local_Machine\System\CurrentControlSet\Control\FileSystem
Right Click on the Right pane
Select New / Hex
Add the value NameNumericTail= 0

To remove the Network Neighborhood Icon
Start POLEDIT. It is on the CD in \Admin\Apptools\Poledit
Open Registry
Select LocalUser
Select Shell
Select Restrictions
Select Hide Network Neighborhood

To change the Startup and Logoff screens
Startup Screen
Create a 320x400 bitmap in the root directory and name it LOGO.SYS
You can use LOGOW.SYS file in the Windows directory as a starter
Logoff Screens
There are several files called LOGOX.SYS
They are actually bitmaps 320x400 that just have a different extension
The hidden one in the root directory LOGO.SYS is the startup logo.
There are two files in the Windows directory.
LOGOW.SYS is the Wait while Shutting down ... screen
LOGOS.SYS is the You may now shut-off or Reboot screen
To edit them, rename them with a BMP extension and use your favorite graphic editor
You can edit these files or create you own
They just need to be the same size



EXAMAPERS123.BLOGSPOT.COM

Monday, November 01, 2010

History of computing hardware





SUCCESS FOR CAREER




'History of computing hardware:

History of computing hardware

The history of computing hardware is the record of the constant drive to make computer hardware faster, cheaper, and store more data.
Before the development of the general-purpose computer, most calculations were done by humans. Tools to help humans calculate are generally called calculators. Calculators continue to develop, but computers add the critical element of conditional response, allowing automation of both numerical calculation and in general, automation of many symbol-manipulation tasks. Computer technology has undergone profound changes every decade since the 1940s.
Computing hardware has become a platform for uses other than computation, such as automation, communication, control, entertainment, and education. Each field in turn has imposed its own requirements on the hardware, which has evolved in response to those requirements.
Aside from written numerals, the first aids to computation were purely mechanical devices that required the operator to set up the initial values of an elementary arithmetic operation, then propel the device through manual manipulations to obtain the result. An example would be a slide rule where numbers are represented by points on a logarithmic scale and computation is performed by setting a cursor and aligning sliding scales. Numbers could be represented in a continuous "analog" form, where a length or other physical property was proportional to the number. Or, numbers could be represented in the form of digits, automatically manipulated by a mechanism. Although this approach required more complex mechanisms, it made for greater precision of results.
Both analog and digital mechanical techniques continued to be developed, producing many practical computing machines. Electrical methods rapidly improved the speed and precision of calculating machines, at first by providing motive power for mechanical calculating devices, and later directly as the medium for representation of numbers. Numbers could be represented by voltages or currents and manipulated by linear electronic amplifiers. Or, numbers could be represented as discrete binary or decimal digits, and electrically-controlled switches and combinatorial circuits could perform mathematical operations.
The invention of electronic amplifiers made calculating machines much faster than mechanical or electromechanical predecessors. Vacuum tube amplifiers gave way to discrete transistors, and then rapidly to monolithic integrated circuits. By defeating the tyranny of numbers, integrated circuits made high-speed and low-cost digital computers a widespread commodity.
This article covers major developments in the history of computing hardware, and attempts to put them in context. For a detailed timeline of events, see the computing timeline article. The history of computing article treats methods intended for pen and paper, with or without the aid of tables. Since all computers rely on digital storage, and tend to be limited by the size and speed of memory, the history of computer data storage is tied to the development of computers.
History of computing

Hardware before 1960
Hardware 1960s to present

Hardware in Soviet Bloc countries


Artificial intelligence

Computer science

Operating systems

Programming languages

Software engineering


Graphical user interface

Internet

Personal computers

Laptops

Video games

World Wide Web


Timeline of computing
• 2400 BC–1949
• 1950–1979
• 1980–1989
• 1990–1999
• 2000–2009
• More timelines...


More...

Contents
[hide]
• 1 Before computer hardware
• 2 Earliest hardware
• 3 1801: punched card technology
• 4 Desktop calculators
• 5 Advanced analog computers
• 6 Digital computation
o 6.1 Zuse
o 6.2 Colossus
o 6.3 American developments
 6.3.1 ENIAC
• 7 First-generation machines
• 8 Commercial computers
• 9 Second generation: transistors
• 10 Post-1960: third generation and beyond
• 11 See also
• 12 Notes
• 13 References
• 14 Further reading
• 15 External links

[edit] Before computer hardware
The first use of the word "computer" was recorded in 1613, referring to a person who carried out calculations, or computations, and the word continued to be used in that sense until the middle of the 20th century. From the end of the 19th century onwards though, the word began to take on its more familiar meaning, describing a machine that carries out computations.[1]
[edit] Earliest hardware
Devices have been used to aid computation for thousands of years, using one-to-one correspondence with our fingers. The earliest counting device was probably a form of tally stick. Later record keeping aids throughout the Fertile Crescent included calculi (clay spheres, cones, etc.) which represented counts of items, probably livestock or grains, sealed in containers.[2][3] Counting rods is one example.
The abacus was used for arithmetic tasks. The Roman abacus was used in Babylonia as early as 2400 BC. Since then, many other forms of reckoning boards or tables have been invented. In a medieval counting house, a checkered cloth would be placed on a table, and markers moved around on it according to certain rules, as an aid to calculating sums of money.
A number of analog computers were constructed in ancient and medieval times to perform astronomical calculations. These include the Antikythera mechanism and the astrolabe from ancient Greece (c. 150–100 BC), which are generally regarded as the first mechanical analog computers.[4] Other early versions of mechanical devices used to perform some type of calculations include the planisphere and other mechanical computing devices invented by Abū Rayhān al-Bīrūnī (c. AD 1000); the equatorium and universal latitude-independent astrolabe by Abū Ishāq Ibrāhīm al-Zarqālī (c. AD 1015); the astronomical analog computers of other medieval Muslim astronomers and engineers; and the astronomical clock tower of Su Song (c. AD 1090) during the Song Dynasty.
The "castle clock", an astronomical clock invented by Al-Jazari in 1206, is considered to be the earliest programmable analog computer.[5] It displayed the zodiac, the solar and lunar orbits, a crescent moon-shaped pointer traveling across a gateway causing automatic doors to open every hour,[6][7] and five robotic musicians who play music when struck by levers operated by a camshaft attached to a water wheel. The length of day and night could be re-programmed every day in order to account for the changing lengths of day and night throughout the year.[5]
Suanpan (the number represented on this abacus is 6,302,715,408)
Scottish mathematician and physicist John Napier noted multiplication and division of numbers could be performed by addition and subtraction, respectively, of logarithms of those numbers. While producing the first logarithmic tables Napier needed to perform many multiplications, and it was at this point that he designed Napier's bones, an abacus-like device used for multiplication and division.[8] Since real numbers can be represented as distances or intervals on a line, the slide rule was invented in the 1620s to allow multiplication and division operations to be carried out significantly faster than was previously possible.[9] Slide rules were used by generations of engineers and other mathematically inclined professional workers, until the invention of the pocket calculator. [10]

Yazu Arithmometer. Patented in Japan in 1903. Note the lever for turning the gears of the calculator.
German polymath Wilhelm Schickard built the first digital mechanical calculator in 1623, and thus became the father of the computing era.[11] Since his calculator used techniques such as cogs and gears first developed for clocks, it was also called a 'calculating clock'. It was put to practical use by his friend Johannes Kepler, who revolutionized astronomy when he condensed decades of astronomical observations into algebraic expressions. An original calculator by Blaise Pascal (1640) is preserved in the Zwinger Museum. Machines by Pascal (the Pascaline, 1642) and Gottfried Wilhelm von Leibniz (the Stepped Reckoner, c. 1672) followed. Leibniz once said "It is unworthy of excellent men to lose hours like slaves in the labour of calculation which could safely be relegated to anyone else if machines were used."[12]
Around 1820, Charles Xavier Thomas created the first successful, mass-produced mechanical calculator, the Thomas Arithmometer, that could add, subtract, multiply, and divide.[13] It was mainly based on Leibniz' work. Mechanical calculators, like the base-ten addiator, the comptometer, the Monroe, the Curta and the Addo-X remained in use until the 1970s. Leibniz also described the binary numeral system,[14] a central ingredient of all modern computers. However, up to the 1940s, many subsequent designs (including Charles Babbage's machines of the 1800s and even ENIAC of 1945) were based on the decimal system;[15] ENIAC's ring counters emulated the operation of the digit wheels of a mechanical adding machine.
In Japan, Ryoichi Yazu patented a mechanical calculator called the Yazu Arithmometer in 1903. It consisted of a single cylinder and 22 gears, and employed the mixed base-2 and base-5 number system familiar to users to the soroban (Japanese abacus). Carry and end of calculation were determined automatically.[16] More than 200 units were sold, mainly to government agencies such as the Ministry of War and agricultural experiment stations. [17][18]
[edit] 1801: punched card technology
Main article: Analytical engine. See also: Logic piano

Punched card system of a music machine, also referred to as Book music
In 1801, Joseph-Marie Jacquard developed a loom in which the pattern being woven was controlled by punched cards. The series of cards could be changed without changing the mechanical design of the loom. This was a landmark point in programmability.
In 1833, Charles Babbage moved on from developing his difference engine to developing a more complete design, the analytical engine, which would draw directly on Jacquard's punched cards for its programming.[19] In 1835, Babbage described his analytical engine. It was the plan of a general-purpose programmable computer, employing punch cards for input and a steam engine for power, using the positions of gears and shafts to represent numbers. His initial idea was to use punch-cards to control a machine that could calculate and print logarithmic tables with huge precision (a specific purpose machine). Babbage's idea soon developed into a general-purpose programmable computer, his analytical engine. While his design was sound and the plans were probably correct, or at least debuggable, the project was slowed by various problems. Babbage was a difficult man to work with and argued with anyone who didn't respect his ideas. All the parts for his machine had to be made by hand. Small errors in each item can sometimes sum up to large discrepancies in a machine with thousands of parts, which required these parts to be much better than the usual tolerances needed at the time. The project dissolved in disputes with the artisan who built parts and was ended with the depletion of government funding. Ada Lovelace, Lord Byron's daughter, translated and added notes to the "Sketch of the Analytical Engine" by Federico Luigi, Conte Menabrea.[20]

IBM 407 tabulating machine, (1961)
A reconstruction of the Difference Engine II, an earlier, more limited design, has been operational since 1991 at the London Science Museum. With a few trivial changes, it works as Babbage designed it and shows that Babbage was right in theory. The museum used computer-operated machine tools to construct the necessary parts, following tolerances which a machinist of the period would have been able to achieve. The failure of Babbage to complete the engine can be chiefly attributed to difficulties not only related to politics and financing, but also to his desire to develop an increasingly sophisticated computer.
Following in the footsteps of Babbage, although unaware of his earlier work, was Percy Ludgate, an accountant from Dublin, Ireland. He independently designed a programmable mechanical computer, which he described in a work that was published in 1909.
In the late 1880s, the American Herman Hollerith invented the recording of data on a medium that could then be read by a machine. Prior uses of machine readable media had been for control (automatons such as piano rolls or looms), not data. "After some initial trials with paper tape, he settled on punched cards…"[21] Hollerith came to use punched cards after observing how railroad conductors encoded personal characteristics of each passenger with punches on their tickets. To process these punched cards he invented the tabulator, and the key punch machines. These three inventions were the foundation of the modern information processing industry. His machines used mechanical relays (and solenoids) to increment mechanical counters. Hollerith's method was used in the 1890 United States Census and the completed results were "... finished months ahead of schedule and far under budget".[22] Hollerith's company eventually became the core of IBM. IBM developed punch card technology into a powerful tool for business data-processing and produced an extensive line of unit record equipment. By 1950, the IBM card had become ubiquitous in industry and government. The warning printed on most cards intended for circulation as documents (checks, for example), "Do not fold, spindle or mutilate," became a motto for the post-World War II era.[23]
Punched card with the extended alphabet
Leslie Comrie's articles on punched card methods and W.J. Eckert's publication of Punched Card Methods in Scientific Computation in 1940, described techniques which were sufficiently advanced to solve differential equations[24] or perform multiplication and division using floating point representations, all on punched cards and unit record machines. In the image of the tabulator (see left), note the patch panel, which is visible on the right side of the tabulator. A row of toggle switches is above the patch panel. The Thomas J. Watson Astronomical Computing Bureau, Columbia University performed astronomical calculations representing the state of the art in computing.[25]
Computer programming in the punch card era revolved around the computer center. The computer users, for example, science and engineering students at universities, would submit their programming assignments to their local computer center in the form of a stack of cards, one card per program line. They then had to wait for the program to be queued for processing, compiled, and executed. In due course a printout of any results, marked with the submitter's identification, would be placed in an output tray outside the computer center. In many cases these results would comprise solely a printout of error messages, necessitating another edit-compile-run cycle.[26] Punched cards are still used and manufactured to this day, and their distinctive dimensions (and 80-column capacity) can still be recognized in forms, records, and programs around the world.
[edit] Desktop calculators
Main article: Calculator

The Curta calculator can also do multiplication and division
By the 1900s, earlier mechanical calculators, cash registers, accounting machines, and so on were redesigned to use electric motors, with gear position as the representation for the state of a variable. The word "computer" was a job title assigned to people who used these calculators to perform mathematical calculations. By the 1920s Lewis Fry Richardson's interest in weather prediction led him to propose human computers and numerical analysis to model the weather; to this day, the most powerful computers on Earth are needed to adequately model its weather using the Navier-Stokes equations.[27]
Companies like Friden, Marchant Calculator and Monroe made desktop mechanical calculators from the 1930s that could add, subtract, multiply and divide. During the Manhattan project, future Nobel laureate Richard Feynman was the supervisor of the roomful of human computers, many of them female mathematicians, who understood the use of differential equations which were being solved for the war effort.
In 1948, the Curta was introduced. This was a small, portable, mechanical calculator that was about the size of a pepper grinder. Over time, during the 1950s and 1960s a variety of different brands of mechanical calculators appeared on the market. The first all-electronic desktop calculator was the British ANITA Mk.VII, which used a Nixie tube display and 177 subminiature thyratron tubes. In June 1963, Friden introduced the four-function EC-130. It had an all-transistor design, 13-digit capacity on a 5-inch (130 mm) CRT, and introduced Reverse Polish notation (RPN) to the calculator market at a price of $2200. The EC-132 model added square root and reciprocal functions. In 1965, Wang Laboratories produced the LOCI-2, a 10-digit transistorized desktop calculator that used a Nixie tube display and could compute logarithms.
[edit] Advanced analog computers
Main article: analog computer

Cambridge differential analyzer, 1938
Before World War II, mechanical and electrical analog computers were considered the "state of the art", and many thought they were the future of computing. Analog computers take advantage of the strong similarities between the mathematics of small-scale properties—the position and motion of wheels or the voltage and current of electronic components—and the mathematics of other physical phenomena, for example, ballistic trajectories, inertia, resonance, energy transfer, momentum, and so forth. They model physical phenomena with electrical voltages and currents[28] as the analog quantities.
Centrally, these analog systems work by creating electrical analogs of other systems, allowing users to predict behavior of the systems of interest by observing the electrical analogs.[29] The most useful of the analogies was the way the small-scale behavior could be represented with integral and differential equations, and could be thus used to solve those equations. An ingenious example of such a machine, using water as the analog quantity, was the water integrator built in 1928; an electrical example is the Mallock machine built in 1941. A planimeter is a device which does integrals, using distance as the analog quantity. Unlike modern digital computers, analog computers are not very flexible, and need to be rewired manually to switch them from working on one problem to another. Analog computers had an advantage over early digital computers in that they could be used to solve complex problems using behavioral analogues while the earliest attempts at digital computers were quite limited.
Some of the most widely deployed analog computers included devices for aiming weapons, such as the Norden bombsight[30] and the fire-control systems,[31] such as Arthur Pollen's Argo system for naval vessels. Some stayed in use for decades after WWII; the Mark I Fire Control Computer was deployed by the United States Navy on a variety of ships from destroyers to battleships. Other analog computers included the Heathkit EC-1, and the hydraulic MONIAC Computer which modeled econometric flows.[32]
The art of analog computing reached its zenith with the differential analyzer,[33] invented in 1876 by James Thomson and built by H. W. Nieman and Vannevar Bush at MIT starting in 1927. Fewer than a dozen of these devices were ever built; the most powerful was constructed at the University of Pennsylvania's Moore School of Electrical Engineering, where the ENIAC was built. Digital electronic computers like the ENIAC spelled the end for most analog computing machines, but hybrid analog computers, controlled by digital electronics, remained in substantial use into the 1950s and 1960s, and later in some specialized applications. But like all digital devices, the decimal precision of a digital device is a limitation, as compared to an analog device, in which the accuracy is a limitation.[34] As electronics progressed during the twentieth century, its problems of operation at low voltages while maintaining high signal-to-noise ratios[35] were steadily addressed, as shown below, for a digital circuit is a specialized form of analog circuit, intended to operate at standardized settings (continuing in the same vein, logic gates can be realized as forms of digital circuits). But as digital computers have become faster and use larger memory (for example, RAM or internal storage), they have almost entirely displaced analog computers. Computer programming, or coding, has arisen as another human profession.
[edit] Digital computation

Punched tape programs would be much longer than the short fragment of yellow paper tape shown.
The era of modern computing began with a flurry of development before and during World War II, as electronic circuit elements replaced mechanical equivalents, and digital calculations replaced analog calculations. Machines such as the Z3, the Atanasoff–Berry Computer, the Colossus computers, and the ENIAC were built by hand using circuits containing relays or valves (vacuum tubes), and often used punched cards or punched paper tape for input and as the main (non-volatile) storage medium. Defining a single point in the series as the "first computer" misses many subtleties (see the table "Defining characteristics of some early digital computers of the 1940s" below).
Alan Turing's 1936 paper[36] proved enormously influential in computing and computer science in two ways. Its main purpose was to prove that there were problems (namely the halting problem) that could not be solved by any sequential process. In doing so, Turing provided a definition of a universal computer which executes a program stored on tape. This construct came to be called a Turing machine. [37] Except for the limitations imposed by their finite memory stores, modern computers are said to be Turing-complete, which is to say, they have algorithm execution capability equivalent to a universal Turing machine.

Nine-track magnetic tape
For a computing machine to be a practical general-purpose computer, there must be some convenient read-write mechanism, punched tape, for example. With a knowledge of Alan Turing's theoretical 'universal computing machine' John von Neumann defined an architecture which uses the same memory both to store programs and data: virtually all contemporary computers use this architecture (or some variant). While it is theoretically possible to implement a full computer entirely mechanically (as Babbage's design showed), electronics made possible the speed and later the miniaturization that characterize modern computers.
There were three parallel streams of computer development in the World War II era; the first stream largely ignored, and the second stream deliberately kept secret. The first was the German work of Konrad Zuse. The second was the secret development of the Colossus computers in the UK. Neither of these had much influence on the various computing projects in the United States. The third stream of computer development, Eckert and Mauchly's ENIAC and EDVAC, was widely publicized.[38][39]
George Stibitz is internationally recognized as one of the fathers of the modern digital computer. While working at Bell Labs in November 1937, Stibitz invented and built a relay-based calculator that he dubbed the "Model K" (for "kitchen table", on which he had assembled it), which was the first to calculate using binary form. [40]
[edit] Zuse
Main article: Konrad Zuse

A reproduction of Zuse's Z1 computer
Working in isolation in Germany, Konrad Zuse started construction in 1936 of his first Z-series calculators featuring memory and (initially limited) programmability. Zuse's purely mechanical, but already binary Z1, finished in 1938, never worked reliably due to problems with the precision of parts.
Zuse's later machine, the Z3,[41] was finished in 1941. It was based on telephone relays and did work satisfactorily. The Z3 thus became the first functional program-controlled, all-purpose, digital computer. In many ways it was quite similar to modern machines, pioneering numerous advances, such as floating point numbers. Replacement of the hard-to-implement decimal system (used in Charles Babbage's earlier design) by the simpler binary system meant that Zuse's machines were easier to build and potentially more reliable, given the technologies available at that time.
Programs were fed into Z3 on punched films. Conditional jumps were missing, but since the 1990s it has been proved theoretically that Z3 was still a universal computer (ignoring its physical storage size limitations). In two 1936 patent applications, Konrad Zuse also anticipated that machine instructions could be stored in the same storage used for data—the key insight of what became known as the von Neumann architecture, first implemented in the British SSEM of 1948.[42] Zuse also claimed to have designed the first higher-level programming language, (Plankalkül), in 1945 (published in 1948) although it was implemented for the first time in 2000 by a team around Raúl Rojas at the Free University of Berlin—five years after Zuse died.
Zuse suffered setbacks during World War II when some of his machines were destroyed in the course of Allied bombing campaigns. Apparently his work remained largely unknown to engineers in the UK and US until much later, although at least IBM was aware of it as it financed his post-war startup company in 1946 in return for an option on Zuse's patents.
[edit] Colossus
Main article: Colossus computer



EXAMAPERS123.BLOGSPOT.COM


Colossus was used to break German ciphers during World War II.
During World War II, the British at Bletchley Park (40 miles north of London) achieved a number of successes at breaking encrypted German military communications. The German encryption machine, Enigma, was attacked with the help of electro-mechanical machines called bombes. The bombe, designed by Alan Turing and Gordon Welchman, after the Polish cryptographic bomba by Marian Rejewski (1938), came into use in 1941.[43] They ruled out possible Enigma settings by performing chains of logical deductions implemented electrically. Most possibilities led to a contradiction, and the few remaining could be tested by hand.
The Germans also developed a series of teleprinter encryption systems, quite different from Enigma. The Lorenz SZ 40/42 machine was used for high-level Army communications, termed "Tunny" by the British. The first intercepts of Lorenz messages began in 1941. As part of an attack on Tunny, Professor Max Newman and his colleagues helped specify the Colossus.[44] The Mk I Colossus was built between March and December 1943 by Tommy Flowers and his colleagues at the Post Office Research Station at Dollis Hill in London and then shipped to Bletchley Park in January 1944.
Colossus was the first totally electronic computing device. The Colossus used a large number of valves (vacuum tubes). It had paper-tape input and was capable of being configured to perform a variety of boolean logical operations on its data, but it was not Turing-complete. Nine Mk II Colossi were built (The Mk I was converted to a Mk II making ten machines in total). Details of their existence, design, and use were kept secret well into the 1970s. Winston Churchill personally issued an order for their destruction into pieces no larger than a man's hand. Due to this secrecy the Colossi were not included in many histories of computing. A reconstructed copy of one of the Colossus machines is now on display at Bletchley Park.
[edit] American developments
In 1937, Claude Shannon showed there is a one-to-one correspondence between the concepts of Boolean logic and certain electrical circuits, now called logic gates, which are now ubiquitous in digital computers.[45] In his master's thesis[46] at MIT, for the first time in history, Shannon showed that electronic relays and switches can realize the expressions of Boolean algebra. Entitled A Symbolic Analysis of Relay and Switching Circuits, Shannon's thesis essentially founded practical digital circuit design. George Stibitz completed a relay-based computer he dubbed the "Model K" at Bell Labs in November 1937. Bell Labs authorized a full research program in late 1938 with Stibitz at the helm. Their Complex Number Calculator,[47] completed January 8, 1940, was able to calculate complex numbers. In a demonstration to the American Mathematical Society conference at Dartmouth College on September 11, 1940, Stibitz was able to send the Complex Number Calculator remote commands over telephone lines by a teletype. It was the first computing machine ever used remotely, in this case over a phone line. Some participants in the conference who witnessed the demonstration were John von Neumann, John Mauchly, and Norbert Wiener, who wrote about it in their memoirs.

Atanasoff–Berry Computer replica at 1st floor of Durham Center, Iowa State University
In 1939, John Vincent Atanasoff and Clifford E. Berry of Iowa State University developed the Atanasoff–Berry Computer (ABC),[48] The Atanasoff-Berry Computer was the world's first electronic digital computer[49]. The design used over 300 vacuum tubes and employed capacitors fixed in a mechanically rotating drum for memory. Though the ABC machine was not programmable, it was the first to use electronic tubes in an adder. ENIAC co-inventor John Mauchly examined the ABC in June 1941, and its influence on the design of the later ENIAC machine is a matter of contention among computer historians. The ABC was largely forgotten until it became the focus of the lawsuit Honeywell v. Sperry Rand, the ruling of which invalidated the ENIAC patent (and several others) as, among many reasons, having been anticipated by Atanasoff's work.
In 1939, development began at IBM's Endicott laboratories on the Harvard Mark I. Known officially as the Automatic Sequence Controlled Calculator,[50] the Mark I was a general purpose electro-mechanical computer built with IBM financing and with assistance from IBM personnel, under the direction of Harvard mathematician Howard Aiken. Its design was influenced by Babbage's Analytical Engine, using decimal arithmetic and storage wheels and rotary switches in addition to electromagnetic relays. It was programmable via punched paper tape, and contained several calculation units working in parallel. Later versions contained several paper tape readers and the machine could switch between readers based on a condition. Nevertheless, the machine was not quite Turing-complete. The Mark I was moved to Harvard University and began operation in May 1944.
[edit] ENIAC
Main article: ENIAC



EXAMAPERS123.BLOGSPOT.COM


ENIAC performed ballistics trajectory calculations with 160 kW of power
The US-built ENIAC (Electronic Numerical Integrator and Computer) was the first electronic general-purpose computer. It combined, for the first time, the high speed of electronics with the ability to be programmed for many complex problems. It could add or subtract 5000 times a second, a thousand times faster than any other machine. (Colossus couldn't add). It also had modules to multiply, divide, and square root. High speed memory was limited to 20 words (about 80 bytes). Built under the direction of John Mauchly and J. Presper Eckert at the University of Pennsylvania, ENIAC's development and construction lasted from 1943 to full operation at the end of 1945. The machine was huge, weighing 30 tons, and contained over 18,000 valves. One of the major engineering feats was to minimize valve burnout, which was a common problem at that time. The machine was in almost constant use for the next ten years.
ENIAC was unambiguously a Turing-complete device. It could compute any problem (that would fit in memory). A "program" on the ENIAC, however, was defined by the states of its patch cables and switches, a far cry from the stored program electronic machines that evolved from it. Once a program was written, it had to be mechanically set into the machine. Six women did most of the programming of ENIAC. (Improvements completed in 1948 made it possible to execute stored programs set in function table memory, which made programming less a "one-off" effort, and more systematic).
Defining characteristics of some early digital computers of the 1940s (In the history of computing hardware)
Name First operational Numeral system Computing mechanism Programming
Turing complete

Zuse Z3 (Germany) May 1941 Binary
Electro-mechanical
Program-controlled by punched film stock (but no conditional branch) Yes (1998)

Atanasoff–Berry Computer (US) 1942 Binary Electronic
Not programmable—single purpose No
Colossus Mark 1 (UK) February 1944 Binary Electronic Program-controlled by patch cables and switches No
Harvard Mark I – IBM ASCC (US) May 1944 Decimal
Electro-mechanical Program-controlled by 24-channel punched paper tape (but no conditional branch) No
Colossus Mark 2 (UK) June 1944 Binary Electronic Program-controlled by patch cables and switches No
ENIAC (US)
July 1946 Decimal Electronic Program-controlled by patch cables and switches Yes
Manchester Small-Scale Experimental Machine (UK)
June 1948 Binary Electronic Stored-program in Williams cathode ray tube memory
Yes
Modified ENIAC (US)
September 1948 Decimal Electronic Program-controlled by patch cables and switches plus a primitive read-only stored programming mechanism using the Function Tables as program ROM
Yes
EDSAC (UK)
May 1949 Binary Electronic Stored-program in mercury delay line memory
Yes
Manchester Mark 1 (UK)
October 1949 Binary Electronic Stored-program in Williams cathode ray tube memory and magnetic drum memory Yes
CSIRAC (Australia) November 1949 Binary Electronic Stored-program in mercury delay line memory Yes
[edit] First-generation machines
Further information: List of vacuum tube computers
Design of the von Neumann architecture (1947)
Even before the ENIAC was finished, Eckert and Mauchly recognized its limitations and started the design of a stored-program computer, EDVAC. John von Neumann was credited with a widely circulated report describing the EDVAC design in which both the programs and working data were stored in a single, unified store. This basic design, denoted the von Neumann architecture, would serve as the foundation for the worldwide development of ENIAC's successors.[51] In this generation of equipment, temporary or working storage was provided by acoustic delay lines, which used the propagation time of sound through a medium such as liquid mercury (or through a wire) to briefly store data. A series of acoustic pulses is sent along a tube; after a time, as the pulse reached the end of the tube, the circuitry detected whether the pulse represented a 1 or 0 and caused the oscillator to re-send the pulse. Others used Williams tubes, which use the ability of a television picture tube to store and retrieve data. By 1954, magnetic core memory[52] was rapidly displacing most other forms of temporary storage, and dominated the field through the mid-1970s.

Magnetic core memory. Each core is one bit.
EDVAC was the first stored-program computer designed; however it was not the first to run. Eckert and Mauchly left the project and its construction floundered. The first working von Neumann machine was the Manchester "Baby" or Small-Scale Experimental Machine, developed by Frederic C. Williams and Tom Kilburn at the University of Manchester in 1948;[53] it was followed in 1949 by the Manchester Mark 1 computer, a complete system, using Williams tube and magnetic drum memory, and introducing index registers.[54] The other contender for the title "first digital stored-program computer" had been EDSAC, designed and constructed at the University of Cambridge. Operational less than one year after the Manchester "Baby", it was also capable of tackling real problems. EDSAC was actually inspired by plans for EDVAC (Electronic Discrete Variable Automatic Computer), the successor to ENIAC; these plans were already in place by the time ENIAC was successfully operational. Unlike ENIAC, which used parallel processing, EDVAC used a single processing unit. This design was simpler and was the first to be implemented in each succeeding wave of miniaturization, and increased reliability. Some view Manchester Mark 1 / EDSAC / EDVAC as the "Eves" from which nearly all current computers derive their architecture. Manchester University's machine became the prototype for the Ferranti Mark 1. The first Ferranti Mark 1 machine was delivered to the University in February, 1951 and at least nine others were sold between 1951 and 1957.
The first universal programmable computer in the Soviet Union was created by a team of scientists under direction of Sergei Alekseyevich Lebedev from Kiev Institute of Electrotechnology, Soviet Union (now Ukraine). The computer MESM (МЭСМ, Small Electronic Calculating Machine) became operational in 1950. It had about 6,000 vacuum tubes and consumed 25 kW of power. It could perform approximately 3,000 operations per second. Another early machine was CSIRAC, an Australian design that ran its first test program in 1949. CSIRAC is the oldest computer still in existence and the first to have been used to play digital music.[55]
[edit] Commercial computers
The first commercial computer was the Ferranti Mark 1, which was delivered to the University of Manchester in February 1951. It was based on the Manchester Mark 1. The main improvements over the Manchester Mark 1 were in the size of the primary storage (using random access Williams tubes), secondary storage (using a magnetic drum), a faster multiplier, and additional instructions. The basic cycle time was 1.2 milliseconds, and a multiplication could be completed in about 2.16 milliseconds. The multiplier used almost a quarter of the machine's 4,050 vacuum tubes (valves).[56] A second machine was purchased by the University of Toronto, before the design was revised into the Mark 1 Star. At least seven of the these later machines were delivered between 1953 and 1957, one of them to Shell labs in Amsterdam.[57]
In October 1947, the directors of J. Lyons & Company, a British catering company famous for its teashops but with strong interests in new office management techniques, decided to take an active role in promoting the commercial development of computers. The LEO I computer became operational in April 1951 [58] and ran the world's first regular routine office computer job. On 17 November 1951, the J. Lyons company began weekly operation of a bakery valuations job on the LEO (Lyons Electronic Office). This was the first business application to go live on a stored program computer.[59]
In June 1951, the UNIVAC I (Universal Automatic Computer) was delivered to the U.S. Census Bureau. Remington Rand eventually sold 46 machines at more than $1 million each ($8.2 million as of 2010).[60] UNIVAC was the first "mass produced" computer. It used 5,200 vacuum tubes and consumed 125 kW of power. Its primary storage was serial-access mercury delay lines capable of storing 1,000 words of 11 decimal digits plus sign (72-bit words). A key feature of the UNIVAC system was a newly invented type of metal magnetic tape, and a high-speed tape unit, for non-volatile storage. Magnetic media are still used in many computers.[61] In 1952, IBM publicly announced the IBM 701 Electronic Data Processing Machine, the first in its successful 700/7000 series and its first IBM mainframe computer. The IBM 704, introduced in 1954, used magnetic core memory, which became the standard for large machines. The first implemented high-level general purpose programming language, Fortran, was also being developed at IBM for the 704 during 1955 and 1956 and released in early 1957. (Konrad Zuse's 1945 design of the high-level language Plankalkül was not implemented at that time.) A volunteer user group, which exists to this day, was founded in 1955 to share their software and experiences with the IBM 701.



EXAMAPERS123.BLOGSPOT.COM


IBM 650 front panel
IBM introduced a smaller, more affordable computer in 1954 that proved very popular.[62] The IBM 650 weighed over 900 kg, the attached power supply weighed around 1350 kg and both were held in separate cabinets of roughly 1.5 meters by 0.9 meters by 1.8 meters. It cost $500,000 ($3.96 million as of 2010) or could be leased for $3,500 a month ($30 thousand as of 2010).[60] Its drum memory was originally 2,000 ten-digit words, later expanded to 4,000 words. Memory limitations such as this were to dominate programming for decades afterward. Efficient execution using drum memory was provided by a combination of hardware architecture: the instruction format included the address of the next instruction; and software: the Symbolic Optimal Assembly Program, SOAP[63], assigned instructions to optimal address (to the extent possible by static analysis of the source program). Thus many instructions were, when needed, located in the next row of the drum to be read and additional wait time for drum rotation was not required.
In 1955, Maurice Wilkes invented microprogramming,[64] which allows the base instruction set to be defined or extended by built-in programs (now called firmware or microcode).[65] It was widely used in the CPUs and floating-point units of mainframe and other computers, such as the IBM 360 series.[66]
IBM introduced its first magnetic disk system, RAMAC (Random Access Method of Accounting and Control) in 1956. Using fifty 24-inch (610 mm) metal disks, with 100 tracks per side, it was able to store 5 megabytes of data at a cost of $10,000 per megabyte ($80 thousand as of 2010).[60][67]
[edit] Second generation: transistors
Main article: Transistor computer
Further information: List of transistorized computers



EXAMAPERS123.BLOGSPOT.COM


A bipolar junction transistor
The bipolar transistor was invented in 1947. From 1955 onwards transistors replaced vacuum tubes in computer designs,[68] giving rise to the "second generation" of computers. Initially the only devices available were germanium point-contact transistors, which although less reliable than the vacuum tubes they replaced had the advantage of consuming far less power.[69] The first transistorised computer was built at the University of Manchester and was operational by 1953;[70] a second version was completed there in April 1955. The later machine used 200 transistors and 1,300 solid-state diodes and had a power consumption of 150 watts. However, it still required valves to generate the clock waveforms at 125 kHz and to read and write on the magnetic drum memory, whereas the Harwell CADET operated without any valves by using a lower clock frequency, of 58 kHz when it became operational in February 1955.[71] Problems with the reliability of early batches of point contact and alloyed junction transistors meant that the machine's mean time between failures was about 90 minutes, but this improved once the more reliable bipolar junction transistors became available.[72]
Compared to vacuum tubes, transistors have many advantages: they are smaller, and require less power than vacuum tubes, so give off less heat. Silicon junction transistors were much more reliable than vacuum tubes and had longer, indefinite, service life. Transistorized computers could contain tens of thousands of binary logic circuits in a relatively compact space. Transistors greatly reduced computers' size, initial cost, and operating cost. Typically, second-generation computers were composed of large numbers of printed circuit boards such as the IBM Standard Modular System[73] each carrying one to four logic gates or flip-flops.
A second generation computer, the IBM 1401, captured about one third of the world market. IBM installed more than one hundred thousand 1401s between 1960 and 1964.

This RAMAC DASD is being restored at the Computer History Museum
Transistorized electronics improved not only the CPU (Central Processing Unit), but also the peripheral devices. The IBM 350 RAMAC was introduced in 1956 and was the world's first disk drive. The second generation disk data storage units were able to store tens of millions of letters and digits. Next to the fixed disk storage units, connected to the CPU via high-speed data transmission, were removable disk data storage units. A removable disk stack can be easily exchanged with another stack in a few seconds. Even if the removable disks' capacity is smaller than fixed disks,' their interchangeability guarantees a nearly unlimited quantity of data close at hand. Magnetic tape provided archival capability for this data, at a lower cost than disk.
Many second generation CPUs delegated peripheral device communications to a secondary processor. For example, while the communication processor controlled card reading and punching, the main CPU executed calculations and binary branch instructions. One databus would bear data between the main CPU and core memory at the CPU's fetch-execute cycle rate, and other databusses would typically serve the peripheral devices. On the PDP-1, the core memory's cycle time was 5 microseconds; consequently most arithmetic instructions took 10 microseconds (100,000 operations per second) because most operations took at least two memory cycles; one for the instruction, one for the operand data fetch.
During the second generation remote terminal units (often in the form of teletype machines like a Friden Flexowriter) saw greatly increased use. Telephone connections provided sufficient speed for early remote terminals and allowed hundreds of kilometers separation between remote-terminals and the computing center. Eventually these stand-alone computer networks would be generalized into an interconnected network of networks—the Internet.[74]
[edit] Post-1960: third generation and beyond
Main articles: history of computing hardware (1960s–present) and history of general purpose CPUs



EXAMAPERS123.BLOGSPOT.COM


Intel 8742 eight-bit microcontroller IC
The explosion in the use of computers began with "third-generation" computers, making use of Jack St. Clair Kilby's[75] and Robert Noyce's[76] independent invention of the integrated circuit (or microchip), which later led to the invention of the microprocessor,[77] by Ted Hoff, Federico Faggin, and Stanley Mazor at Intel.[78] The integrated circuit in the image on the right, for example, an Intel 8742, is an 8-bit microcontroller that includes a CPU running at 12 MHz, 128 bytes of RAM, 2048 bytes of EPROM, and I/O in the same chip.
During the 1960s there was considerable overlap between second and third generation technologies.[79] IBM implemented its IBM Solid Logic Technology modules in hybrid circuits for the IBM System/360 in 1964. As late as 1975, Sperry Univac continued the manufacture of second-generation machines such as the UNIVAC 494. The Burroughs large systems such as the B5000 were stack machines, which allowed for simpler programming. These pushdown automatons were also implemented in minicomputers and microprocessors later, which influenced programming language design. Minicomputers served as low-cost computer centers for industry, business and universities.[80] It became possible to simulate analog circuits with the simulation program with integrated circuit emphasis, or SPICE (1971) on minicomputers, one of the programs for electronic design automation (EDA). The microprocessor led to the development of the microcomputer, small, low-cost computers that could be owned by individuals and small businesses. Microcomputers, the first of which appeared in the 1970s, became ubiquitous in the 1980s and beyond. Steve Wozniak, co-founder of Apple Computer, is sometimes erroneously credited with developing the first mass-market home computers. However, his first computer, the Apple I, came out some time after the MOS Technology KIM-1 and Altair 8800, and the first Apple computer with graphic and sound capabilities came out well after the Commodore PET. Computing has evolved with microcomputer architectures, with features added from their larger brethren, now dominant in most market segments.
Systems as complicated as computers require very high reliability. ENIAC remained on, in continuous operation from 1947 to 1955, for eight years before being shut down. Although a vacuum tube might fail, it would be replaced without bringing down the system. By the simple strategy of never shutting down ENIAC, the failures were dramatically reduced. Hot-pluggable hard disks, like the hot-pluggable vacuum tubes of yesteryear, continue the tradition of repair during continuous operation. Semiconductor memories routinely have no errors when they operate, although operating systems like Unix have employed memory tests on start-up to detect failing hardware. Today, the requirement of reliable performance is made even more stringent when server farms are the delivery platform.[81] Google has managed this by using fault-tolerant software to recover from hardware failures, and is even working on the concept of replacing entire server farms on-the-fly, during a service event.[82]
In the twenty-first century, multi-core CPUs became commercially available.[83] Content-addressable memory (CAM)[84] has become inexpensive enough to be used in networking, although no computer system has yet implemented hardware CAMs for use in programming languages. Currently, CAMs (or associative arrays) in software are programming-language-specific. Semiconductor memory cell arrays are very regular structures, and manufacturers prove their processes on them; this allows price reductions on memory products. When the CMOS field effect transistor-based logic gates supplanted bipolar transistors, computer power consumption could decrease dramatically (A CMOS field-effect transistor only draws significant current during the 'transition' between logic states, unlike the substantially higher (and continuous) bias current draw of a BJT). This has allowed computing to become a commodity which is now ubiquitous, embedded in many forms, from greeting cards and telephones to satellites. Computing hardware and its software have even become a metaphor for the operation of the universe.[85] Although DNA-based computing and quantum qubit computing are years or decades in the future, the infrastructure is being laid today, for example, with DNA origami on photolithography.[86]
An indication of the rapidity of development of this field can be inferred by the history of the seminal article.[87] By the time that anyone had time to write anything down, it was obsolete. After 1945, others read John von Neumann's First Draft of a Report on the EDVAC, and immediately started implementing their own systems. To this day, the pace of development has continued, worldwide.[88][89]
[edit] See also
Wikiversity has learning materials about Introduction to Computers/History

• History of computing
• Timeline of computing
• IT History Society
• Information Age
• The Secret Guide to Computers (book)
• List of vacuum tube computers
• List of transistorized computers
[edit] Notes
1. ^ computer, n., Oxford English Dictionary (2 ed.), Oxford University Press, 1989, http://dictionary.oed.com/, retrieved 2009-04-10
2. ^ According to Schmandt-Besserat 1981, these clay containers contained tokens, the total of which were the count of objects being transferred. The containers thus served as a bill of lading or an accounts book. In order to avoid breaking open the containers, marks were placed on the outside of the containers, for the count. Eventually (Schmandt-Besserat estimates it took 4000 years) the marks on the outside of the containers were all that were needed to convey the count, and the clay containers evolved into clay tablets with marks for the count.
3. ^ Eleanor Robson (2008), Mathematics in Ancient Iraq ISBN 978-0-691-09182-2 p.5: these calculi were in use in Iraq for primitive accounting systems as early as 3200-3000 BCE, with commodity-specific number systems. Balanced accounting was in use by 3000-2350 BCE, and a sexagesimal number system was in use 2350-2000 BCE.
4. ^ Lazos 1994
5. ^ a b Ancient Discoveries, Episode 11: Ancient Robots, History Channel, http://www.youtube.com/watch?v=rxjbaQl0ad8, retrieved 2008-09-06
6. ^ Howard R. Turner (1997), Science in Medieval Islam: An Illustrated Introduction, p. 184, University of Texas Press, ISBN 0292781490
7. ^ Donald Routledge Hill, "Mechanical Engineering in the Medieval Near East", Scientific American, May 1991, pp. 64–9 (cf. Donald Routledge Hill, Mechanical Engineering)
8. ^ A Spanish implementation of Napier's bones (1617), is documented in Montaner & Simon 1887, pp. 19–20.
9. ^ Kells, Kern & Bland 1943, p. 92
10. ^ Kells, Kern & Bland 1943, p. 82.
11. ^ Schmidhuber
12. ^ As quoted in Smith 1929, pp. 180–181
13. ^ Discovering the Arithmometer, Cornell University
14. ^ Leibniz 1703
15. ^ Binary-coded decimal (BCD) is a numeric representation, or character encoding, which is still extant.
16. ^ Yamada, Akihiko ([dead link]), Biquinary mechanical calculating machine,“Jido-Soroban” (automatic abacus), built by Ryoichi Yazu, National Science Museum of Japan, p. 8, http://sts.kahaku.go.jp/temp/5.pdf
17. ^ The History of Japanese Mechanical Calculating Machines
18. ^ Mechanical Calculator, "JIDOSOROBAN", The Japan Society of Mechanical Engineers (in Japanese)
19. ^ Jones
20. ^ Menabrea & Lovelace 1843
21. ^ Columbia University Computing History — Herman Hollerith
22. ^ U.S. Census Bureau: Tabulation and Processing
23. ^ Lubar 1991
24. ^ Eckert 1935
25. ^ Eckert 1940, pp. 101=114. Chapter XII is "The Computation of Planetary Pertubations".
26. ^ Fisk 2005
27. ^ Hunt 1998, pp. xiii-xxxvi
28. ^ Chua 1971, pp. 507–519
29. ^ See, for example, Horowitz & Hill 1989, pp. 1–44
30. ^ Norden
31. ^ Singer 1946
32. ^ Phillips
33. ^ (French) Coriolis 1836, pp. 5–9
34. ^ The noise level, compared to the signal level, is a fundamental factor, see for example Davenport & Root 1958, pp. 112–364.
35. ^ Ziemer, Tranter & Fannin 1993, p. 370.
36. ^ Turing 1937, pp. 230–265. Online versions: Proceedings of the London Mathematical Society Another version online.
37. ^ Kurt Gödel (1964), p. 71, "Postscriptum" in Martin Davis (ed., 2004),The Undecidable Fundamental papers by papers by Gödel, Church, Turing, and Post on this topic and the relationship to computability. ISBN 0486432289, as summarized in Church-Turing thesis.
38. ^ Moye 1996
39. ^ Bergin 1996
40. ^ Inventor Profile: George R. Stibitz, National Inventors Hall of Fame Foundation, Inc., http://www.invent.org/hall_of_fame/140.html
41. ^ Zuse
42. ^ "Electronic Digital Computers", Nature 162: 487, 25 September 1948, http://www.computer50.org/kgill/mark1/natletter.html, retrieved 2009-04-10
43. ^ Welchman 1984, pp. 138–145, 295–309
44. ^ Copeland 2006.
45. ^ Claude Shannon, "A Symbolic Analysis of Relay and Switching Circuits", Transactions of the American Institute of Electrical Engineers, Vol. 57,(1938), pp. 713-723
46. ^ Shannon 1940
47. ^ George Stibitz, US patent 2668661, "Complex Computer", granted 1954-02-09 , assigned to AT&T, 102 pages.
48. ^ January 15, 1941 notice in the Des Moines Register.
49. ^ The First Electronic Computer By Arthur W. Burks
50. ^ Da Cruz 2008
51. ^ von Neumann 1945, p. 1. The title page, as submitted by Goldstine, reads: "First Draft of a Report on the EDVAC by John von Neumann, Contract No. W-670-ORD-4926, Between the United States Army Ordnance Department and the University of Pennsylvania Moore School of Electrical Engineering".
52. ^ An Wang filed October 1949, US patent 2708722, "Pulse transfer controlling devices", granted 1955-05-17 .
53. ^ Enticknap 1998, p. 1; Baby's 'first good run' was June 21, 1948.
54. ^ Manchester 1998, by R.B.E. Napper, et al.
55. ^ CSIRAC 2005
56. ^ Lavington 1998, p. 25
57. ^ Computer Conservation Society, Our Computer Heritage Pilot Study: Deliveries of Ferranti Mark I and Mark I Star computers., http://www.ourcomputerheritage.org/wp/, retrieved 9 January 2010
58. ^ Lavington, Simon. "A brief history of British computers: the first 25 years (1948 - 1973).". British Computer Society. http://www.bcs.org/server.php?. Retrieved 10 January 2010.
59. ^ Martin 2008, p. 24 notes that David Caminer (1915–2008) served as the first corporate electronic systems analyst, for this first business computer system, a Leo computer, part of J. Lyons & Company. LEO would calculate an employee's pay, handle billing, and other office automation tasks.
60. ^ a b c "Consumer Price Index (estimate) 1800–2008". Federal Reserve Bank of Minneapolis. http://www.minneapolisfed.org/community_education/teacher/calc/hist1800.cfm. Retrieved August 1, 2009.
61. ^ Magnetic tape will be the primary data storage mechanism when CERN's Large Hadron Collider comes online in 2008.
62. ^ For example, Kara Platoni's article on Donald Knuth stated that "there was something special about the IBM 650", Stanford Magazine, May/June 2006
63. ^ IBM (1957) (PDF), SOAP II for the IBM 650, C24-4000-0, http://www.bitsavers.org/pdf/ibm/650/24-4000-0_SOAPII.pdf
64. ^ Wilkes 1986, pp. 115–126
65. ^ Horowitz & Hill 1989, p. 743
66. ^ Patterson & Hennessy 1998, p. 424
67. ^ IBM 1956
68. ^ Feynman, Leighton & Sands 1965, pp. III 14-11 to 14-12
69. ^ Lavington 1998, pp. 34–35
70. ^ Lavington 1998, p. 37
71. ^ Cooke-Yarborough, E.H. (June 1998), "Some early transistor applications in the UK.", Engineering and Science Education Journal (London, UK: IEE) 7 (3): 100–106, doi:10.1049/esej:19980301, ISSN 0963-7346, http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=00689507, retrieved 2009-06-07
72. ^ Lavington 1998, pp. 36–37
73. ^ IBM_SMS 1960
74. ^ Mayo & Newcomb 2008, pp. 96–117; Jimbo Wales is quoted on p. 115.
75. ^ Kilby 2000
76. ^ Robert Noyce's Unitary circuit, US patent 2981877, "Semiconductor device-and-lead structure", granted 1961-04-25 , assigned to Fairchild Semiconductor Corporation.
77. ^ Intel_4004 1971
78. ^ The Intel 4004 (1971) die was 12mm2, composed of 2300 transistors; by comparison, the Pentium Pro was 306mm2, composed of 5.5 million transistors, according to Patterson & Hennessy 1998, pp. 27–39
79. ^ In the defense field, considerable work was done in the computerized implementation of equations such as Kalman 1960, pp. 35–45
80. ^ Eckhouse & Morris 1979, pp. 1–2
81. ^ "Since 2005, its [Google's] data centers have been composed of standard shipping containers--each with 1,160 servers and a power consumption that can reach 250 kilowatts." — Ben Jai of Google, as quoted in Shankland 2009
82. ^ "If you're running 10,000 machines, something is going to die every day." —Jeff Dean of Google, as quoted in Shankland 2008.
83. ^ Intel has unveiled a single-chip version of a 48-core CPU for software and circuit research in cloud computing: accessdate=2009-12-02. Intel has loaded Linux on each core; each core has an X86 architecture: accessdate=2009-12-3
84. ^ Kohonen 1980, pp. 1–368
85. ^ Smolin 2001, pp. 53–57. Pages 220–226 are annotated references and guide for further reading.
86. ^ Ryan J. Kershner, Luisa D. Bozano, Christine M. Micheel, Albert M. Hung, Ann R. Fornof, Jennifer N. Cha, Charles T. Rettner, Marco Bersani, Jane Frommer, Paul W. K. Rothemund & Gregory M. Wallraff (16 August 2009) "Placement and orientation of individual DNA shapes on lithographically patterned surfaces" Nature Nanotechnology publication information, supplementary information: DNA origami on photolithography doi:10.1038/nnano.2009.220
87. ^ Burks, Goldstine & von Neumann 1947, pp. 1–464 reprinted in Datamation, September-October 1962. Note that preliminary discussion/design was the term later called system analysis/design, and even later, called system architecture.
88. ^ IEEE_Annals 1979 Online access to the IEEE Annals of the History of Computing here. DBLP summarizes the Annals of the History of Computing year by year, back to 1996, so far.



EXAMAPERS123.BLOGSPOT.COM