TOPIC INTRODUCTION TO SYSTEM PROGRAMMING Presented by:- Ms. Sonali Kharade Assistant Professor, Computer Science Department
Introduction  A system programming is a program which helps to execute user’s program effectively on a computer system.  Computer software system is classified into two categories i.e. System program and Application program. 1. System program 2. Application program
Difference between System software and Application software Sr. No. System Software Application Software 1. System software is used for operating computer hardware. Application software is used by user to perform specific task. 2. System software's are installed on the computer when operating system is installed. Application softwares are installed according to user’s requirements. 3. In general, the user does not interact with system software because it works in the background. In general, the user interacts with application software's. 4. System software can run independently. It provides platform for running application softwares. Application software can’t run independently. They can’t run without the presence of system software. 5. Some examples of system softwares are compiler, assembler, debugger, driver, etc. Some examples of application software's are word processor, web browser, media player, etc.
Difference between System and Application programming Sr. No. System Programming Application Programming 1. System programming is comprised of writing programs for assemblers, compilers, editors etc Application programming is used for providing means to facilitate applications such as management information system, Ms. Word. 2. Debugging is difficult. Debugging is not difficult. 3. Fault-fixing is not easy, but reliable.. Fault-fixing is easy and reliable. 4. In system programming, programmer used to build application. Eg. Operating System, DBMS etc In application programming, programmers build application. Eg. Website, Ms-Word, video games etc 5. System programming makes machine to do work. Application programming makes system program to do work.
Elements of programming environment  Assembler  Loader and Linker  Macro preprocessor  Compiler  Editor  Debugger  Device Drivers  Operating System
Assembler  An assembler is a program that converts assembly language into machine code. It takes the basic commands and operations from assembly code and converts them into binary code that can be recognized by a specific type of processor.  An assembler enables software and application developers to access, operate and manage a computer's hardware architecture and components.  An assembler is sometimes referred to as the compiler of assembly language. It also provides the services of an interpreter. Assembler Assembly language program Machine language program
Linker and Loader  A linker combines one or more object files and possible some library code into either some executable, some library or a list of error messages.  The task of integrating the program modules together is called linking.  A loader reads the executable code into memory, does some address translation and tries to run the program resulting in a running program or an error message (or both). Loader Object program on secondary storage Object program in main memory Source program Executable program Compiler Linker
Macro Preprocessor  Macro provide an easy and efficient solution to be problem of repeatedly needing the sequence of instruction.  A preprocessor, generally considered as a part of compiler, is a tool that produces input for compilers. It deals with macro-processing, augmentation, file inclusion, language extension, etc.  The macro preprocessor accepts an assembly language program containing macro definitions and macro calls and translates into assembly program which does not contain any macros.  The entire operating system is written as a series of macro definitions and macro calls. Macro Preprocessor Assembly language program with macro Assembly language program without macro
Compiler  A compiler is a program that converts high-level language to assembly language. Similarly, an assembler is a program that converts the assembly language to machine-level. Example: Turbo compiler for ‘C language’. Compiler High level language program Low level language program (object code)
Interpreter  An interpreter, like a compiler, translates high-level language into low-level machine language. The difference lies in the way they read the source code or input. A compiler reads the whole source code at once, creates tokens, checks semantics, generates intermediate code, executes the whole program and may involve many passes. In contrast, an interpreter reads a statement from the input, converts it to an intermediate code, executes it, then takes the next statement in sequence. If an error occurs, an interpreter stops execution and reports it. whereas a compiler reads the whole program even if it encounters several errors. Source code Interpreter Output
Editor  Editors or text editors are software programs that enable the user to create and edit text files. In the field of programming, the term editor usually refers to source code editors that include many special features for writing and editing code. Notepad, Wordpad are some of the common editors used on Windows OS and vi, emacs, Jed, pico are the editors on UNIX OS. Source code Editor Formatted source code
Debugger  A debugger program is one that allows the user to view another program line by line. This allows the user to identify incorrect code and find out how a program flows.  A debugger is very useful to find semantic errors in the program. So, it is necessary as it helps the programmer visualize program flow.  A debugger is a computer program used by programmers to test and debug a target program.  Here’s the debugging process: 1. Reproduce the problem. 2. Describe the bug. Try to get as much input from the user to get the exact reason. 3. Capture the program snapshot when the bug appears. Try to get all the variable values and states of the program at that time. 4. Analyse the snapshot based on the state and action. Based on that try to find the cause of the bug. 5. Fix the existing bug, but also check that any new bug does not occur.
Operating System  An operating system is the most important software that runs on a computer. It manages the computer's memory and processes, as well as all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's language. Following are the function of OS. o Memory Management. o Processor Management. o Device Management. o File Management. o Security. o Control over system performance. o Job accounting. o Error detecting aids.
Device Drivers  Device Drivers are the software through which, the kernel of a computer communicates with different hardware, without having to go into the details of how the hardware works. It is a software that controls a hardware part attached to a computer and allows the computer to use the hardware by providing a suitable interface.  Thus, the purpose of device drivers is to allow smooth functioning of the hardware for which it is created and to allow it to be used with different operating systems.  To communicate with any device such as mouse, printer, keyboard, device drivers are loaded in operating system.

Introduction to system programming

  • 1.
    TOPIC INTRODUCTION TO SYSTEM PROGRAMMING Presented by:- Ms.Sonali Kharade Assistant Professor, Computer Science Department
  • 2.
    Introduction  A systemprogramming is a program which helps to execute user’s program effectively on a computer system.  Computer software system is classified into two categories i.e. System program and Application program. 1. System program 2. Application program
  • 3.
    Difference between Systemsoftware and Application software Sr. No. System Software Application Software 1. System software is used for operating computer hardware. Application software is used by user to perform specific task. 2. System software's are installed on the computer when operating system is installed. Application softwares are installed according to user’s requirements. 3. In general, the user does not interact with system software because it works in the background. In general, the user interacts with application software's. 4. System software can run independently. It provides platform for running application softwares. Application software can’t run independently. They can’t run without the presence of system software. 5. Some examples of system softwares are compiler, assembler, debugger, driver, etc. Some examples of application software's are word processor, web browser, media player, etc.
  • 4.
    Difference between Systemand Application programming Sr. No. System Programming Application Programming 1. System programming is comprised of writing programs for assemblers, compilers, editors etc Application programming is used for providing means to facilitate applications such as management information system, Ms. Word. 2. Debugging is difficult. Debugging is not difficult. 3. Fault-fixing is not easy, but reliable.. Fault-fixing is easy and reliable. 4. In system programming, programmer used to build application. Eg. Operating System, DBMS etc In application programming, programmers build application. Eg. Website, Ms-Word, video games etc 5. System programming makes machine to do work. Application programming makes system program to do work.
  • 5.
    Elements of programmingenvironment  Assembler  Loader and Linker  Macro preprocessor  Compiler  Editor  Debugger  Device Drivers  Operating System
  • 6.
    Assembler  An assembleris a program that converts assembly language into machine code. It takes the basic commands and operations from assembly code and converts them into binary code that can be recognized by a specific type of processor.  An assembler enables software and application developers to access, operate and manage a computer's hardware architecture and components.  An assembler is sometimes referred to as the compiler of assembly language. It also provides the services of an interpreter. Assembler Assembly language program Machine language program
  • 7.
    Linker and Loader A linker combines one or more object files and possible some library code into either some executable, some library or a list of error messages.  The task of integrating the program modules together is called linking.  A loader reads the executable code into memory, does some address translation and tries to run the program resulting in a running program or an error message (or both). Loader Object program on secondary storage Object program in main memory Source program Executable program Compiler Linker
  • 8.
    Macro Preprocessor  Macroprovide an easy and efficient solution to be problem of repeatedly needing the sequence of instruction.  A preprocessor, generally considered as a part of compiler, is a tool that produces input for compilers. It deals with macro-processing, augmentation, file inclusion, language extension, etc.  The macro preprocessor accepts an assembly language program containing macro definitions and macro calls and translates into assembly program which does not contain any macros.  The entire operating system is written as a series of macro definitions and macro calls. Macro Preprocessor Assembly language program with macro Assembly language program without macro
  • 9.
    Compiler  A compileris a program that converts high-level language to assembly language. Similarly, an assembler is a program that converts the assembly language to machine-level. Example: Turbo compiler for ‘C language’. Compiler High level language program Low level language program (object code)
  • 10.
    Interpreter  An interpreter,like a compiler, translates high-level language into low-level machine language. The difference lies in the way they read the source code or input. A compiler reads the whole source code at once, creates tokens, checks semantics, generates intermediate code, executes the whole program and may involve many passes. In contrast, an interpreter reads a statement from the input, converts it to an intermediate code, executes it, then takes the next statement in sequence. If an error occurs, an interpreter stops execution and reports it. whereas a compiler reads the whole program even if it encounters several errors. Source code Interpreter Output
  • 11.
    Editor  Editors ortext editors are software programs that enable the user to create and edit text files. In the field of programming, the term editor usually refers to source code editors that include many special features for writing and editing code. Notepad, Wordpad are some of the common editors used on Windows OS and vi, emacs, Jed, pico are the editors on UNIX OS. Source code Editor Formatted source code
  • 12.
    Debugger  A debuggerprogram is one that allows the user to view another program line by line. This allows the user to identify incorrect code and find out how a program flows.  A debugger is very useful to find semantic errors in the program. So, it is necessary as it helps the programmer visualize program flow.  A debugger is a computer program used by programmers to test and debug a target program.  Here’s the debugging process: 1. Reproduce the problem. 2. Describe the bug. Try to get as much input from the user to get the exact reason. 3. Capture the program snapshot when the bug appears. Try to get all the variable values and states of the program at that time. 4. Analyse the snapshot based on the state and action. Based on that try to find the cause of the bug. 5. Fix the existing bug, but also check that any new bug does not occur.
  • 13.
    Operating System  Anoperating system is the most important software that runs on a computer. It manages the computer's memory and processes, as well as all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's language. Following are the function of OS. o Memory Management. o Processor Management. o Device Management. o File Management. o Security. o Control over system performance. o Job accounting. o Error detecting aids.
  • 14.
    Device Drivers  DeviceDrivers are the software through which, the kernel of a computer communicates with different hardware, without having to go into the details of how the hardware works. It is a software that controls a hardware part attached to a computer and allows the computer to use the hardware by providing a suitable interface.  Thus, the purpose of device drivers is to allow smooth functioning of the hardware for which it is created and to allow it to be used with different operating systems.  To communicate with any device such as mouse, printer, keyboard, device drivers are loaded in operating system.