Vous êtes sur la page 1sur 22

Basics of system programming

COMPUTER

HARDWARE

SOFTWARE a)application software b)system software

Q.1 Define software?


Set of programs is known as software. It is two types a. System software-: set of system programs is known as system software. b. Application software-: set of application programs is known as application software.

Q. 2. Define System Programming?

System programming is a branch of computer science and engineering that deals with the structure of the machine. The structure of a machine may compose of memory, I/O processor, CPU (Central Processing Unit), card reader and printer etc. In other words, system programming is one of high level procedural language, knowledge of data structure and computer organization.

Foundation

of sp-:

Q. 3. What are the basic components of a programming system? The basic components of a programming system are as follows 1. Assembler 2. Loader 3. linker 4. Compilers 5. Interpreter 6. Editors 7. debugger

ASSEMBLERS: A system program which checks the validity of mnemonics and converts an assembly language program into machine languages known as an assembler. 2. Loader:A loader is a system program, which takes the object code of a program as input and prepares it for execution(It loads the program in to memory for the purpose of execution). 3. Linker :It is used to link the program with the header file.
1.

4.COMPILERS: A system program which finds errors in a source code. A compiler is a program that accepts a source program in a high level language and produces a corresponding object program. 5.Interpreter:A system program which converts line by line high level language to low level language is known as interprator.

6. Editors: System programs which helps a user to insert, delete, update text in an environment is known as an editor. e.g. MS_WORD, NOTEPAD. 7.Debuggers:: A debugger is a computer program that is used to test and debug other programs. It is a program which runs other programs in such a way as to let the programmer see every step of program execution.

Q. Difference between operating system dos, windows,unix? os: An operating system(os) is interface between computer hardware and user. Basically, there are two ways. With a command-line operating system,you type a text command and the computer responds according to that command. eg:dos. Dos: dos is an character oriented; single user;system you can not share files between 2 dos pc in older dos system.

With a graphical user interface (GUI) operating system, you interact with the computer through a graphical interface with pictures and buttons by using the mouse and keyboard. eg: windows. Windows: windows is an multiuser GUI support system where you can access each & every thing easily inspite of issuing command each time as compare to dos. Each task u perform os will invoke commands for you internally. Unix: The Unix operating system is a multiuser, multitasking operating system originally designed for programmers by

AT&T employees at Bell Laboratories in 1969. The terms multiuser and multitasking mean that many different users can perform tasks simultaneously on one machine. Each user interacts with her own instance of the shell, and can start one or more applications within that shell. The unix operating system (OS) consists of a kernel layer, a shell layer and a utilities and applications layer.

Kernel: The Kernel is the heart of the Unix OS. It is a software application that provides the interface between the hardware and the user. It handles the process, memory, file, device and network management for the operating system. Shell: The shell is the program that sits between the user and the kernel. It is the interpreter that translates the commands that are typed into the terminal session. Users can type commands directly into the terminal, or they can create a text file

containing a series of commands that can be sent to the shell. The series of commands are called a shell script. Utilities and Application: The final layer of the Unix OS is the Utilities and Applications layer. This layer includes the commands, word processors, graphic programs and database management programs.

Q. What are dummy arguments? The variable appearing in the definition of a macro or function which will be replaced by an address at call time. Or Arguments data to be passed during a procedure call. Arguments are of two sorts: dummy arguments and actual arguments. Dummy arguments are specified in the argument list in a procedure definition. They define the number, type, kind, and rank of the actual arguments. The actual arguments are the arguments that appear in the procedure reference and are the actual entities to be used by the referenced procedure, even though they are known by the dummy argument names

Q. What do you understand by booting of a machine?


Why is Booting Required ?

Hardware doesnt know where the operating system resides and how to load it. Need a special program to do this job Bootstrap loader. E.g. BIOS Boot Input Output System. Bootstrap loader locates the kernel, loads it into main memory and starts its execution. In some systems, a simple bootstrap loader fetches a more complex boot program from disk, which in turn loads the kernel.

Q. How Boot process occurs ?

Reset event on CPU (power up, reboot) causes instruction register to be loaded with a predefined memory location. It contains a jump instruction that transfers execution to the location of Bootstrap program. This program is form of ROM, since RAM is in unknown state at system startup. ROM is convenient as it needs no initialization and cant be affected by virus.

Bios interaction:

Tasks performed at boot up


Run diagnostics to determine the state of machine. If diagnostics pass, booting continues. Runs a Power-On Self Test (POST) to check the devices that the computer will rely on, are functioning. BIOS goes through a preconfigured list of devices until it finds one that is bootable. If it finds no such device, an error is given and the boot process stops. Initializes CPU registers, device controllers and contents of the main memory. After this, it loads the OS.

On finding a bootable device, the BIOS loads and executes its boot sector. In the case of a hard drive, this is referred to as the master boot record (MBR) and is often not OS specific. The MBR code checks the partition table for an active partition. If one is found, the MBR code loads that partition's boot sector and executes it. The boot sector is often operating system specific, however in most operating systems its main function is to load and execute a kernel, which continues startup

Secondary Boot Loaders

If there is no active partition or the active partition's boot sector is invalid, the MBR may load a secondary boot loader and pass control to it and this secondary boot loader will select a partition (often via user input) and load its boot sector. Examples of secondary boot loaders
GRUB GRand Unified Bootloader LILO LInux LOader NTLDR NT Loader

Vous aimerez peut-être aussi