1 / 38

SOFTWARE

SOFTWARE. Compiled by : S. Agarwal, Lecturer & Systems Incharge St. Xavier’s Computer Centre, St. Xavier’s College Kolkata. March-2003. WHAT IS PROGRAM A program is a sequence of instructions that a computer can interpret and execute. It is developed using high level computer languages.

eells
Download Presentation

SOFTWARE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SOFTWARE Compiled by : S. Agarwal, Lecturer & Systems Incharge St. Xavier’s Computer Centre, St. Xavier’s College Kolkata. March-2003

  2. WHAT IS PROGRAM A program is a sequence of instructions that a computer can interpret and execute. It is developed using high level computer languages. WHAT IS SOFTWARE Software is computer program or a set of programs, which provides the instructions which enable the computer hardware to work. Two main types of software are system software (operating systems), which control the workings of the computer, and applications, such as word processing programs, spreadsheets, and databases.

  3. Types of Languages Used to Write a Software • Machine Language • Assembly Language • High Level Language

  4. Machine Language • A set of machine instructions written using binary code that a processor can understand. • A processor interprets and translates machine instructions into HW signals. Example: the instruction to add 2 numbers stored in registers A and B might look like this: 00000011 11000011 Problems: • Binary representation of instructions and data are not easily generated, manipulated, or understood by humans. • The languages are machine dependent. • Writing program in machine language requires the knowledge of the internals of the computer.

  5. Assembly Language • A symbolic form of machine language • Allows alphabetic mnemonics for operation codes and storage locations • There exists one-to-one correspondence between assembly instructions and machine instructions. Example: M. L. Instruction: 00000011 11000011 Equivalent A.L. Instruction: ADD A, B

  6. Advantages …. • Ease: Because of the use of mnemonics it is more understandable and easy to remember than a machine language code.. • Speed: programs in AL run faster than those written in high level languages. • Compactness: routines include only code that programmers want to include. • Versatility: anything that can be done with a computer can be done with AL

  7. Problems …. • Big programs in assembly language : harder to write and error prone. • The languages are machine dependent. • The programmer must still be aware of the internal architecture of the target machine.

  8. High Level Language • Use English like codes that are easier to remember. • Generally machine (architecture) independent. • Provides language constructs for specifying and manipulating complex data structures. • Supports a variety of programming styles (i.e. linear, object oriented) • Hides the low level architectural details from the programmer i. e. dose not normally require the knowledge of the internal architecture of the computers. Example : C, C++, Pascal, COBOL, Java

  9. Binary codes Somebinary codes used to represent information in a digital computer: 1) BCD Code 2) ASCII Code 3) Gray Code 4) EBCDIC Code 5) Excess-3 Code

  10. BCD CODE • BCD stands for Binary-Coded Decimal. • A BCD number is a four-bit binary group that represents one of the ten decimal digits 0 through 9. Example: Decimal number 49264 9 2 6 8421 BCD coded number0100 10010010 0110

  11. THE ASCII CODE • ASCII is acronym for American Standard Code for Information Interchange • Represents numbers, letters, punctuation marks and control characters • Standard ASCII is a 7-bit code (127 characters) • Extended ASCII (IBM ASCII), an 8-bit code, is also very popular • Extended ASCII adds graphics and math symbols to code (total of 256 symbols)

  12. ASCII : Example …..

  13. Translators 0x000000 00100111101111011111111111100000 0x000004 10101111101111110000000000010100 0x000008 10101111101001000000000000100000 0x00000c 10101111101001010000000000100100 0x000010 10101111101000000000000000011000 0x000014 10101111101000000000000000011100 0x000018 10001111101011100000000000011100 0x00001c 00000001110011100000000000011001 0x000020 00000000000000000111100000010010 0x000024 10001111101110000000000000011000 0x000028 00000011000011111100100000100001 0x00002c 10101111101010000000000000011100 0x000030 00100101110010000000000000000001 0x000034 10101111101110010000000000011000 0x000038 00101001000000010000000001100101 0x00003c 00010100001000001111111111110111 0x000040 00111100000001000001000000000000 0x000044 00110100100001000000010000110000 0x000048 10001111101001010000000000011000 0x00004c 00001100000100000000000011101100 0x000050 00000000000000000001000000100001 0x000054 10001111101111110000000000010100 0x000058 00100111101111010000000000100000 0x00005c 00000011111000000000000000001000 • Used to translate other forms of languages into machine language. • Three types of commonly used translators are : 1) Assembler 2) Compiler 3) Interpreter

  14. Assembler • A program that converts assembly code into machine code • After translation creates object module i.e. the machine language representation of a program

  15. How does an assembler work ?

  16. Compiler • Translates high-level code into machine language code. • Produces object code (Translated Instructions ready for computer ) by translatingthe source code ( high-level language instruction ). • Object code is stored in the machine and can be used repeatedly.

  17. SOURCE CODE PROGRAM COMPILER OBJECT CODE LINKAGE EDITOR OTHER OBJECT CODE MODULES LOAD MODULE TRANSLATION PROCESS

  18. Digital Computer as a Multilevel Machine Applications Level High Level Language Level Translation(Compiler) Software Assembly Language Level Translation(Assembler) Machine code Operating System Level Partial Interpretation, Partial Pass-through Machine code Machine Language Level Interpretation (microprogram) Hardware Microprogram Level Directly executed by hardware Digital Logic Level

  19. Interpreter • Like compiler translates a high level language into machine language. • Unlike compiler translates the program at the time of executing the program instruction by instruction. • The translated code is not stored permanently in computer’s memory, hence before each execution interpretation becomes necessary. • As object code is not stored in the computer, execution of the program becomes slower because of the need for interpretation before each execution. • Normally it is easier to design an interpreter than a compiler.

  20. Generations of Languages 1st.Since 1940s. MACHINE LANGUAGE: binary code. 2nd.Since early ’50s. ASSEMBLY LANGUAGE: mnemonics for numeric code. 3rd.Since mid ‘50s. HIGH-LEVEL LANGUAGES: procedural in nature. e.g.C, C++, COBOL 4th.Since late ‘70s. MODERN APPLICATION PACKAGES: non-procedural in nature. e.g. Structured Query Language (SQL)

  21. SYSTEM SOFTWARE The system softwares are programs specially designed for controlling the computer hardware, ensuring the proper utilization of the computer resources and providing a convenient environment to the users of the computer to work with. Example: Operating system, Compiler, Interpreter, Loader, Linker

  22. APPLICATION SOFTWARE These are programs developed by the users of the computer to perform a specific task. They can be of two types: a) Ready Made: These are programs developed by software companies for general purpose applications. These programs can be bought and can be installed for performing some predefined job. Examples :MS-WORD, FACT, TALLY, FOXPRO etc. b) Customized or Tailor made : These are programs developed for SPECIFIC USER REQUIREMENT within an organization. These programs are developed by programmers as per the user requirements. Example:Library Management System, Hotel Management System, Railway Reservation System

  23. OPERATING SYSTEM: SCHEDULED COMPUTER EVENTS ALLOCATES COMPUTER RESOURCES MONITORS EVENTS LANGUAGE TRANSLATORS: INTERPRETERS COMPILERS UTILITY PROGRAMS: ROUTINE OPERATIONS MANAGE DATA PROGRAMMING LANGUAGES: ASSEMBLY LANGUAGE; FORTRAN; COBOL; PL / 1; QBASIC; PASCAL; C; C++; FOURTH GENERATION LANGUAGES SOFTWARE LAYERS APPLICATION SOFTWARE SYSTEM SOFTWARE HARDWARE

  24. Operating System A system software that acts as an intermediary between the user and the computer and works as • Interface manager • Human interaction made easy • interfacing, abstraction, control and sharing • Resource manager • Efficient use of resources • System and data security and protection provider. • Control program that prevents the system from improper use and takes care of error situations

  25. Jobs of an O.S. : Providing User Interface …… Operating system provides these facilities for the user: • Program creation : editors, debuggers, other development tools. • Program execution : load, files, IO operations. • Access to IO devices: Read and writes. • Controlled access to files: protection mechanisms, abstraction of underlying device. • System access: Controls who can access the system.

  26. Jobs of an O.S. : As a Resource Manager……. • Processors : Allocation of processes to processors, preemption, scheduling. • Memory: Allocation of main memory. • IO devices : when to access io devices, which ones etc. • Files: Partitions, space allocation and maintenance. • Process : Applications, Data, objects.

  27. Jobs of an O.S. : Providing Protection and Security …….. • When sharing resources, protection of the systems and user resources from intentional as well as inadvertent misuse. • Protection generally deals with access control. Ex: Read only file • Security deals usually with threats from outside the system that affects the integrity and availability of the system and information with the system. • Example: username, password to access system. Data encryption to protect information.

  28. Evolution of Operating System… • Serial Processing • Batch Processing • Multiprogramming • Time Sharing • Parallel System • Distributed System • Real Time System

  29. Serial Processing(Early 1950’s) • Typical setup: • Users would sign up for a time slot (e.g., 2am-3am) • During that slot, had exclusive use of the computer • Must load program into memory space, overwriting old conten • Drawbacks: • Inconvenient for user • Wasteful of computer time (computer was idle during setup, • debugging

  30. Batch Processing( Mid 1950s) • Typical setup: • Users would submit jobs on • cards/tape to computer operator • Operator would combine multiple • jobs into a single batch job and load • into card/tape reader • Each user job would be executed in • turn • Users received output after all jobs • finished • the primitive operating system in charge of executing the batch job was called a resident monitor • it resided permanently in memory • it monitored the execution of each job in succession

  31. Multiprogramming (Early 1960s) • Typical setup: • Users submitted jobs to computer operator • Jobs were loaded into separate memory partitions • Computer would begin executing first job • During idle period, could switch to another job • User could receive output as soon as their job terminated

  32. Advantages and Drawbacks … • Advantages: • Interactive ness is restored. • CPU is kept busy. • Disadvantages: • Hardware and O.S. required • become significantly more complex

  33. TRADITIONAL SINGLE-PROGRAM SYSTEM MULTIPROGRAMMING ENVIRONMENT PROGRAM 1 PROGRAM 2 PROGRAM 1 OPERATING SYSTEM OPERATING SYSTEM PROGRAM 3 UNUSED MEMORY UNUSED MEMORY Content of Primary Memory in Single/Multi program systems

  34. Typical setup: Many users share large capacity CPU: Time in CPU divided into slices ( e.g.,2 milliseconds) Each user has access to CPU during slice. If the job is not completed within the given time slice, it is preempted and the next job gets the CPU. The preempted jobs gets the CPU back after all other jobs get a chance to get the CPU Time Sharing(Mid 1960s) 7.11

  35. New computer architectures  new demands Multiprocessor Systems ( parallel systems or tightly coupled systems) • More than one processor in close communication, share bus and clock, other resources • Can increase throughput, save on shared resources, provide greater reliability Distributed systems ( loosely coupled systems) • Distribute the computation among several processors, each with its own memory & resources • Processors communicate via communications lines, e.g., high-speed buses or phone lines • Similar benefits as multiprocessor, but generally simpler, cheaper, more scaleable but slower.

  36. New architectures (cont.) Real-time systems Some systems impose well-defined, fixed-time constraints where large number of events external to the system are required to be taken care of. e.g., control for scientific experiments, medical imaging systems, industrial control systems. Hard real-time: • Critical tasks must be completed in specified time • Secondary storage limited or absent, data stored in short term memory or ROM • Not compatible with timesharing Soft real-time: • Critical tasks are given priority over other tasks, but no guarantees • Limited utility in industrial control of robotics

  37. End of Presentation

More Related