Professional Documents
Culture Documents
OSSP Unit 5 Presentation
OSSP Unit 5 Presentation
OSSP Unit 5 Presentation
1. Operating System:
An Operating System is the most basic type of System Software that helps to
manage computer hardware and software.
It is the central part of any computer system which is responsible for the smooth
functioning of any computer device
An Operating system primarily operates your computer when you start it.
If you haven't installed the operating system on your computer, then you will not
be able to start your computer.
Some most common examples of OS are macOS, Linux, Android, and Microsoft
Windows
• The operating system communicates with hardware components controlled with the help of
device drivers.
• The operating system contains a number of device drivers to drive the hardware components.
• Here are some devices that require drivers to perform the smooth functions of any computer
system:
• Keyboards
• Mouse
• Printers
• Function keys
• Network card
• Display card
• Touchpad
• Sound, etc
2) Program execution Activity –This activity aims at bridging the execution gap by
organizing execution of a program written in a programming language on a
computer system.
• Linker
• The main function of the linker is to generate executable files.
• The linker takes the input as the object code which would be generated by a
compiler/assembler.
• The process of linking can be understood as a method to combine different
snippets of code in order to obtain executable code.
• There are two types of linkers available: Linkage Editor and Dynamic Linker.
• Linker also helps combine all the object modules.
• Linker is responsible to arrange the objects in the program’s address space.
• Loader
• The main function of a loader is to load executable files to the main memory.
• It takes the executable files (generated by linker) as its input.
• It can be understood as a process of loading the executable codes into main
memory where it is executed further.
• There are 3 types of loaders: Absolute loading, Relocatable loading and
Dynamic run-time loading.
• It helps allocate the addresses to executable codes or files.
• It is also responsible to adjust the references that are used within the program.
1. Compiler
2. Interpreter
3. Assembler
• Assembly language program consist of mnemonics that is translated into machine code.
• Assembly language is a low-level programming language for a computer or other
programmable device specific to a particular computer architecture
• Assembly language is converted into executable machine code by a utility program
referred to as an assembler like NASM, MASM, etc.
• A processor understands only machine language instructions, which are strings of 1's
and 0's.
• However, machine language is too obscure and complex for using in software
development.
• So, the low-level assembly language is designed for a specific family of processors that
represents various instructions in symbolic code and a more understandable form.
• Assembly language is also called as low-level language because it directly works with
the internal structure of CPU.
• Mostly, programmers use high-level languages but, when more specific code is
required, assembly language is used.
• It uses opcode for the instructions. An opcode basically gives information about
the particular instruction.
• The symbolic representation of the opcode (machine level instruction) is
called mnemonics.
• Programmers use them to remember the operations in assembly language.
• For example ADD A,B
• Here, ADD is the mnemonic that tells the processor that it has to perform
addition function. Moreover, A and B are the operands. Also, SUB, MUL, DIVC,
etc. are other mnemonics.
• Comments
• Assembly language comment begins with a semicolon (;). It may contain any
printable character including blank. It can appear on a line by itself, like −
• ; This program displays a message on screen or, on the same line along with an
instruction, like −
• add eax, ebx ; adds ebx to eax
• Assembly language statements are entered one statement per line. Each
statement follows the following format −
• Assembly Program:
• Label Op-code operand LC value(Location counter)
• JOHN START 200
• MOVER R1, ='3' 200
• MOVEM R1, X 201
• L1 MOVER R2, ='2' 202
• LTORG 203
• X DS 1 204
• END 205
• START: This instruction starts the execution of program from location 200 and
label with START provides name for the program.(JOHN is name for program)
• MOVER: It moves the content of literal(=’3′) into register operand R1.
• MOVEM: It moves the content of register into memory operand(X).
• MOVER: It again moves the content of literal(=’2′) into register operand R2 and
its label is specified as L1.
• LTORG: It assigns address to literals.
• DS(Data Space): It assigns a data space of 1 to Symbol X.
• END: It finishes the program execution.
• When you enter the as command, the assembler makes two passes
over the source program.
• First pass
During the first pass, the assembler checks to see if the instructions
are legal in the current assembly mode.
• Second pass
During the second pass, the assembler examines the operands for
symbolic references to storage locations and resolves these symbolic
references using information in the symbol table and produces the
object code.