Posts

MAP Function in C++ STL

Image
  MAP Function in C++ STL The map function attributes values to certain keys. As can be seen above, the circle is matched with a circle, and so on. When the 'int' data type is attributed, the keys are automatically arranged in ascending order. The map can be manipulated in certain ways so that the value is always mapped to the key. So if you remove the key, the value is also removed. You move the key, and the value is also moved. Here is the syntax to create and display user-given inputs to a map. #include<bits/stdc++.h> using namespace std ; int  main () {     map< int , int > example ;      int  n , t1 , t2 ;          cin>>n ;           for ( int  i= 0 ; i<n ; i++ )      {         cin>>t1>>t2 ;         example.insert ( pair< int , int > ( t1 , t2 ));      }          cout<< "----------------------" <<endl ;          map< int , int > :: iterator i ;           for ( i=example.begin (); i!=example.end (); i++ )   

Data Centric Network (Unit 4)

Image
Data-Centric Network (Unit 4) Layer 2 Networking STP - Purpose Redundancy in layer 2 switches Loop intervention Better than redundant switch links STP - Loop free Elect root bridge Elect root ports Elected designated ports Elect alternate ports Ethernet Standards MSTI IEEE 802.3ba 40GB Ethernet VS 100GB Ethernet EVB TOR EOR VEB VEPA TRILL FCOE VS FCIP

Data Centric Network (Unit 5)

Image
 Data-Centric Network (Unit 5) IP Services IP Datagram IP Header Version - IPv4 or IPv6 Header Length - Storage of all required headers. Identification - Finding the datagram. Flags - Used under fragmentation. TTL - The time before the packet will be dropped. Protocol Header Checksum - Integrity of the data maintained. Options Padding IP Fragmentation IPv4 Issues No route aggregation - Minimize the routing table complexity. Address space exhaustion Lack of quality of service Limited mobility Security layer issue IPv6 Version number Flow label - Label packet requests handle by routers. Traffic class - Identification and marking class types of packet. Payload length Next header Hop limit Source address Destination address Flow Label  - Maintains  a table with an entry and exit definition for the IPv6 routing. IPv6 VS IPv4 Extension header types Hop by Hop Destination Source Routing Fragmentation Authentication ESP MPLS Link state routing & algorithms OSPF - Link state routing

Data Centric Network (Unit 3)

Image
  Data-Centric Network (Unit 3) Server Architecture Network Attachment - Interface for the communication between server and client via the network. Network Interface Cards - Provide connectivity between hosts. DMA - Transfers data without involving the system processor. Interrupt coalescing - Reduces the number of interrupts hence reducing delay. Jumbo frames - Support bigger ethernet frames. Server Multihoming Fault tolerance - Only one port is active which upon failure would keep it on standby and the other port take up the load. Load balancing - One port receives all the traffic. Link aggregation - A bunch of ports looks like a single link with equivalent bandwidth. PCI & PCI-X Buses - Bandwidth allocation of 533 MBPS & 1.066 GBPS. Client Server Packet Processing - How the OS handles the processing of IP packets. User mode VS Kernel mode - Interrupt handling & system services etc. Ethernet Driver Server TCP/IP Sockets Listen - Length of  receive queue of incoming