Sunteți pe pagina 1din 22

CCP ECS [101] UNIT-1 1.

1 Hardware and software:

Hardware: The physical components of a computer are called hardware. A physical component be electronic, electrical, mechanical or optical etc. Ex: hard disks, microprocessors mouse, keyboard, RAM, ROM etc. Software: A sequence of instructions given to a computer to perform a particular task is called a program. There are two types of softwares: 1. Application Software: Application software is a set of one or more programs designed to carry out operations for a specific applications like games, library management system, MS-word, Notepad etc. 2. System Software: System softwares are those which provide the environment for the execution of the application softwares like Operating system, compiler, device drivers etc. 1.2 Operating System: An operating system is a software program that manages the hardware and software of a computer. It provides an interaction between user and hardware.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101] 1.2 Types of Operating System:

a. Batch Operating System: In Batch Operating System, The batches are made of the same types of jobs and the batches are executed one by one. An example of batch processing is the way that credit card companies process billing. The customer does not receive a bill for each separate credit card purchase but one monthly bill for all of that months purchases? The bill is created through batch processing, where all of the data are collected and held until the bill is processed as a batch at the end of the billing cycle

b. Multi Programming Operating System: Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor. Since there is only one processor , there can be no true simultaneous execution of different programs. Instead, the operating system executes part of one
Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

program, then part of another, and so on. To the user it appears that all programs are executing at the same time. c. Multi processing Operating System: This allows two or more processes to be used at a time. Here the operating system must decide if it can run the different processes on individual processors. It must also manage the common memory between processors. d. Multitasking Operating System: The ability to execute more than one task at the same time, a task being a program. The terms multitasking and multiprocessing are often used interchangeably, although multiprocessing implies that more than one CPU is involved. In multitasking, only one CPU is involved, but it switches from one program to another so quickly that it gives the appearance of executing all of the programs at the same time. e. Multi User Operating System: Allows two or more users to run programs at the same time. f. Multithreading Operating System: Allows different parts of a single program to run concurrently. g. Real Time System: In real Time System we directly communicate with the deterministic nature like Traffic Management etc. The components of real Time System are explained below: Sensor Controlling Agent Actuator Database

Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

Sensor: It is a hardware device that senses the live environment. Controlling Agent: It is a software that takes decision from according to the sensor. Database: It keeps track of all the information. Actuator: It produce result back to the environment. h. Time Sharing System: A time-sharing system is one that allows multiple users to share time on a single computer.

Each user is given a time slice of CPU time (e.g., each user is served every 0.1 s by the computer). The computer works so fast that each user seems to be the sole user of the computer. One example of a time-sharing system is the bank's bankcard system, which allows hundreds of people to access the same program on the mainframe at the same time. A time-sharing system that allows different users to independently run different programs at the same time is also called a multi-user system.

i. Distributed System: An operating system that manages a group of independent computers and makes them appear to be a single computer is known as a distributed operating system. In Distributed Operating system, we can not share either memory or clock. j. Embedded System: The operating systems designed for being used in embedded computer systems are known as embedded operating systems. They are designed to operate on small machines like PDAs with less autonomy.

1.3 Functions of Operating System:


Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

Today most operating systems perform the following important functions: 1. Processor management, that is, assignment of processor to different tasks being performed system and input programmes device by as well one or the as more user computer programmes are and being system. data. executed. 2. Memory management, that is, allocation of main memory and other storage areas to the 3. Input/output management, that is, co-ordination and assignment of the different output while programmes 4. File management, that is, the storage of file of various storage devices to another. It also allows all files to be easily changed and modified through the use of text editors or some other files manipulation routines.

1.4 MS-DOS: AN OPERATING SYSTEM Microsoft Disk Operating System (MS-DOS) is the text based operating system for IBMs personal computer and their compatibles. It provides abstraction and management of secondary storage devices and the information on them. Internal and External commands of DOS: Internal Command: A command that is stored in the system memory and loaded from the command.com. These are the command, which are frequently used by user. Ex: CD, copy, exit, move etc. External Command: A command that is not included in command.com. External command are commonly external either they require large requirements and/or are not commonly used commands. Many of the external commands are located in windows\system32 directories. Ex: Append, Chkdsk, Edit etc.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101] A Brief about Commands:

1. md or mkdir : Makes a new directory. The parent of the directory specified will be created if it does not already exist. Syntax: md directory 2. cd or chdir: Change current working directory. Syntax: cd displays the current working directory on the current drive. Syntax: cd f: 3. rd or rmdir: Remove a directory Syntax: rd directory 4. copy: Copies files from one location to another. The destination defaults to the current directory. If multiple source files are indicated, the destination must be a directory, or an error will result. Syntax: copy from [source\filename] to [destination\folder] 5. xcopy: Copy entire directory trees. Xcopy is a powerful version of the copy command with additional features; has the capability of moving files, directories, and even whole drives from one location to another. Syntax: xcopy directory [destination-directory] 6. cls: Clears the screen. Syntax: Cls 7. time and date: Display and set the time and date Syntax: time date 8. exit: Exits the current command processor
Prepared By : Pawan Pandey RKGIT

CCP ECS [101] Syntax: Exit 9. type:Display a file. Syntax: type filename 10. tree:Shows the directory tree of the current directory Syntax: tree [options] [directory] Options: /F (Displays the names of the files in each folder.) /A (Use ASCII instead of the extended characters.) 11. dir: Lists the contents of a directory. Syntax: dir [drive:][path][filename] [parameters] Most commonly used parameters of dir include:

/W : Displays the listing in wide format, with as many as five filenames or directory names on each line. /P : Pause at every page /S : Also look in subdirectories\ 12. del or erase:Deletes one or more files. This command is used to delete a particular or more files. Syntax: del filename 13. ren:Renames a file. Unlike the move command, this command cannot be used to rename subdirectories, or rename files across drives. Syntax: ren filename newname 14. Copy con: to make a text file. Syntax: Copy con abc.txt (ctrl+Z to save) 15. Type: to see the content of text file. Syntax: Type abc.txt
Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

1.5 UNIX and LINUX:

UNIX Commands: 1. ls command: This is used to list all files/directories. Syntax: $ ls [-option] The Options are: -C List entries by columns. -R List subdirectories too. 2. cp command: This is used to coy ne file to another. Syntax: $ cp filename1 filename2 3. mv command: This is used to move a file Syntax: $ mv filename1 filename2 4. cat command: This is used to display the contents of a file.
Prepared By : Pawan Pandey RKGIT

CCP ECS [101] Syntax: $ cat filename 5. mkdir command: This is used to create a new directory/subdirectory. Syntax: $ mkdir dirname 6. rm command: This is used to removed a file/directory Syntax: $ rm filename

7. rmdir command: This is used to removes or delete directories and subdirectories. Syntax: $ rmdir dirname 8. head command: This command writes the first 10 lines of a file to the screen. Syntax: $ head filename 9. tail command: This command writes the last 10 lines of a file to the screen. Syntax: $ tail filename 10. pwd command: This command shows the present working directory. Syntax: $ pwd 11. grep command: This is used to look for the string in the file generally it is used for searching utility. Syntax: $ grep filename 12. wc command: This command counts the number of words present in a particular file. Syntax: $ wc filename 13. who command: This command display the list of users currently logged on the UNIX system. Syntax: $ who 14. who am i command: This command gives the login details Syntax: $ who am i

Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

10

1.6 Programming Environment in C: C program has to be created in two stages. Firstly, the program is written in the form of a number of text files using a screen editor. This form of the program is called the source program. It is not possible to execute this file directly. Secondly, The completed source file is assed to a compiler which generates a new file called an object file or executable file. Format of C program: C is a procedure oriented programming language in which every problem is solved as a procedure in the form of functions or in incremental approach. So every C program is a collection of one or more functions. One and only one of these functions in the program must have name main(). This function is always the starting point of a C program. Main() Function2() { } Function3() { } Function4() { }

function1() { }

Some Useful Definitions: a. Editor: Use Turbo C/C++ for writing and execution a program. b. Compiler: A program that translates another program written in a high-level language into machine language so that it can be executed. c. Header File: Header File let the compiler know the prototype for function in a library. c. Library: A library is just a collection of functions
Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

11

1.7 Digital Computer: Computer is an electronic device which takes some input form the user and after processing produces the result to the user.

C.P.U.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101] A.L.U. Input Unit General Purpose Register Accumulator C.U. Output Unit

12

Memory

Input Unit: By input Unit We can give input to the computer like Keyboard, mouse, scanner etc. Output Unit: By output unit we can see the output produced by the C.P.U. like monitor, printer etc. Central Processing Unit (C.P.U.): The Central Processing Unit (CPU) is responsible for interpreting and executing most of the commands from the computer's hardware and software. It is often called the "brains" of the computer. It has the following parts: Arithmetic & Logical Unit (A.L.U.): It performs all the arithmetic (addition, subtraction, multiplication etc.) and logical (AND, OR, NOT) operations. Control Unit (C.U.): It generates electronic signal for the synchronization of various operations. Accumulator: An accumulator is just a special-purpose register, that is used in some computer architectures (not all!) to do arithmetic or other operations that are predefined on it.
Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

13

General Purpose Register: General purpose registers can be used for temporary storage of data and results while computer is making execution of a program. Memory: Computer data storage, often called storage or memory, refers to computer components, devices, and recording media that retain digital data used for computing for some interval of time. Types of Memory: a. Primary storage (or main memory or internal memory), often referred to simply as memory, is the only one directly accessible to the CPU. The CPU continuously reads instructions stored there and executes them as required. Ex. RAM, ROM. Random-access memory (usually known by its acronym, RAM) is a form of computer data storage. Today, it takes the form of integrated circuits that allow stored data to be accessed in any order (i.e., at random). The word random thus refers to the fact that any piece of data can be returned in a constant time, regardless of its physical location and whether or not it is related to the previous piece of data The word RAM is often associated with volatile types of memory where the information is lost after the power is switched off. There are two types of RAM: 1. SRAM: The static RAM consists of internal flip-flops that store the binary information. 2. DRAM: The dynamics RAM stores information in form of electric charges that are applied to capacitors. The capacitors are provided inside the RAM chip by MOS transistors. Read-only memory (usually known by its acronym, ROM) is a class of storage media used in computers and other electronic devices. Because data stored in ROM cannot be modified (at least not very quickly or easily), it is mainly used to distribute firmware (software that is very closely tied to specific hardware, and unlikely to require frequent updates). Different types of ROMs are 1. PROM: programmable ROM
Prepared By : Pawan Pandey RKGIT

CCP ECS [101] 2. EPROM: erasable PROM 3. EEPROM: electrically erasable PROM.

14

b. Secondary storage (or external memory) differs from primary storage in that it is not directly accessible by the CPU. It is the permanent storage of data. Ex. Hard disk, magnetic tape etc.

1.8 Algorithm: An algorithm is a step by step formalization of function mapping form input set onto output set. Characteristics of an Algorithm: 1. Input : An algo must take at least zero or one Input. 2. Output : An algo must produce at least one output. 3. Definiteness: unambiguously specified. 4. Effectiveness: Easy to understand. 5. Termination: An algo must be terminate at a time. Notation of an Algo: 1. Algorithm Name. 2. Input 3. Output 4. Step No. 5. start
Prepared By : Pawan Pandey RKGIT

CCP ECS [101] 6. procedure 7. end. Ex. 1. Write an algo for addition of two numbers. Name: Algo for addition of two numbers. Input: a,b Output: c 1. Input a,b 2. c=a+b 3. print c 4. end. Prob.1 Write an algo to calculate factorial of a given no. 2 Write an algo to find the greatest no. among three nos.

15

1.9 Flow chart: It is a pictorial representation to solve a particular problem. Symbols Used: End start Input Output

Procedure

Con ditio n

Initialization Termination Iteration

Example: Flow chart to find greatest of three nos.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

16

Print C

1.10 Software Development Life Cycle (SDLC):

Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

17

1) Software Requirement Software Requirement Analysis is also known as feasibility study. In this requirement analysis phase, the development team visits the customer and studies their system requirement. They examine the need for possible software automation in the given software system. After feasibility study, the development team provides a document that holds the different specific recommendations for the candidate system. It also consists of personnel assignments, costs of the system, project schedule and target dates.

The requirements analysis and information gathering process is intensified and focused specially on software. To understand what type of the programs to be built, the system analyst must study the information domain for the software as well as understand required function, behavior, performance and interfacing. The main purpose of requirement analysis phase is to find the need and to define the problem that needs to be solved.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101] 2) System Analysis and Design

18

In System Analysis and Design phase, the whole software development process, the overall software structure and its outlay are defined. In case of the client/server processing technology, the number of tiers required for the package architecture, the database design, the data structure design etc are all defined in this phase. After designing part a software development model is created. Analysis and Design are very important in the whole development cycle process. Any fault in the design phase could be very expensive to solve in the software development process. In this phase, the logical system of the product is developed. Designing can be done by two ways. a. Top Down Approach b. Bottom Up Approach 3) Code Generation In Code Generation phase, the design must be decoded into a machine-readable form. If the design of software product is done in a detailed manner, code generation can be achieved without much complication. For generation of code, Programming tools like Compilers, Interpreters, and Debuggers are used. For coding purpose different high level programming languages like C, C++, Pascal and Java are used. The right programming language is chosen according to the type of application. coding can be done by two ways. c. Top Down Approach d. Bottom Up Approach 4) Testing After code generation phase the software program testing begins. Different testing methods are available to detect the bugs that were committed during the previous phases. A number of testing tools and methods are already available for testing purpose. Testing has following three phases a. Unit Testing: In this, We test each and every module separately. b. Integration Testing: In this, We test each and every module with the combination of others. It has following two types
Prepared By : Pawan Pandey RKGIT

CCP ECS [101] I. II.

19 Black Box Testing: Internal architecture is not considered during testing period. White Box Testing: Internal architecture is considered during testing period.

c. System Testing: In this complete, software is tested. It has following three types I. II. III. Testing: Complete software is tested by the companies softwares/ developers. Testing: Complete software is launched by -version and tested threw the friendly users. Acceptance Testing: The product is accepted by the client and tested al time. 5) Maintenance Software will definitely go through change once when it is delivered to the customer. There are large numbers of reasons for the change. Change could happen due to some unpredicted input values into the system. In addition to this the changes in the system directly have an effect on the software operations. The software should be implemented to accommodate changes that could be happen during the post development period.

1.11 Generation of Computer: 1) First Generation (1940-1956): Vacuum Tubes The first computers used vacuum tubes for circuitry and magnetic drums for memory, and were often enormous, taking up entire rooms. They were very expensive to operate and in addition to using a great deal of electricity.First generation computers relied on machine language, the lowest-level programming language. The UNIVAC and ENIAC computers are examples. 2) Second Generation (1956-1963): Transistors Transistors replaced vacuum tubes and ushered in the second generation of computers. The transistor was invented in 1947 but did not see widespread use in
Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

20

computers until the late 1950s. The transistor was far superior to the vacuum tube, allowing computers to become smaller, faster, cheaper, more energy-efficient and more reliable than their first-generation predecessors. Second-generation computers moved from cryptic binary machine language to symbolic, or assembly, languages, which allowed programmers to specify instructions in words. High-level programming languages were also being developed at this time, such as early versions of COBOL and FORTRAN. 3) Third Generation (1964-1971): Integrated Circuits The development of the integrated circuit was the hallmark of the third generation of computers. Transistors were miniaturized and placed on silicon chips, called semiconductors, which drastically increased the speed and efficiency of computers. Instead of punched cards and printouts, users interacted with third generation computers through keyboards and monitors and interfaced with an operating system, which allowed the device to run many different. 4) Fourth Generation (1971-Present) Microprocessors The microprocessor brought the fourth generation of computers, as thousands of integrated circuits were built onto a single silicon chip. What in the first generation filled an entire room could now fit in the palm of the hand. The Intel 4004 chip, developed in 1971, located all the components of the computerfrom the central processing unit and memory to input/output controlson a single chip. 5) Fifth Generation (Present and Beyond) Artificial Intelligence Fifth generation computing devices, based on artificial intelligence, are still in development, though there are some applications, such as voice recognition, that are being used today. The use of parallel processing and superconductors is helping to make artificial intelligence a reality. Quantum computation and molecular and nanotechnology will radically change the face of computers in years to come.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

21

1.12 Classification of Computers Depending upon their speed and memory size, computers are classified into following four main groups. 1. Supercomputer Supercomputer is the most powerful and fastest, and also very expensive. It was developed in 1980s. It is used to process large amount of data and to solve the complicated scientific problems. It can perform more than one trillions calculations per second. It has large number of processors connected parallel. So parallel processing is done in this computer. In a single supercomputer thousands of users can be connected at the same time and the supercomputer handles the work of each user separately. Supercomputers are mainly used for: Weather forecasting. Nuclear energy research. Aircraft design. Automotive design. Online banking. To control industrial units.

The examples of supercomputers are CRAY-1, CRAY-2 2. Mainframe Computers Mainframe computers are also large-scale computers but supercomputers are larger than mainframe. These are also very expensive. The mainframe computer specially requires a very large clean room with air-conditioner. This makes it very expensive to buy and operate. It can support a large number of various equipments. It also has multiple processors. Large mainframe systems can handle the input and output requirements of several thousand of users. For example, IBM, S/390 mainframe can support 50,000 users simultaneously.

Prepared By : Pawan Pandey RKGIT

CCP ECS [101]

22

3. Minicomputers These are smaller in size, have lower processing speed and also have lower cost than mainframe. These computers are known as minicomputers because of their small size as compared to other computers at that time. The capabilities of a minicomputer are between mainframe and personal computer. The minicomputers are used in business, education and many other government departments. Although some minicomputers are designed for a single user but most are designed to handle multiple terminals. Minicomputers are commonly used as servers in network environment. The first minicomputer was introduced in the mid-1960s by Digital Equipment Corporation (DEC).

4. Microcomputer The microcomputers are also known as personal computers or simply PCs. Microprocessor is used in this type of computer. These are very small in size and cost. The IBMs first microcomputer was designed in 1981 and was named as IBM-PC.

Prepared By : Pawan Pandey RKGIT

S-ar putea să vă placă și