import java.util.*;
public class Solutions {
public static int getGreater(int a, int b) {
if(a > b) {
return a;
} else {
return b;
}
}
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(getGreater(a, b));
}
}
import java.util.*;
public class Solutions {
public static void printSum(int n) {
int sum = 0;
for(int i=1; i<=n; i++) {
if(i % 2 != 0) {
sum = sum + i;
}
}
System.out.println(sum);
}
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
printSum(n);
}
}
import java.util.*;
public class Solutions {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int average = (a + b + c) / 3;
System.out.println(average);
}
}
Fibre Channel Architecture:-
➢ Connections in a SAN are accomplished using FC.
➢ Fibre Channel Protocol (FCP) is the implementation of serial SCSI-3 over an FC
network. In the FCP architecture, all external and remote storage devices attached to the
SAN appear as local devices to the host operating system.
➢ The key advantages of FCP are as follows:
➢ Sustained transmission bandwidth over long distances.
➢ Support for a larger number of addressable devices over a network.
➢ Theoretically, FC can support over 15 million device addresses on a network.
➢ Exhibits the characteristics of channel transport and provides speeds up to 8.5
Gb/s (8 GFC).
Fibre Channel Protocol Stack
➢ It is easier to understand a communication protocol by viewing it as a structure of
independent layers.
➢ FCP defines the communication protocol in five layers:FC-0 through FC-4 (except FC-3
layer, which is not implemented).
➢ In a layered communication model, the peer layers on each node talk to each other
through defined protocols.
➢ Fig 2.9 illustrates the fibre channel protocol stack.
➢ FC-4 Upper Layer Protocol
➢ FC-4 is the uppermost layer in the FCP stack.
➢ This layer defines the application interfaces and the way Upper Layer Protocols
(ULPs) are mapped to the lower FC layers.
➢ The FC standard defines several protocols that can operate on the FC-4 layer (see
Fig 2.9). Some of the protocols include SCSI, HIPPI Framing Protocol, Enterprise
Storage Connectivity (ESCON), ATM, and IP.
➢ FC-2 Transport Layer
➢ The FC-2 is the transport layer that contains the payload, addresses of the source
and destination ports, and link control information.
➢ The FC-2 layer provides Fibre Channel addressing, structure, and organization
of data (frames,sequences, and exchanges). It also defines fabric services,
classes of service,flow control, and routing.
➢ FC-1 Transmission Protocol
➢ This layer defines the transmission protocol that includes serial encoding and
decoding rules, special characters used, and error control.
➢ At the transmitter node, an 8-bit character is encoded into a 10-bit transmissions
character.
➢ This character is then transmitted to the receiver node.
➢ At the receiver node, the 10-bit character is passed to the FC-1 layer, which
decodes the 10-bit character into the original 8-bit character.
➢ FC-0 Physical Interface
➢ FC-0 is the lowest layer in the FCP stack.
➢ This layer defines the physical interface, media, and transmission of raw bits.
➢ The FC-0 specification includes cables, connectors, and optical and electrical
parameters for a variety of data rates.
➢ The FC transmission can use both electrical and optical media.
The FC architecture supports three basic interconnectivity options:
1) Point-To-point,
2) Arbitrated Loop (Fc-AL),
3) FC Switched Fabric
Point-to-Point
Point-to-point is the simplest FC configuration — two devices are connected directly to
each other, as shown in Fig.
➢ This configuration provides a dedicated connection for data transmission between nodes.
➢ The point-to-point configuration offers limited connectivity, as only two devices can
communicate with each other at a given time.
➢ It cannot be scaled to accommodate a large number of network devices. Standard DAS uses
point to- point connectivity.
Fibre Channel Arbitrated Loop
➢ In the FC-AL configuration, devices are attached to a shared loop, as shown in Fig 2.5.
➢ FC-AL has the characteristics of a token ring topology and a physical star topology.
➢ In FC-AL, each device contends with other devices to perform I/O operations. Devices on
the loop must “arbitrate” to gain control of the loop.
➢ At any given time, only one device can perform I/O operations on the loop.
➢ FC-AL implementations may also use hubs whereby the arbitrated loop is physically
connected in a star topology.
The FC-AL configuration has the following limitations in terms of scalability:
➢ FC-AL shares the bandwidth in the loop.
➢ Only one device can perform I/O operations at a time. Because each device in a loop
has to wait for its turn to process an I/O request, the speed of data transmission is
low in an FC-AL topology.
➢FC-AL uses 8-bit addressing. It can support up to 127 devices on a loop.
➢Adding or removing a device results in loop re-initialization, which can
cause a momentary pause in loop traffic.
Fibre Channel Switched Fabric(FC-SW)
➢ FC-SW provides dedicated data path and scalability.
➢ The addition and removal of a device does not affect the on-going traffic between other
devices.
➢ FC-SW is referred to as Fabric connect.
➢ A Fabric is a logical space in which all nodes communicate with one another in a network.
This virtual space can be created with a switch or a network of switches.
➢ Each switch in a fabric contains a a unique domain identifier, which is part of the fabric’s
addressing scheme.
➢ In a switched fabric, the link between any two switches is called an Interswitch link (ISL).
➢ ISLs enable switches to be connected together to form a single, larger fabric.
➢ ISLs are used to transfer host-to-storage data and fabric management traffic from one switch to
another.
➢ By using ISLs, a switched fabric can be expanded to connect a large number of nodes.
➢ A Fabric may contain tiers.
➢ The number of tiers in a fabric is based on the number of switches between two points that
are farthest from each other.
Virtual Storage Provisioning
➢ Virtual provisioning enables creating and presenting a LUN with more capacity than
is physically allocated to it on the storage array.
➢ The LUN created using virtual provisioning is called a thin LUN to distinguish it
from the traditional LUN.
➢ Thin LUNs do not require physical storage to be completely allocated to them at the
time they are created and presented to a host.
➢ Physical storage is allocated to the host “on-demand” from a shared pool of physical
capacity.
➢ A shared pool consists of physical disks.
➢ A shared pool in virtual provisioning is analogous to a RAID group, which is a
collection of drives on which LUNs are created.
➢ Similar to a RAID group, a shared pool supports a single RAID protection level.
However, unlike a RAID group, a shared pool might contain large numbers of drives.
➢ Shared pools can be homogeneous (containing a single drive type) or heterogeneous
(containing mixed drive types, such as flash, FC, SAS, and SATA drives).
➢ Virtual provisioning enables more efficient allocation of storage to hosts.
➢ Virtual provisioning also enables oversubscription, where more capacity is presented
to the hosts than is actually available on the storage array.
➢ Both shared pool and thin LUN can be expanded non-disruptively as the storage
requirements of the hosts grow.
➢ Multiple shared pools can be created within a storage array, and a shared pool may be
shared by multiple thin LUNs.
Jump to Page : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53