Wednesday, July 3, 2013

Network Operating System

Network Operating System 

A network operating system is a collection of software and associated protocols that allow a set of autonomous computers which are interconnected by a computer network to be used together in a convenient and cost-effective manner. In a network operating system, the users are aware of existence of multiple computers and can log in to remote machines and copy files from one machine to another machine.

Some of typical characteristics of network operating systems which make it different from distributed operating system are the followings:

Each computer has its own private operating system instead of running part of a global system wide operating system. 
Each user normally works on his/her own system; using a different system requires some kind of remote login, instead of having the operating system dynamically allocate processes to CPUs. 
Users are typically aware of where each of their files are kept and must move file from one system to another with explicit file transfer commands instead of having file placement managed by the operating system.
The system has little or no fault tolerance; if 5% of the personnel computers crash, only 5% of the users are out of business.

Network operating system offers many capabilities including:

-Allowing users to access the various resources of the network hosts

-Controlling access so that only users in the proper authorisation are allowed to access particular resources.

-Making the use of remote resources appear to be identical to the use of local resources

-Providing up-to-the minute network documentation on-line.

The key issue that distinguishes a network operating system from a distributed one is how aware the users are of the fact that multiple machines are being used. This visibility occurs in three primary areas; file system, protection and program execution.

File System: The important issue in file system is related to how a file is placed on one system from another in a network. 'Mere are two important approaches to this problem.

1. Running a special file transfer program

2. Specifying a path name

Running a special file transfer program: When connecting two or more systems together, the first issue that must be faced is how to access the rile system available on some other system. To deal with this issue user runs a special file transfer program that copies the needed remote file to the local machine, where they can then be accessed normally. Sometimes remote printing and mail is also handled this way. One of the best known examples of network that primarily support file transfer and mail via special programs is the UNIX's uucp  program and its network USENET.

Path name specification: The second approach in this direction is that programs from one machine can open files on another machine by providing a path name telling where the file is located. 

Software

Software 

Software components of a computer system have no physical presence, they are stored in digital form within computer memory. There are different categories of software, including system softwareutilities and applications software. Software can also be described as being either generic or bespoke.
System software is the software used to manage and control the hardware components and which allow interaction between the hardware and the other types of software. The most obvious type of system software is the computer's operating system but device drivers are also included within this category.
Utility software is software such as anti-virus software, firewalls, disk defragmenters and so on which helps to maintain and protect the computer system but does not directly interface with the hardware.
Applications software (also known as 'apps') are designed to allow the user of the system complete a specific task or set of tasks. They include programs such as web browsers, office software, games and so on. They are usually the reason you bought the computer system in the first place and aren't concerned with the management or maintenance of the system itself.
Any individual software package, whichever of the above types it falls into, can be either generic   or it can be bespoke .Generic software is mass produced with the intention that it will be used by a wide variety of different users in a range of different situations. Bespoke software is created for a specific purpose which will be used in a known environment.
Often generic software is used when there is a package available that meets the needs of the user. Because it is used by many more people the cost of creating it is spread over a greater number of people or organisations and so the cost to the individual is much lower. It also has the advantage that it is available immediately there's no waiting time involved while the software package is designed, created and tested. Bespoke software has the advantage that it can be tailor made to exact specifications but it significantly more expensive and will take time to create.


Advantages of Distributed Operating Systems

Advantages of Distributed Operating Systems

There are three important advantages in the design of distributed operating system:

1. Major breakthrough in microprocessor technology: Micro- processors have become very much powerful and cheap, compared with mainframes and minicomputers, so it has become attractive to think about designing large systems consisting of small processors. These distributed systems clearly have a price/performance advantages over more traditional systems.

2. Incremental Growth: The second advantage is that if there is a need of 10 per cent more computing power, one should just add 10 per cent more processors. System architecture is crucial to the type of system growth, however, since it is hard to give each user of a personal computer another 10 per cent.

3. Reliability: Reliability and availability can also be a big advantage; a few parts of the system can be down without disturbing people using the other parts; On the minus side, unless one is very careful, it is easy for the communication protocol overhead to become a major source of inefficiency.

Now let us see how file system, protection and program execution are supported in distributed operating system.

File System: Distributed operating system supports a single global file system visible from all machines. When this method is used, there is one directory for executable programs (in UNIX, it is bin directory), one password file and so on. When a program wants to read the password file it does something like

Open (*/etc/password", READ-ONLY) 

without reference to where the file is. It is upto the operating system to locate the file and arrange for transport of data as they are needed.

The convenience of having a single global name space is obvious. In addition, this approach means that operating system is free to move files around among machines to keep all the disks generally full and busy and that the system can maintain replicated copies of files if it chooses. When the user or program must specify the machine name, the system cannot decide on its own to move a file to a new machine because that would change the (user visible) name used to access the file. Thus in a network operating system, control over file placement must be done manually by the users, whereas in a distributed operating system it can be done automatically by the system itself. 

Protection: In a true distributed system there is a unique UID for every user, and that UID should be valid on all machines without any mapping. In this way no protection problems arise on remote access to files; a remote access can be treated like a local access with the same UID. There is a difference between network operating system and distributed operating system in implementing protection issue. In networking operating system, there are various machines, each with its own user to UID mapping but in distributed operating system there is a single systemwide mapping that is valid everywhere.

Program Execution: In the most distributed case the system chooses a CPU by looking at the processing load of the machine, location of file to be used etc. In the least distributed case, the system always run the process on one specific machine.

An important difference between network and distributed operating system is how they are implemented. A common way to realise a networking operating system is to put a layer of software on top of the native operating system of the individual machines. For example one could write a special library package that could intercept all the system calls and decide whether each one was local or remote. 

Advantages of NI Real-Time Technology

Seamlessly Deploy to a Wide Variety of Targets
At any time during the development process, simply click on the Lab VIEW run arrow to automatically download and test your application on any NI real-time hardware target. You can choose from rugged automation controllers, high-performance computing systems, single-board computers, or even generic PCs. All NI real-time targets feature a fully integrated software stack that includes the real-time operating system, I/O drivers, and network communication.


Take Advantage of Multicore Technology

Lab VIEW automatically analyzes your real-time program and runs parallel sections of code on different processor cores. In addition, you can optimize your processing by targeting important routines to specific processors, and perform low-level debugging using the NI Real-Time Execution Trace Toolkit.

Connect with Real-World I/O in Minutes
Choose from dozens of I/O modules, including A/D and high-speed digital, to customize your real-time measurement or control system. NI hardware can connect to virtually any industry-standard device from CAN to EtherCAT.

Real-Time systems

Real-Time systems

  • Real-Time systems span several domains of computer science.
  • They are defense and space systems, networked multimedia systems, embedded automotive electronics etc.
  • In a real-time system the correctness of the system behaviour depends not only the logical results of the computations, but also on the physical instant at which these results are produced.
  • A real-time system changes its state as a function of physical time, e.g., a chemical reaction continues to change its state even after its controlling computer system has stopped.
  • Based on this a real-time system can be decomposed into a set of subsystems i.e., the controlled object, the real-time computer system and the human operator.
  • A real-time computer system must react to stimuli from the controlled object within time intervals dictated by its environment.
  • The instant at which a result is produced is called a deadline. If the result has utility even after the deadline has passed, the deadline is classified as soft, otherwise it is firm.
  • If a catastrophe could result if a firm deadline is missed, the deadline is hard. Commands and Control systems, Air traffic control systems are examples for hard real-time systems.
  • On-line transaction systems, airline reservation systems are soft real-time systems 

Tuesday, July 2, 2013

Tiff

Definition:
  • A TIFF file, or TIF file, stands for Tagged Image File Format. 
  • TIFF files are a common file format for images, especially those used on graphic design. 
  • The file extension for a TIFF file is either .tiff or .tif.
  • TIFF files are commonly used in print design and desktop publishing because they can store large, high quality images such as photos. 
  • Often, printers will prefer or require TIFF files.
  • TIFF files are raster images and platform independent, meaning they will work on various operating systems such as Mac and Windows. 
  • The format was developed in 1986 by Aldus Corporation and scanner manufacturers.
  • TIFF files are larger than JPEG files, but they retain the full quality of the image
  • TIFF is an abbreviation for Tagged Image File Format.JPEG is used to make your image files smaller, and to store
  • 24-bit-per-pixel color data instead of 8-bit-per-pixel data.TIFF format is a lossless compression compared to JPEG 

Student Details

C Programs

// Student Details

#include
#include
void main()
{
char name[20];
int m1,m2,total;
clrscr();
printf(“enter the student name\n”);
scanf(“%s”,&name);
printf(“enter the m1,m2\n”);
scanf(“%d,%d”,&m1,&m2);
total=m1+m2;
printf(“\n total:%d”,total );
getch();
}
output:
enter the student name
uma
enter the m1,m2
120
80

total:200

Basic C programs

Basic C programs

DEMO PROGRAMS
Program:1
#include
#include
void main()
{
clrscr()
printf(“welcome to techcorner computer centre”);>
getch();
}
output:
welcome to techcorner computer centre

program:2
#include
#include
void main()
{
char name[20];
int age;
float height;
clrscr();
printf(“enter ur name\n”);
scanf(“%s”,&name);
printf(“enter ur age\n”);
scanf(“%d”,&age)
printf(“enter ur height\n”);
scanf(“%f”,&height);
printf(“name                   :%s”,name);
printf(“age                      :%d”,age);
printf(“height                  :%f”,height);
getch();
}
OUTPUT:
Enter ur Name
Uma
Enter ur Age
20
Enter ur Height
6.2
Name : Uma
Age    : 20
Height :6.2

ARITHMETIC FUNCTIONS
Program:3
#include
#include
void main()
{
int a,b,c,tot;
clrscr();
printf(“enter a value\n”);
scanf(“%d”,&a);
printf(“enter b value\n”);
scanf(“%d”,&b);
printf(“enter c value\n”);
scanf(“%d”,&c);
tot=a+b+c;
printf(“total      %d”,tot);
getch();
}
OUTPUT:
Enter a value
50
Enter b value
30
Enter c value
20

Total:100

Internet Protocol

Internet Protocol



  • IP addresses 32 bit addresses (divided into 4 octets) used by the Internet Protocol  for delivering packet to a device located in same or remote network. 
  • MAC addres is a globally unique address which represents the network card and cannot be changed. 
  • IP address refers to a logical address, which is a configurable address used to identify which network this host belongs to and also a network specific host number. 
  • In other words, an IP V4 address consists of two parts, a network part and a host part.
  • This can be compared to your home address. 
  • A letter addressed to your home address will be delivered to your house because of this logical address. 
  • If you move to another house, your address will change, and letters addressed to you will be sent to your new address.
  • IP addresses are stored internally as binary numbers but they are represented in decimal numbers because of simplicity.
  • An example of IP address is 192.168.10.100, which is actually 11000000.10101000.00001010.01100100.
  • For Each network, one address is used to represent the network and one address is used for broadcast. Network address is an IP address with all host bits are "0". Broadcast address is an IP address with all host bits are "1".
  • That means, for a network, the first IP address is the network address and the last IP address is the broadcast address. 
  • All the usable IP addresses in any IP network are between network address and broadcast address.
  • We can use the following equation for find the number of usable IP addresses in a network
  • Number of usable IP addresses = (2n)-2. Where "n" is the number of bits in host part.
  • Many IP addresses are reserved and we cannot use those IP address. 
  • There are five IP address Classes and certain special addresses.

Default Network

  • The IP address of 0.0.0.0 is used for the default network. When a program sends a packet to an address that is not added in the on the computer's routing table, the packet is forwarded to the gateway for 0.0.0.0, which may able to route it to the correct address.

Class A IP addresses


  • "Class A" IP addresses are for very large networks. The left most bit of the left most octet of a "Class A" network is reserved as "0". 
  • The first octet of a "Class A" IP address is used to identify the Network and the three remaining octets are used to identify the host in that particular network.
  • The 32 bits of a "Class A" IP address can be represented as 0xxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx.
  • The minimum possible value for the leftmost octet in binaries is 00000000 (decimal equivalent is 0) and the maximum possible value for the leftmost octet is 01111111 (decimal equivalent is 127). Therefore for a "Class A" IP address, leftmost octet must have a value between 0-127 (0.X.X.X to 127.X.X.X).
  • The network 127.0.0.0 is known as loopback network. The IP address 127.0.0.1 is used by the host computer to send a message back to itself. It is commonly used for troubleshooting and network testing.
  • Computers not connected directly to the Internet need not have globally-unique IP addresses. 
  • They need an IP addresses unique to that network only. 10.0.0.0 network belongs to "Class A" is reserved for private use and can be used inside any organization.

Class B IP addresses


  • "Class B" IP addresses are used for medium-sized networks. 
  • Two left most bits of the left most octet of a "Class B" network is reserved as "10". 
  • The first two octets of a "Class B" IP address is used to identify the Network and the remaining two octets are used to identify the host in that particular network.
  • The 32 bits of a "Class B" IP address can be represented as 10xxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx.
  • The minimum possible value for the leftmost octet in binaries is 10000000 (decimal equivalent is 128) and the maximum possible value for the leftmost octet is 10111111
  • Therefore for a "Class B" IP address, leftmost octet must have a value between 128-191 (128.X.X.X to 191.X.X.X).
  • Network 169.254.0.0 is known as APIPA (Automatic Private IP Addresses). 
  • APIPA range of IP addresses are used when a client is configured to automatically obtain an IP address from the DHCP server was unable to contact the DHCP server for dynamic IP address.
  • Networks starting from 172.16.0.0 to 172.31.0.0 are reserved for private use.

Class C IP addresses


  • "Class C" IP addresses are commonly used for small to mid-size businesses. 
  • Three left most bits of the left most octet of a "Class C" network is reserved as "110". 
  • The first three octets of a "Class C" IP address is used to identify the Network and the remaining one octet is used to identify the host in that particular network.
  • The 32 bits of a "Class C" IP address can be represented as 110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx.

Class D IP addresses


  • Class D IP addresses are known as multicast IP addresses. Multicasting is a technique developed to send packets from one device to many other devices, without any unnecessary packet duplication. 
  • In multicasting, one packet is sent from a source and is replicated as needed in the network to reach as many end-users as necessary. You cannot assign these IP addresses to your devices.
  • Four left most bits of the left most octet of a "Class D" network is reserved as "1110". 
  • The other 28 bits are used to identify the group of computers the multicast message is intended for.


Class E IP addresses


  • Class E is used for experimental purposes only and you cannot assign these IP addresses to your devices.
  • Four left most bits of the left most octet of a "Class E" network is reserved as "1111".

Limited Broadcast



  • 255.255.255.255 is used to send messages to all devices in the LAN and this IP addrress is known as limited broadcast IP address.

IP Classes


IP Classes
Class A 
Class A addresses always have the first bit of their IP addresses set to “0”. Since Class A networks have an 8-bit network mask, the use of a leading zero leaves only 7 bits for the network portion of the address, allowing for a maximum of 128 possible network numbers, ranging from 0.0.0.0 – 127.0.0.0. Number 127.x.x.x is reserved for loopback, used for internal testing on the local machine.
Class B 
Class B addresses always have the first bit set to “1” and their second bit set to “0”. Since Class B addresses have a 16-bit network mask, the use of a leading “10” bit-pattern leaves 14 bits for the network portion of the address, allowing for a maximum of 16,384 networks, ranging from 128.0.0.0 – 181.255.0.0.
Class C 
Class C  addresses have their first two bits set to “1” and their third bit set to “0”. Since Class C addresses have a 24-bit network mask, this leaves 21 bits for the network portion of the address, allowing for a maximum of 2,097,152 network addresses, ranging from 192.0.0.0 – 223.255.255.0.

Class D
Class D addresses are used for multicasting applications. Class D addresses have their first three bits set to “1” and their fourth bit set to “0”. Class D addresses are 32-bit network addresses, meaning that all the values within the range of 224.0.0.0 – 239.255.255.255 are used to uniquely identify multicast groups. There are no host addresses within the Class D address space, since all the hosts within a group share the group’s IP address for receiver purposes.

Class E
Class E addresses are defined as experimental and are reserved for future testing purposes. They have never been documented or utilized in a standard way.


IP Addresses


IP Addresses
  • Systems are locate each other in a distributed environment, nodes are given explicit addresses that uniquely identify the particular network the system is on and uniquely identify the system to that particular network. 
  • When these two identifiers are combined, the result is a globally-unique address.
  • This address, known as “IP address”, as “IP number”, or merely as “IP” is a code made up of numbers separated by three dots that identifies a particular computer on the Internet. 
  • These addresses are actually 32-bit binary numbers, consisting of the two sub addresses mentioned above which, respectively, identify the network and the host to the network, with an imaginary boundary separating the two. 
  • An IP address is, as such, generally shown as 4 octets of numbers from 0-255 represented in decimal form instead of binary form.
  • For example, the address 168.212.226.204 represents the 32-bit binary number 10101000.11010100.11100010.11001100.
  • The binary number is important because that will determine which class of network the IP address belongs to. 
  • The Class of the address determines which part belongs to the network address and which part belongs to the node address .
  • The location of the boundary between the network and host portions of an IP address is determined through the use of a subnet mask. 
  • This is another 32-bit binary number which acts like a filter when it is applied to the 32-bit IP address. 
  • By comparing a subnet mask with an IP address, systems can determine which portion of the IP address relates to the network and which portion relates to the host. 
  • Anywhere the subnet mask has a bit set to “1”, the underlying bit in the IP address is part of the network address. Anywhere the subnet mask is set to “0”, the related bit in the IP address is part of the host address.
  • The size of a network is a function of the number of bits used to identify the host portion of the address. 
  • If a subnet mask shows that 8 bits are used for the host portion of the address block, a maximum of 256 host addresses are available for that specific network. 
  • If a subnet mask shows that 16 bits are used for the host portion of the address block, a maximum of 65,536 possible host addresses are available for use on that network.
  • An Internet Service Provider (ISP) will generally assign either a static IP address or a dynamic address.
  • ISPs and organizations usually apply to the Inter NIC for a range of IP addresses so that all clients have similar addresses.
  • There are about 4.3 billion IP addresses. The class-based, legacy addressing scheme places heavy restrictions on the distribution of these addresses.
  • TCP/IP networks are inherently router-based, and it takes much less overhead to keep track of a few networks than millions of them.

Monday, July 1, 2013

Benefits of Virtual Memory

                                       Virtual Memory



In the Virtual Memory the Physical Memory will be treated as the Logical Memory. Means with the help of virtual Memory we can also increase the size of Logical Memory as from the Physical Memory. 
A user will see or feels that all the Programs are running into the Logical Memory of the Computer. 
With the help of virtual Memory all the Space of Hard Disk can be used as the Logical Memory So that a user can execute any Number of programs. The various benefits of the virtual Memory are :-

1) Unused Address space: With the help of Unused Address Space a user can execute any number of programs because all the actual Addresses will be treated as the logical Addresses. All the Programs those are given by the user will be Stored into the Disk Space and all the Programs will be Stored into the Physical Address Space but they will treat as they are Stored into the Logical Address Space.

2) Increased degree of Multiprogramming: - With the help of Virtual Memory we can Execute Many Programs at a Time because Many Programs can be fit in the Physical Memory So that More Programs can be Stored into the Memory but this will not increase the Response Time of the CPU Means this will not affect on the Execution of the Programs.

3) Decrease Number of I/O Operations: There will be less Operations those are to be used for performing the Swapping of the Processes. All the Programs will be automatically will be loaded into the Memory when they are needed.

But always remember that the Whole Programs are never to be Copied into the Memory Means all the Programs will be Copied into the Form of Pages Means the Parts of the Programs.


Virtual Memory

Virtual Memory     

   


A cache stores a subset of the address space of RAM. An address space is the set of valid addresses. 
Each address in cache, there is a corresponding address in RAM. This subset of addresses  changes over time, based on the behaviour of your program.
Cache is used to keep the most commonly used sections of RAM in the cache, where it can be accessed quickly. 
This is necessary because CPU speeds increase much faster than speed of memory access.
One way to extend the amount of memory accessible by a program is to use disk. Thus, we can use 10 Megs of disk space. At any time, only 1 Mega resides in RAM.


  • The real problem with disk is that it's really, really slow to access. 
  • If registers can be accessed in 1 nanosecond, and cache in 5 ns and RAM in about 100 ns, then disk is accessed in fractions of seconds. It can be a million times slower to access disk than a register.
  • The advantage of disk is it's easy to get lots of disk space for a small cost.


Uses of Virtual Memory

  • Virtual memory is an old concept. Before computers had cache, they had virtual memory. Initially, virtual memory meant the idea of using disk to extend RAM. Programs wouldn't have to care whether the memory was "real/RAM" memory  or disk. 
  • Virtual memory was used as a means of memory protection. Every program uses a range of addressed called the address space.
  • The assumption of operating systems developers is that any user program can not be trusted. 
  • User programs will try to destroy themselves, other user programs, and the operating system itself. That seems like such a negative view, however, it's how operating systems are designed. 
  • Programs can be accidentally malicious 
  • Virtual memory can help there too. It can help prevent programs from interfering with other programs.


How Virtual Memory Works

  • When a computer is running, many programs are simulataneously sharing the CPU. 
  • Each running program, plus the data structures needed to manage it, is called a process.
  • Each process is allocated an address space. 
  • This is a set of valid addresses that can be used. This address space can be changed dynamically. 
  • If a process tries to access an address that is not part of its address space, an error occurs, and the operating system takes over, usually killing the process.

How doesAddresses are generated  in one of three ways:
  • A load instruction
  • A store instruction
  • Fetching an instruction

  • Load/store create data addresses, while fetching an instruction creates instruction addresses. Of course, RAM doesn't distinguish between the two kinds of addresses. 
  • Each address generated by a program is considered virtual. It must be translated to a real physical address. Thus, address tranlation is occuring all the time. As you might imagine, this must be handled in hardware, if it's to be done efficiently.
  • You might think translating each address from virtual to physical is a crazy idea, because of how slow it is. However, you get memory protection from address translation, so it's worth the hardware needed to get memory protection.


HTML

HTML
  • Developed by Tim Berners-Lee in 1990, HTML is short for HyperText Markup Languageand is a language used to create electronic documents, especially pages on the World Wide Web that contain connections called hyperlinks to other pages. 
  • Every web page you see on the Internet, including this one contains HTML code that helps format and show text and images in an easy to read format.
  • The first DOC Type line describes what encoding the page uses. Next, the HTML tag begins letting the browser know that HTML code is being used until it is terminated at the end of the page. 
  • Next, the head section contains header information about the page, which will almost always contain the title of the page and the meta tags. 
  • Finally, the body section is all content that is viewable on the browser.



  • HTML5 is the update made to HTML from HTML4.
  • It uses the same basic rules as HTML4, but adds some new tags and attributes which allow for better semantics and for dynamic elements that are activated using JavaScript
  • New elements include section, article, aside, header, hgroup, footer, nav, figure, figcaption, video, audio, track, embed (different usage), mark, progress, meter, time, ruby, rt, rp, bdi, wbr, canvas, command, details, datalist, keygen, and output. There are new input types for forms, which include tel, search, url, email, datetime, date, month, week, time, datetime-local, number, range, and color.

  • A number of elements have been removed due to being presentational elements, accessibility issues, or lack of use. These should no longer be used: basefont, big, center, font, strike, tt, frame, frameset, noframes, acronym, applet, isindex, and dir.