What is OSI model?
The Open Systems Interconnection (OSI) reference model has been an essential element of computer network design since its ratification in 1984. The OSI is an abstract model of how network protocols and equipment should communicate and work together (interoperate).
The OSI model is a technology standard maintained by the International Standards Organization (ISO). Although today's technologies do not fully conform to the standard, it remains a useful introduction to the study of network architecture.
The OSI Model Stack
The OSI model divides the complex task of computer-to-computer communications, traditionally calledinternetworking, into a series of stages known aslayers. Layers in the OSI model are ordered from lowest level to highest. Together, these layers comprise the OSI stack. The stack contains seven layers in two groups:
Upper layers -
7. application
6. presentation
5. session
Lower layers -
4. transport
3. network
2. data link
1. physical
Upper Layers of the OSI Model
OSI designates the application, presentation, and session stages of the stack as the upper layers. Generally speaking, software in these layers performs application-specific functions like data formatting, encryption, and connection management. Examples of upper layer technologies in the OSI model are HTTP, SSL and NFS.
Lower Layers of the OSI Model
The remaining lower layers of the OSI model provide more primitive network-specific functions like routing, addressing, and flow control. Examples of lower layer technologies in the OSI model are TCP, IP, and Ethernet.
Benefits of the OSI Model
By separating the network communications into logical smaller pieces, the OSI model simplifies how network protocols are designed. The OSI model was designed to ensure different types of equipment (such as network adapters, hubs, and routers) would all be compatible even if built by different manufacturers. A product from one network equipment vendor that implements OSI Layer 2 functionality, for example, will be much more likely to interoperate with another vendor's OSI Layer 3 product because both vendors are following the same model.
The OSI model also makes network designs more extensible as new protocols and other network services are generally easier to add to a layered architecture than to a monolithic one.
MAXIMUM number in series
TITLE greatest number in a series
.model small
.stack 100h
.data
list db 80, 81, 78, 65, 23, 45, 89, 90, 10,
99
result db ?
.code
main proc
mov ax, @data
mov ds, ax
mov si, offset list
mov al, 00h
mov cx, 0ah
back:
cmp al, [si]
jnc ahead
mov al, [si]
ahead:
inc si
loop back
mov result, al
mov ah, 4ch
int 21h
main endp
end main
Factorial : 8086 ALP
TITLE Factorial of a number
.model
small
.stack
.data
num
db 5
fact
db ?
.code
main
proc
mov ax,@data
mov ds,ax
mov si,offset num
mov al,1
mov bl,num
back: mul bl
dec bl
jnz back
mov fact,al
mov ah,4ch
int 21h
main
endp
end mainDifference between C and C++
Following are the differences between C and C++ :
C
|
C++
|
1. C is Procedural Language.
|
1. C++ is non Procedural i.e Object oriented
Language.
|
2. No virtual Functions are present in C
|
2. The concept of virtual Functions are used in C++.
|
3. In C, Polymorphism is not possible.
|
3. The concept of polymorphism is used in C++.
Polymorphism is the most important Feature of OOPS. |
4. Operator overloading is not possible in C.
|
4. Operator overloading is one of the greatest
Feature of C++.
|
5. Top down approach is used in Program Design.
|
5. Bottom up approach adopted in Program Design.
|
6. No namespace Feature is present in C Language.
|
6. Namespace Feature is present in C++ for avoiding
Name collision.
|
7. Multiple Declaration of global variables are
allowed.
|
7. Multiple Declaration of global varioables are not
allowed.
|
8. In C
·
scanf() Function used for Input.
·
printf() Function used for output.
|
8. In C++
·
Cin>> Function used for Input.
·
Cout<< Function used for output.
|
9. Mapping between Data and Function is difficult
and complicated.
|
9. Mapping between Data and Function can be used
using "Objects"
|
10. In C, we can call main() Function through other
Functions
|
10. In C++, we cannot call main() Function through
other functions.
|
11. C requires all the variables to be defined at the
starting of a scope.
|
11. C++ allows the declaration of variable anywhere
in the scope i.e at time of its First use.
|
12. No inheritance is possible in C.
|
12. Inheritance is possible in C++
|
13. In C, malloc() and calloc() Functions are used
for MemoryAllocation
and free() function for memory Deallocating.
|
13.In C++, new and delete operators are used for
Memory Allocating and Deallocating.
|
14. It supports built-in and primitive data types.
|
14. It supports both built-in and user
define data types.
|
15. In C, Exception Handling is not present.
|
15. In C++, Exception Handling is done with Try and
Catch block.
|



