Wednesday, June 16, 2010



The introduction of the Extensible Markup Language, or XML as it is commonly known, created a buzz in the Web world. It "provides both a standards-based way to identify the information that is of importance in a particular application, and the ability to process information tagged according to highly user-specific requirements with general-purpose software, such as editing tools, composition engines, and electronic browsers" (Usdin & Graham, 1998). In simpler terms, XML allows users to customize a markup language and apply it to an information object that can then be interpreted to determine its contents, whether it is an order form, a newspaper or an advertisement. Given these descriptions, it becomes apparent that XML is a tool, an enabling technology that can be used in conjunction with other tools to provide powerful Web applications. How this tool can be customized and utilized by the Web community is the subject of this tutorial.

XML's roots lie in the Standard Generalized Markup Language, or SGML. SGML was developed 20 years ago as a formal method of annotating documents to describe their meaning and structure, but it's complexity and cost hindered widespread acceptance. However, a subset of SGML called the Hypertext Markup Language, or HTML, is a phenomena that has enabled the rapid growth of the Web over the past decade. Used primarily for stylistic and formatting purposes, HTML has caused anxiety for many of its users who were interested in utilizing its tag set for more complex presentation control, data processing and programming (Treese, 1998). Because of these issues, the World Wide Web Consortium, or W3C, started a working group for a new subset of SGML, XML, in January 1997. The group "proposed a markup language that could work in concert with existing Web technologies, using some of the tools developed for use with HTML, while moving forward with more manageable techniques" (St. Laurent, 1999). A year later, in February 1998, the XML specification was ratified as a W3C standard.

While XML has its foundation in SGML, its philosophy differs and is based on four fundamental principles (Usdin & Graham, 1998).

1. Separation of Content from Format: What a piece of information is should be managed separately from how the information is presented. Information should be identifiable by its appearance, its use in a particular application, its role in the document in which it is contained, and its nature. For example, "knowing that a phrase is in italic is useful; knowing that it is the title of a subsection of a paper is more useful; and knowing that it is a genus and species name is potentially more useful still."
2. Hierarchical Data Structures: In XML, the data is assumed to be hierarchically organized, that is, a piece of information may contain other pieces of information and may be contained by yet another piece of information. Textual documents often exemplify this type of structure. For example, a book contains several chapters, each of which contains sections. Each section may have a heading, paragraphs and subsections, which also contain a heading and paragraphs.
3. Embedded Tags: The data marked up with XML contains tags, words or phrases enclosed in point brackets, which identify where the data structures begin and end. These tags can also have attributes, which provide information about the data enclosed by the tags. Example: < tag attribute="value"> content
4. User-Definable Structures: As mentioned above, XML is a tool, and it defines a method of customized tag creation. "XML assumes that users will create new tags as they create and work with documents, and that software such as browsers will have to display or process the content of these novel tags." As such, XML provides flexibility and extensibility by not providing a standard tag set like HTML.

Components of XML

The basic components of XML are similar to that of HTML: tags, elements and their attributes. A tag is a piece of markup such as an opening tag <P> and a closing tag This text is part of a paragraph element.
It includes the <B>bold element and
the <I>italics element.

The paragraph above has 6 tags comprising 3 elements, 2 of which are contained within the paragraph element. The paragraph element also contains an attribute specifying that the paragraph should be centered on the page. This style of markup is used in the creation of XML documents, which can be of two types: well-formed and valid.

A well-formed document is syntactically correct but does not refer to a Document Type Definition (DTD) that specifies tag requirements and allows the document to be validated. Syntactical correctness includes:

* utilizing a root element
* providing closing tags for all opening tags
* placing quotes around all attribute values
* ensuring the same case is maintained throughout the tags

A valid XML document is well formed and complies with the guidelines of a DTD, which defines a tag set. The DTD can be part of the XML document, or it can be referred to by the XML document. To create a DTD, please refer to the Creating a DTD section of this tutorial.

The convergence of the XML document and the DTD provides content for the browser (in this case, Internet Explorer 5) to interpret and display. The and the make up the prolog of the XML document, or "the glue that binds DTDs to the code that applies to them" (St. Laurent, 1999). The first statement tells the browser the version of XML in use, and the second statement provides the filename of the DTD, whether it is a system or public DTD, and its location/file name on the system. A system DTD is one that has been developed for a particular Web site or business, while a public DTD has been developed for use by types of organizations (e.g. advertising, newspapers etc.). The DTD defines the available elements and attributes which can be incorporated to comprise the logical structure of a single XML document or document groups.

The contents of an XML document must be formatted by using a stylesheet such as XSL (Extensible Style Language). Using a stylesheet adds another layer of complexity to the XML document display process. In the XML document, a line is added below the line that contains a reference to the XSL formatting file such as,
A valid XML document reflects the collaboration of the DTD, XSL stylesheet and the XML document contents. The document contents can be created by marking up text in a text editor or generated through a database. To generate a valid, formatted XML document from an Access database, please refer to the Creating an XML Document section of this tutorial.

Tuesday, June 15, 2010


What is a computer Network?

A network is any collection of independent computers that communicate with one another over a shared network medium.A computer network is a collection of two or more connected computers. When these computers are joined in a network, people can share files and peripherals such as modems, printers, tape backup drives, or CD-ROM drives. When networks at multiple locations are connected using services available from phone companies, people can send e-mail, share links to the global Internet, or conduct video conferences in real time with other remote users. As companies rely on applications like electronic mail and database management for core business operations, computer networking becomes increasingly more important.

Every network includes:

* At least two computers Server or Client workstation.
* Networking Interface Card's (NIC)

Types of Networks:
LANs (Local Area Networks)

WANs (Wide Area Networks)




MANs (Metropolitan area Networks)

The refers to a network of computers with in a City.
VPN (Virtual Private Network)

VPN uses a technique known as tunneling to transfer data securely on the Internet to a remote access server on your workplace network. Using a VPN helps you save money by using the public Internet instead of making long–distance phone calls to connect securely with your private network. There are two ways to create a VPN connection, by dialing an Internet service provider (ISP), or connecting directly to Internet.
Categories of Network:
Peer to Peer and Server/Client NetworkNetwork can be divided in to two main categories:

* Peer-to-peer.
* Server – based.

In peer-to-peer networking there are no dedicated servers or hierarchy among the computers. All of the computers are equal and therefore known as peers. Normally each computer serves as Client/Server and there is no one assigned to be an administrator responsible for the entire network.

Peer-to-peer networks are good choices for needs of small organizations where the users are allocated in the same general area, security is not an issue and the organization and the network will have limited growth within the foreseeable future.

The term Client/server refers to the concept of sharing the work involved in processing data between the client computer and the most powerful server computer.
The client/server network is the most efficient way to provide:

* Databases and management of applications such as Spreadsheets, Accounting, Communications and Document management.
* Network management.
* Centralized file storage.

The client/server model is basically an implementation of distributed or cooperative processing. At the heart of the model is the concept of splitting application functions between a client and a server processor. The division of labor between the different processors enables the application designer to place an application function on the processor that is most appropriate for that function. This lets the software designer optimize the use of processors--providing the greatest possible return on investment for the hardware.

Client/server application design also lets the application provider mask the actual location of application function. The user often does not know where a specific operation is executing. The entire function may execute in either the PC or server, or the function may be split between them. This masking of application function locations enables system implementers to upgrade portions of a system over time with a minimum disruption of application operations, while protecting the investment in existing hardware and software.
OSI ModelThe OSI Model:

Open System Interconnection (OSI) reference model has become an International standard and serves as a guide for networking. This model is the best known and most widely used guide to describe networking environments. Vendors design network products based on the specifications of the OSI model. It provides a description of how network hardware and software work together in a layered fashion to make communications possible. It also helps with trouble shooting by providing a frame of reference that describes how components are supposed to function.

There are seven to get familiar with and these are the physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and the application layer.

* Physical Layer, is just that the physical parts of the network such as wires, cables, and there media along with the length. Also this layer takes note of the electrical signals that transmit data throughout system.
* Data Link Layer, this layer is where we actually assign meaning to the electrical signals in the network. The layer also determines the size and format of data sent to printers, and other devices. Also I don't want to forget that these are also called nodes in the network. Another thing to consider in this layer is will also allow and define the error detection and correction schemes that insure data was sent and received.
* Network Layer, this layer provides the definition for the connection of two dissimilar networks.
* Transport Layer, this layer allows data to be broken into smaller packages for data to be distributed and addressed to other nodes (workstations).
* Session Layer, this layer helps out with the task to carry information from one node (workstation) to another node (workstation). A session has to be made before we can transport information to another computer.
* Presentation Layer, this layer is responsible to code and decode data sent to the node.
* Application Layer, this layer allows you to use an application that will communicate with say the operation system of a server. A good example would be using your web browser to interact with the operating system on a server such as Windows NT, which in turn gets the data you requested.

Network Architectures:
Ethernet Network ArchitectureEthernet

Fast Ethernet

Token Ring ArchitectureToken Ring


FDDI architectureFDDI

FDDI (Fiber-Distributed Data Interface) is a standard for data transmission on fiber optic lines in a local area network that can extend in range up to 200 km (124 miles). The FDDI protocol is based on the token ring protocol. In addition to being large geographically, an FDDI local area network can support thousands of users.



Some Important Protocols and their job:
Protocol Acronym Its Job
Point-To-Point TCP/IP The backbone protocol of the internet. Popular also for intranets using the internet
Transmission Control Protocol/internet Protocol TCP/IP The backbone protocol of the internet. Popular also for intranets using the internet
Internetwork Package Exchange/Sequenced Packet Exchange IPX/SPX This is a standard protocol for Novell Network Operating System
NetBIOS Extended User Interface NetBEUI This is a Microsoft protocol that doesn't support routing to other networks
File Transfer Protocol FTP Used to send and receive files from a remote host
Hyper Text Transfer Protocol HTTP Used for the web to send documents that are encoded in HTML.
Network File Services NFS Allows network nodes or workstations to access files and drives as if they were their own.
Simple Mail Transfer Protocol SMTP Used to send Email over a network
Telnet Used to connect to a host and emulate a terminal that the remote server can recognize
Introduction to TCP/IP Networks:

TCP/IP-based networks play an increasingly important role in computer networks. Perhaps one reason for their appeal is that they are based on an open specification that is not controlled by any vendor.
What Is TCP/IP?

TCP stands for Transmission Control Protocol and IP stands for Internet Protocol. The term TCP/IP is not limited just to these two protocols, however. Frequently, the term TCP/IP is used to refer to a group of protocols related to the TCP and IP protocols such as the User Datagram Protocol (UDP), File Transfer Protocol (FTP), Terminal Emulation Protocol (TELNET), and so on.
The Origins of TCP/IP

In the late 1960s, DARPA (the Defense Advanced Research Project Agency), in the United States, noticed that there was a rapid proliferation of computers in military communications. Computers, because they can be easily programmed, provide flexibility in achieving network functions that is not available with other types of communications equipment. The computers then used in military communications were manufactured by different vendors and were designed to interoperate with computers from that vendor only. Vendors used proprietary protocols in their communications equipment. The military had a multi vendor network but no common protocol to support the heterogeneous equipment from different vendors
Net work Cables and Stuff:

Thick Coaxial Cable

Thin Coaxial Cable

Fiber Optic Cable

Twisted Pair Cables

These come in two flavors of unshielded and shielded.
Unshielded Twisted Pair and Shielded Twisted Pair
Shielded Twisted Pair (STP)



Unshielded Twisted Pair (UTP)

Ethernet Cabling






Network Topologies:
What is a Network topology?

A network topology is the geometric arrangement of nodes and cable links in a LAN,

There are three topology's to think about when you get into networks. These are the star, rind, and the bus.

Star, in a star topology each node has a dedicated set of wires connecting it to a central network hub. Since all traffic passes through the hub, the hub becomes a central point for isolating network problems and gathering network statistics.

Ring, a ring topology features a logically closed loop. Data packets travel in a single direction around the ring from one network device to the next. Each network device acts as a repeater, meaning it regenerates the signal

Bus, the bus topology, each node (computer, server, peripheral etc.) attaches directly to a common cable. This topology most often serves as the backbone for a network. In some instances, such as in classrooms or labs, a bus will connect small workgroups


Ethernet Products:



Network Interface CardsNetwork Interface Cards:





Network Type Max Nodes
Per Segment Max Distance
Per Segment
2 100m
Adding Speed:



Bridges are also called "store-and-forward" devices because they look at the whole Ethernet packet before making filtering or forwarding decisions. Filtering packets, and regenerating forwarded packets enable bridging technology to split a network into separate collision domains. This allows for greater distances and more repeaters to be used in the total network design.
Ethernet Switches
Ethernet Switches:



What is a network firewall?

A firewall is a system or group of systems that enforces an access control policy between two networks. The actual means by which this is accomplished varies widely, but in principle, the firewall can be thought of as a pair of mechanisms: one which exists to block traffic, and the other which exists to permit traffic. Some firewalls place a greater emphasis on blocking traffic, while others emphasize permitting traffic. Probably the most important thing to recognize about a firewall is that it implements an access control policy. If you don't have a good idea of what kind of access you want to allow or to deny, a firewall really won't help you. It's also important to recognize that the firewall's configuration, because it is a mechanism for enforcing policy, imposes its policy on everything behind it. Administrators for firewalls managing the connectivity for a large number of hosts therefore have a heavy responsibility.
Network Design Criteria:




Fast Ethernet Copper Fiber
No Repeaters
One Class I Repeater
One Class II Repeater
Two Class II Repeaters 100m
205m 412m*
* Full Duplex Mode 2 km


Types of Servers:
Device Servers

A device server is defined as a specialized, network-based hardware device designed to perform a single or specialized set of server functions. It is characterized by a minimal operating architecture that requires no per seat network operating system license, and client access that is independent of any operating system or proprietary protocol. In addition the device server is a "closed box," delivering extreme ease of installation, minimal maintenance, and can be managed by the client remotely via a Web browser.

Print servers, terminal servers, remote access servers and network time servers are examples of device servers which are specialized for particular functions. Each of these types of servers has unique configuration attributes in hardware or software that help them to perform best in their particular arena.
Print Servers

Print servers allow printers to be shared by other users on the network. Supporting either parallel and/or serial interfaces, a print server accepts print jobs from any person on the network using supported protocols and manages those jobs on each appropriate printer.

Print servers generally do not contain a large amount of memory; printers simply store information in a queue. When the desired printer becomes available, they allow the host to transmit the data to the appropriate printer port on the server. The print server can then simply queue and print each job in the order in which print requests are received, regardless of protocol used or the size of the job.
Multiport Device Servers

Devices that are attached to a network through a multiport device server can be shared between terminals and hosts at both the local site and throughout the network. A single terminal may be connected to several hosts at the same time (in multiple concurrent sessions), and can switch between them. Multiport device servers are also used to network devices that have only serial outputs. A connection between serial ports on different servers is opened, allowing data to move between the two devices.

Given its natural translation ability, a multi-protocol multiport device server can perform conversions between the protocols it knows, like LAT and TCP/IP. While server bandwidth is not adequate for large file transfers, it can easily handle host-to-host inquiry/response applications, electronic mailbox checking, etc. And it is far more economical than the alternatives of acquiring expensive host software and special-purpose converters. Multiport device and print servers give their users greater flexibility in configuring and managing their networks.

Whether it is moving printers and other peripherals from one network to another, expanding the dimensions of interoperability or preparing for growth, multiport device servers can fulfill your needs, all without major rewiring.
Access Servers

While Ethernet is limited to a geographic area, remote users such as traveling sales people need access to network-based resources. Remote LAN access, or remote access, is a popular way to provide this connectivity. Access servers use telephone services to link a user or office with an office network. Dial-up remote access solutions such as ISDN or asynchronous dial introduce more flexibility. Dial-up remote access offers both the remote office and the remote user the economy and flexibility of "pay as you go" telephone services. ISDN is a special telephone service that offers three channels, two 64 Kbps "B" channels for user data and a "D" channel for setting up the connection. With ISDN, the B channels can be combined for double bandwidth or separated for different applications or users. With asynchronous remote access, regular telephone lines are combined with modems and remote access servers to allow users and networks to dial anywhere in the world and have data access. Remote access servers provide connection points for both dial-in and dial-out applications on the network to which they are attached. These hybrid devices route and filter protocols and offer other services such as modem pooling and terminal/printer services. For the remote PC user, one can connect from any available telephone jack (RJ45), including those in a hotel rooms or on most airplanes.
Network Time Servers

A network time server is a server specialized in the handling of timing information from sources such as satellites or radio broadcasts and is capable of providing this timing data to its attached network. Specialized protocols such as NTP or udp/time allow a time server to communicate to other network nodes ensuring that activities that must be coordinated according to their time of execution are synchronized correctly. GPS satellites are one source of information that can allow global installations to achieve constant timing.
IP Addressing:




140 .179 .220 .200


Address Classes:







Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine. [You can test this: you should always be able to ping, which points to yourself] Class D addresses are reserved for multicasting. Class E addresses are reserved for future use. They should not be used for host addresses.


Class A -- NNNNNNNN.nnnnnnnn.nnnnnnn.nnnnnnn

Class B -- NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn



In order to specify the network address for a given IP address, the node section is set to all "0"s. In our example, specifies the network address for When the node section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. specifies the example broadcast address. Note that this is true regardless of the length of the node section.
Private Subnets:


Subnetting an IP Network can be done for a variety of reasons, including organization, use of different physical media (such as Ethernet, FDDI, WAN, etc.), preservation of address space, and security. The most common reason is to control network traffic. In an Ethernet network, all nodes on a segment see all the packets transmitted by all the other nodes on that segment. Performance can be adversely affected under heavy traffic loads, due to collisions and the resulting retransmissions. A router is used to connect IP networks to minimize the amount of traffic each segment must receive.
Subnet Masking

Applying a subnet mask to an IP address allows you to identify the network and node parts of the address. The network bits are represented by the 1s in the mask, and the node bits are represented by the 0s. Performing a bitwise logical AND operation between the IP address and the subnet mask results in the Network Address or Number.

For example, using our test IP address and the default Class B subnet mask, we get:

10001100.10110011.11110000.11001000 Class B IP Address

11111111.11111111.00000000.00000000 Default Class B Subnet Mask

10001100.10110011.00000000.00000000 Network Address
Default subnet masks:

Class A - - 11111111.00000000.00000000.00000000

Class B - - 11111111.11111111.00000000.00000000

Class C - - 11111111.11111111.11111111.00000000

CIDR -- Classless InterDomain Routing.

CIDR was invented several years ago to keep the internet from running out of IP addresses. The "classful" system of allocating IP addresses can be very wasteful; anyone who could reasonably show a need for more that 254 host addresses was given a Class B address block of 65533 host addresses. Even more wasteful were companies and organizations that were allocated Class A address blocks, which contain over 16 Million host addresses! Only a tiny percentage of the allocated Class A and Class B address space has ever been actually assigned to a host computer on the Internet.

People realized that addresses could be conserved if the class system was eliminated. By accurately allocating only the amount of address space that was actually needed, the address space crisis could be avoided for many years. This was first proposed in 1992 as a scheme called Supernetting.

The use of a CIDR notated address is the same as for a Classful address. Classful addresses can easily be written in CIDR notation (Class A = /8, Class B = /16, and Class C = /24)

It is currently almost impossible for an individual or company to be allocated their own IP address blocks. You will simply be told to get them from your ISP. The reason for this is the ever-growing size of the internet routing table. Just 5 years ago, there were less than 5000 network routes in the entire Internet. Today, there are over 90,000. Using CIDR, the biggest ISPs are allocated large chunks of address space (usually with a subnet mask of /19 or even smaller); the ISP's customers (often other, smaller ISPs) are then allocated networks from the big ISP's pool. That way, all the big ISP's customers (and their customers, and so on) are accessible via 1 network route on the Internet.

It is expected that CIDR will keep the Internet happily in IP addresses for the next few years at least. After that, IPv6, with 128 bit addresses, will be needed. Under IPv6, even sloppy address allocation would comfortably allow a billion unique IP addresses for every person on earth
Examining your network with commands:


PING is used to check for a response from another computer on the network. It can tell you a great deal of information about the status of the network and the computers you are communicating with.

Ping returns different responses depending on the computer in question. The responses are similar depending on the options used.

Ping uses IP to request a response from the host. It does not use TCP

.It takes its name from a submarine sonar search - you send a short sound burst and listen for an echo - a ping - coming back.

In an IP network, `ping' sends a short data burst - a single packet - and listens for a single packet in reply. Since this tests the most basic function of an IP network (delivery of single packet), it's easy to see how you can learn a lot from some `pings'.

To stop ping, type control-c. This terminates the program and prints out a nice summary of the number of packets transmitted, the number received, and the percentage of packets lost, plus the minimum, average, and maximum round-trip times of the packets.

Sample ping session

PING localhost ( 56 data bytes
64 bytes from icmp_seq=0 ttl=255 time=2 ms
64 bytes from icmp_seq=1 ttl=255 time=2 ms
64 bytes from icmp_seq=2 ttl=255 time=2 ms
64 bytes from icmp_seq=3 ttl=255 time=2 ms
64 bytes from icmp_seq=4 ttl=255 time=2 ms
64 bytes from icmp_seq=5 ttl=255 time=2 ms
64 bytes from icmp_seq=6 ttl=255 time=2 ms
64 bytes from icmp_seq=7 ttl=255 time=2 ms
64 bytes from icmp_seq=8 ttl=255 time=2 ms
64 bytes from icmp_seq=9 ttl=255 time=2 ms

localhost ping statistics

10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 2/2/2 ms

The Time To Live (TTL) field can be interesting. The main purpose of this is so that a packet doesn't live forever on the network and will eventually die when it is deemed "lost." But for us, it provides additional information. We can use the TTL to determine approximately how many router hops the packet has gone through. In this case it's 255 minus N hops, where N is the TTL of the returning Echo Replies. If the TTL field varies in successive pings, it could indicate that the successive reply packets are going via different routes, which isn't a great thing.

The time field is an indication of the round-trip time to get a packet to the remote host. The reply is measured in milliseconds. In general, it's best if round-trip times are under 200 milliseconds. The time it takes a packet to reach its destination is called latency. If you see a large variance in the round-trip times (which is called "jitter"), you are going to see poor performance talking to the host

NSLOOKUP is an application that facilitates looking up hostnames on the network. It can reveal the IP address of a host or, using the IP address, return the host name.

It is very important when troubleshooting problems on a network that you can verify the components of the networking process. Nslookup allows this by revealing details within the infrastructure.

NETSTAT is used to look up the various active connections within a computer. It is helpful to understand what computers or networks you are connected to. This allows you to further investigate problems. One host may be responding well but another may be less responsive.

This is a Microsoft windows NT, 2000 command. It is very useful in determining what could be wrong with a network.

This command when used with the /all switch, reveal enormous amounts of troubleshooting information within the system.

Windows 2000 IP Configuration

Host Name . . . . . . . . . . . . : cowder
Primary DNS Suffix . . . . . . . :
Connection-specific DNS Suffix . :
WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Default Gateway . . . . . . . . . :

Traceroute on Unix and Linux (or tracert in the Microsoft world) attempts to trace the current network path to a destination. Here is an example of a traceroute run to

$ traceroute

traceroute to amber.Berkeley.EDU (, 30 hops max, 40 byte packets

1 ( 3.135 ms 3.021 ms 3.616 ms

2 ( 1.829 ms 3.886 ms 2.772 ms

3 ( 5.327 ms 4.597 ms 5.729 ms

4 ( 4.842 ms 4.615 ms 3.425 ms

5 ( 7.488 ms 38.804 ms 7.708 ms

6 ( 6.560 ms 6.631 ms 6.565 ms

7 ( 7.638 ms 7.948 ms 8.129 ms

8 ( 9.504 ms 12.684 ms 16.648 ms

9 ( 9.762 ms 10.611 ms 10.403 ms

10 f0-0.inr-107-eva.Berkeley.EDU ( 11.478 ms 10.868 ms 9.367 ms

11 f8-0.inr-100-eva.Berkeley.EDU ( 10.738 ms 11.693 ms 12.520 ms

Saturday, June 12, 2010


Chapter 1 – Introduction to OS

What is an Operating System?

§       Operating System is a Resource Manager.
      Handles multiple computer resources: CPU, Internal/External memory, Processes, Tasks, Applications, Users, etc…
      Manages and allocates resources to multiple users or multiple jobs running at the same time (e.g., processor time, memory space, I/O devices)
      Arranges to use the computer hardware in an efficient manner (maximize throughput, minimize response time) and in a fair manner.

§       It is a Control Program.
      Manages all the components of a complex computer system in an integrated manner. 
      Controls the execution of user programs and I/O devices to prevent errors and improper use of the computer resources.
      Looks over and protects the computer.

§       It is an extended/virtual machine
-      An interface between the user and hardware that hides the details of the hardware (e.g., I/O).
-      Constructs higher-level (virtual) resources out of lower-level (physical) resources (e.g., files).
-      Definition: Is a collection of software enhancements, executed on the bare hardware, culminating in a high-level virtual machine that serves as an advanced programming environment

Why Operating System?

§       Computer hardware is developed to execute user programs and make solving user problems easier.

§       An operating system makes a computer more convenient to use.
-      It acts as an interface between user and computer hardware. Therefore, the end-users are not particularly concerned with the computer’s architecture, and they view the computer system in terms of an application.
-      To programmers, it provides some basic utilities to assist him in creating programs, the management of files, and the control of I/O devices.

Operating System Objectives

§       Convenience
-      Makes the computer more convenient to use
§       Efficiency
-      Allows computer system resources to be used in an efficient manner
§       Ability to evolve
-      Permit effective development, testing, and introduction of new system functions without interfering with service

Services Provided by Operating Systems

§       Facilities for program creation
-      Editors, compilers, linkers, debuggers, etc.

§       Program execution
-      Loading in memory, I/O and file initialization.

§       Access to I/O and files
-      Deals with the specifics of I/O and file formats.

§       System access
-      Resolves conflicts for resource contention.
-      Protection in access to resources and data.

§       Error detection and response
-      internal and external hardware errors
§       memory error
§       device failure
-      software errors
§       arithmetic overflow
§       access forbidden memory locations
-      operating system cannot grant request of application

§       Accounting
-      collect statistics
-      monitor performance
-      used to anticipate future enhancements
-      used for billing users

Computer System Components

§       A computer system can be divided in to four components.

-      The Hardware: Provides basic computing resources (CPU, memory, I/O devices).

-      The Operating System: Controls and coordinates the use of the hardware among the various application programs for the various users.

-      The Application Programs: Define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs).

-      The Users: Users (people, machines, other computers).

§       These components can be viewed as layers, where each layer uses the services provided by the layer beneath it.


A Static View of System Components

Dynamic View of System Components
Another view of computer system components

History of Operating Systems

§       Let’s see how operating systems evolve over time.
§       This will help us to identify some common features of operating systems and how and why these systems have been developed as they are.

Evolution of Operating Systems

§       Early Systems (1950)
§       Simple Batch Systems (1960)
§       Multiprogrammed Batch Systems (1970)
§       Time-Sharing and Real-Time Systems (1970)
§       Personal/Desktop Systems (1980)
§       Multiprocessor Systems (1980)
§       Networked/Distributed Systems (1980)
§       Handheld Systems (1990)

Early Systems

§       Structure
-      Single user system.
-      Large machines run from console.
-      Programmer/User as operator.
-      Paper Tape or Punched cards.
-      No tapes/disks in computer.

§       Early software: Assemblers, Libraries of common subroutines, Device Drivers, Compilers, Linkers.
§       Significant amount of setup time.
§       Low CPU utilization.
§       But very secure.

Simple Batch Systems

§       Mainframe machines. Input devices were card readers. Output devices were line printer, tape drives, and card punch.
§       A job (a single program+ associated data + control information) usually on the punch cards submitted to the operator.
§       The output consisted of the results of the program or memory dump in case of error.
§       The operator used to batch together similar programs and run as a group to reduce setup time.
§       No user interaction while the job is executing.
§       Current examples include .bat files under Dos – Windows and shell files under Unix/Linux.
Example of card deck of a job

§       The operating systems (called resident monitor) manages the execution of each program in the batch.
-      Monitor utilities are loaded when needed.
-      Resident monitor is always in main memory and available for execution.
-      The resident monitor usually has the following part.
§       Control card interpreter – responsible for reading and carrying out instructions on the cards.
§       Loader – loads systems programs and applications programs into memory.
§       Device drivers – know special characteristics and properties for each of the system’s I/O devices.

§       In batch systems:
-      Initial control is in monitor.
-      Load next program and transfer control to it.
-      When a job completes, the control transfers back to monitor.
-      Automatically transfer control from one job to another (Automatic job sequencing).


§       Slow Performance – I/O and CPU could not overlap; card reader very slow.
§       CPU was often idle.


1.    Off-line Operation
-      Speed up computation by loading jobs into memory from tapes while card reading and line printing is done off-line using smaller machines.

2.    Use spooling (Simultaneous Peripheral Operation On Line).
-      Cards are read directly from the card reader onto a disk and location of card images are kept in a table by the operating system.
-      The output is sent to the disk and when the job is completed then the output was actually printed.
-      I/O and computations were overlapped. While executing one job, the OS:

-      Reads next job from card reader into a storage area on the disk (job queue).
-        Outputs printout of previous job from disk to printer.

Uniprogramming Until Now

§       I/O operations are exceedingly slow (compared to instruction execution).
§       A program containing even a very small number of I/O operations will spend most of its time waiting for them.
§       Hence: poor CPU usage when only one program is present in memory.

Memory Layout of Uniprogramming

Memory layout of a simple batch processing system


Multiprogrammed Batch Systems

§       Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.

§       If memory can hold several programs, then CPU can switch to another one whenever a program is waiting for an I/O to complete – This is multiprogramming.


OS Features Needed for Multiprogramming

§       I/O routine supplied by the system.
§       Memory management – the system must allocate the memory to several jobs.
§       CPU scheduling – the system must choose among several jobs ready to run.
§       Allocation of devices.

Time Sharing Systems (Interactive Systems)

§       TSS extends Batch multiprogramming to handle multiple interactive jobs – It’s Interactive Multiprogramming.
§       Multiple users simultaneously access the system through terminals.
§       Processor’s time is shared among multiple users, that is, the CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory).
§       On-line communication between the user and the system is provided; when the operating system finishes the execution of one command, it seeks the next “control statement” from the user’s keyboard.
§       TS system provides each user with her/her own virtual machine.



§       TS eventually supports multitasking.
§       A time share system that supports multiple processes (program in execution) per user is called a multitasking system.

Why Does Time Sharing Work?

§       Because of slow human reaction time, a typical user needs 2 seconds of processing time per minute.
§       Then many users should be able to share the same system without noticeable delay in the computer reaction time.

Batch Multiprogramming

Vs. Time Sharing

Batch Multi-Prog.
Time Sharing
Principle obj.
Max. Processor use
Min. response time
Source of inst. To OS
JCL provided with the job
Commands entered at the terminal

OS Features Needed for Time Sharing Systems

§       On-line file system must be available for users to access data and code.
§       Should do memory management
§       Should do CPU scheduling
§       Should do job synchronization and have communication facilities.
§       Should ensure that dead lock and indefinite waiting does not occur.
§       Should allow sharing of computer resources.

Personal Computer Systems

§       Personal computers – computer system dedicated to a single user.
§       Have a wide variety of I/O devices – keyboards, mice, display screens, small printers.
§       User convenience and responsiveness are of prime importance.
§       Can adopt technology developed for larger operating system.
§       Often individuals have sole use of computer and do not need advanced CPU utilization of protection features.
§       May run several different types of operating systems (Windows, MacOS, UNIX, Linux)
Two Categories of Computer Systems

§       Single Instruction Single Data (SISD)
-      Single processor executes a single instruction sequence to operate on data stored in a single memory.
-      This is a Uniprocessor.

§       Multiple Instruction Multiple Data (MIMD)
-      A set of processors simultaneously execute different instruction sequences on different data sets.
-      This is a Multiprocessor.

Multiprocessor Systems

§       Multiprocessor systems have more than one CPU in close communication.
-      Tightly coupled system – processors share memory and a clock; communication usually takes place through the shared memory.
§       Advantages of parallel system:
-      Increased throughput
-      Economical
-      Increased reliability
§       Graceful degradation

Multiprocessor architecture

Symmetric Multiprocessing (SMP)

§       Each processor runs an identical copy of the operating system.
§       Each processor can perform the same functions and share same main memory and I/O facilities (symmetric).
§       The OS schedules processes/threads across all the processors (real parallelism).
§       Existence of multiple processors is transparent to the user.
§       Incremental growth: just add another CPU!
§       Robustness: a single CPU failure does not halt the system, only the performance is reduced.
§       Many processes can run at once without performance deterioration.
§       Most modern operating systems support SMP

Asymmetric multiprocessing

§       Each processor is assigned a specific task; master processor schedules and allocated work to slave processors.
§       More common in extremely large systems

Distributed Systems

§       Distribute the computation among several physically separated processors.
-      Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines.
§       Advantages of distributed systems.
-      Resources Sharing
-      Computation speed up – load sharing
-      Reliability and fault tolerance
-      Communications
§       Requires networking infrastructure - Local area networks (LAN) or Wide area networks (WAN)
§       May be either client-server or peer-to-peer systems.


General structure of client-server

Peer-to-peer systems

Network Operating System

§       Provides file sharing
§       Provides communication scheme
§       Runs independently from other computers on the network

Distributed Operating System

§       Less autonomy between computers
§       Gives the impression there is a single operating system controlling the network.

Clustered Systems

§       Clustering allows two or more systems to share external storage and balance CPU load.
§       Asymmetric clustering: one server runs the application while other servers standby.
§       Symmetric clustering: all N hosts are running the application.

Real-Time Systems

§       Note that not all Operating Systems are general-purpose systems.
§       Real-Time (RT) systems are dedicated systems that need to adhere to deadlines, i.e., time constraints.
§       Correctness of the computation depends not only on the logical result but also on the time at which the results are produced.
§       Real-Time systems may be either hard or soft real-time.

Hard Real-Time System

§       Must meet its deadline.
§       Conflicts with time-sharing systems, not supported by general-purpose operating systems.
§       Often used as a control device in a dedicated application such as industrial control and robotics

Soft Real-Time System

§       A critical real-time task gets priority over the other tasks (Deadline desirable but not mandatory).
§       Limited utility in industrial control of robotics
§       Useful in applications (multimedia, virtual reality) requiring advanced operating-system features.

Hand Held Systems

§       Personal Digital Assistants (PDAs)
§       Cellular telephones
§       Issues:
-      Limited memory
-      Slow processors
-      Small display screens.

Migration of Operating-System Concepts and Features