P. 1


|Views: 9,547|Likes:
Published by Arpan Mehta

More info:

Published by: Arpan Mehta on Apr 07, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less






  • Introduction
  • About this Document
  • Target Audience
  • Objectives
  • Pre-requisite
  • Session 1: Introduction to Computer Fundamentals
  • Learning Objectives
  • Computer Generations
  • A typical Computer System
  • Computer Types
  • What is an Operating System
  • OS Objectives
  • OS Functions
  • Evolution of OS
  • Types of Operating Systems
  • OS Layers
  • Test your Understanding
  • Session 2: Introduction to Computer Networking
  • Introduction to Computer Networks
  • Why Networking
  • Network Goals
  • Components of a Computer Network
  • Network Types
  • Classification of computer networks
  • Network Services
  • Session 3: CPU Structure
  • Major Components of CPU
  • Overview of CPU Behavior
  • Instruction Execution
  • Instruction types
  • Fetching a word from Memory
  • Storing Word in Memory
  • Register Transfers
  • Arithmetic Logic Unit
  • Register Gating
  • Timing of Data Transfers
  • Control Unit
  • Hardwired Control
  • Micro programmed Control
  • Control Sequence
  • Microinstructions
  • Intel, AMD
  • Session 4: Operating Systems Management
  • Operating System Components
  • Processes and Process management
  • Process States
  • Process Control Block (PCB)
  • Scheduling: A Few Scenarios
  • Process Scheduling Algorithms
  • Memory Management
  • Memory hierarchy
  • Memory Organization
  • Placement Algorithm
  • Page Replacement Algorithms
  • File System Management
  • File Operations
  • Session 5: I/O Interfacing
  • Overview
  • Accessing I/O Devices
  • Hardware to connect I/O Device to BUS
  • Implementation of I/O operations
  • Programmed I/O
  • Programmed I/O
  • Isolated I/O
  • Interrupt –Driven I/O
  • How to achieve better Speed of Execution?
  • Direct Memory Access (DMA)
  • Block diagram of a computer with Input-Output Processor
  • I/O Management
  • MS-DOS
  • Windows Family
  • Session 6: Network Protocols and Cognizant Network System
  • Protocol Definition
  • The Open Systems Interface (OSI) Reference Model
  • The OSI Layers
  • The Application Layer
  • The Presentation Layer
  • The Session Layer
  • The Transport Layer
  • The Network Layer
  • The Data Link Layer
  • The Physical Layer
  • Introduction to TCP/IP
  • The Four Layers of TCP/IP
  • Transmission Control Protocol
  • Cognizant Network System
  • Session 7: Internetworking and Network Management
  • What Is an Internetwork?
  • Repeaters:
  • Bridges
  • Types of Bridges
  • Transparent Bridge
  • Routers
  • Gateways
  • What is a network firewall?
  • Why would I want a firewall?
  • What can a firewall protect against?
  • What can't a firewall protect against?
  • What about viruses?
  • Network Management
  • Summary:
  • Session 8: Advanced Computing Concepts – A Survey
  • Learning Objective
  • Pipelining
  • Effect of operation that takes more than 1 clock cycle
  • Why can’t the pipeline operate at its maximum theoretical speed?
  • Parallelism
  • Flynn’s Classification
  • Client – Server
  • Architecture
  • Client Server Model
  • Server
  • Server Types
  • File Server
  • Compute Server
  • Database Server
  • Communication Server
  • Multiprocessor Organization
  • Session 9: Case Study – UNIX and WINDOWS XP
  • What is UNIX?
  • Types of UNIX
  • Layered Architecture
  • Kernel
  • UNIX System Calls
  • UNIX User Interface
  • UNIX Shell
  • Basic Form of UNIX Commands
  • UNIX Process Management
  • UNIX CPU Scheduling
  • UNIX Memory Management
  • UNIX File System
  • UNIX I/O Subsystem
  • Network Support in UNIX
  • Windows XP
  • History
  • Design Principles
  • System Components — Kernel
  • Kernel — Process and Threads
  • Kernel — Scheduling
  • Executive — Object Manager
  • Executive — Virtual Memory Manager
  • Executive — Process Manager
  • Executive — Local Procedure Call (LPC) Facility
  • Executive — I/O Manager
  • Executive — Security Reference Monitor
  • File System
  • File System — Security
  • Networking
  • Summary
  • Test Your Understanding
  • References
  • Websites
  • Books

Handout: Fundamentals of Computer Technology

Version: FCT/Handout/0307/2.1 Date: 05-03-07

Cognizant 500 Glen Pointe Center West Teaneck, NJ 07666 Ph: 201-801-0233 www.cognizant.com

Fundamentals of Computer Technology

Introduction ................................................................................................................................7 About this Document..................................................................................................................7 Target Audience.........................................................................................................................7 Objectives ..................................................................................................................................7 Pre-requisite ..............................................................................................................................7 Session 1: Introduction to Computer Fundamentals ................................................................8 Learning Objectives ...................................................................................................................8 Computer Generations...............................................................................................................8 A typical Computer System......................................................................................................11 Computer Types ......................................................................................................................15 What is an Operating System ..................................................................................................15 OS Objectives ..........................................................................................................................16 OS Functions ...........................................................................................................................17 Evolution of OS ........................................................................................................................18 Types of Operating Systems....................................................................................................22 OS Layers................................................................................................................................25 Summary .................................................................................................................................25 Test your Understanding..........................................................................................................25 Session 2: Introduction to Computer Networking...................................................................27 Learning Objectives .................................................................................................................27 Introduction to Computer Networks..........................................................................................27 Why Networking.......................................................................................................................27 Network Goals .........................................................................................................................28 Components of a Computer Network .......................................................................................29 Network Types .........................................................................................................................31 Classification of computer networks.........................................................................................32 Network Services .....................................................................................................................38 Summary .................................................................................................................................41 Test your Understanding..........................................................................................................41 Session 3: CPU Structure .........................................................................................................42 Learning Objectives .................................................................................................................42 Major Components of CPU ......................................................................................................42

Page 2 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology Overview of CPU Behavior ......................................................................................................43 Instruction Execution................................................................................................................44 Instruction types.......................................................................................................................45 Fetching a word from Memory..................................................................................................45 Storing Word in Memory ..........................................................................................................46 Register Transfers ...................................................................................................................46 Arithmetic Logic Unit ................................................................................................................46 Register Gating ........................................................................................................................47 Timing of Data Transfers..........................................................................................................47 Control Unit ..............................................................................................................................47 Hardwired Control ....................................................................................................................48 Micro programmed Control ......................................................................................................48 Control Sequence ....................................................................................................................49 Microinstructions ......................................................................................................................50 Intel, AMD ................................................................................................................................50 Summary .................................................................................................................................51 Test your Understanding..........................................................................................................51 Session 4: Operating Systems Management...........................................................................52 Learning Objectives .................................................................................................................52 Operating System Components ...............................................................................................52 Processes and Process management......................................................................................54 Process States.........................................................................................................................55 Process Control Block (PCB) ...................................................................................................56 Scheduling: A Few Scenarios ..................................................................................................59 Process Scheduling Algorithms................................................................................................60 Memory Management ..............................................................................................................65 Memory hierarchy ....................................................................................................................66 Memory Organization...............................................................................................................69 Placement Algorithm ................................................................................................................73 Page Replacement Algorithms.................................................................................................81 File System Management ........................................................................................................83 File Operations.........................................................................................................................85 Summary .................................................................................................................................95 Session 5: I/O Interfacing ..........................................................................................................96 Learning Objectives .................................................................................................................96 Overview..................................................................................................................................96 Accessing I/O Devices .............................................................................................................97

Page 3 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

...............................................................................................................................................................................................................143 Routers .................102 MS-DOS ...........................................................97 Implementation of I/O operations .................................................98 Isolated I/O ............................................................................................103 Windows Family............................................................................................................................................................................................................116 The Data Link Layer...146 Page 4 ©Copyright 2007...........................................................................................................................................................................................118 The Physical Layer .............................................................................................................................................................109 The Presentation Layer..............................................................................................................................................................................................................................................................................................................121 The Four Layers of TCP/IP ...........................................................................................Fundamentals of Computer Technology Hardware to connect I/O Device to BUS ..................................100 Direct Memory Access (DMA)................... All Rights Reserved C3: Protected ..............................................................................................138 What Is an Internetwork? .......................111 The Network Layer.................................................................................................................................................................................125 Cognizant Network System........................120 Introduction to TCP/IP...........................................................98 Programmed I/O .......111 The Transport Layer ............139 Bridges.................................... Cognizant Technology Solutions.................................................................................................................................................................................................................................106 The OSI Layers..102 I/O Management ..........................................................................................104 Session 6: Network Protocols and Cognizant Network System ...............................................................................................................................122 Transmission Control Protocol ........................................................99 How to achieve better Speed of Execution?..............................................105 Protocol Definition.......................................................................................................................................................................................................................................................................................................110 The Session Layer ................................................................................99 Interrupt –Driven I/O ...........................................................................................................................................137 Session 7: Internetworking and Network Management .................................................................................................................144 Gateways.......................................138 Repeaters: ....................................................................142 Transparent Bridge ......................................................................................100 Block diagram of a computer with Input-Output Processor..........................................................................................................................................................................................................................................105 The Open Systems Interface (OSI) Reference Model ......................................................................................................................................................................................................................................104 Summary .................................................107 The Application Layer .......................................140 Types of Bridges .136 Summary .............................................................................................105 Learning Objectives .............................

...161 Database Server ..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................163 Session 9: Case Study – UNIX and WINDOWS XP ............................................................................................166 UNIX User Interface.....................................................................................................................................................148 Network Management ........................................................................................162 Summary ......................................................................................................................................................................................................169 UNIX Process Management.................................................158 Server ...................................................................................154 Why can’t the pipeline operate at its maximum theoretical speed? .......................................................................167 Basic Form of UNIX Commands ......................................................................................................................................165 Kernel .158 Client Server Model ...................................................................................................................................................................................................................................................... All Rights Reserved C3: Protected ...................................................................................................................148 What about viruses? .........................................................159 Server Types...............................................................................................................................................................................................................................................................................................................................................................................164 Learning Objectives ...........................................................................................................................................................................................167 UNIX Shell .......................164 Layered Architecture....................................................................................165 UNIX System Calls ........172 Page 5 ©Copyright 2007..........157 Architecture.........................................................................................................................................................................................147 What can't a firewall protect against?....................164 What is UNIX? ...............................................................................154 Parallelism .....................163 Test your Understanding..............150 Summary: .......152 Learning Objective ...........................................................164 Types of UNIX............................................................155 Client – Server ................................................................................................................162 Multiprocessor Organization ....161 Communication Server...............................................................................................................................................................................................................................................................................................152 Effect of operation that takes more than 1 clock cycle ......161 Compute Server..............................................................................................................................154 Flynn’s Classification .151 Session 8: Advanced Computing Concepts – A Survey........................159 File Server ..............................................................................................................................................................................................152 Pipelining ..............147 What can a firewall protect against? .....................147 Why would I want a firewall?................... Cognizant Technology Solutions....................................................................................................................................................................................................................................................................Fundamentals of Computer Technology What is a network firewall? .........

........176 UNIX Memory Management...................................................................................188 Networking..............................................184 History........................................................................... All Rights Reserved C3: Protected ............................................................................................................................................................................................ Cognizant Technology Solutions.........................................................................................................................................................................................................................................................................................................................................................................................................................................................187 Executive — Security Reference Monitor...............185 Kernel — Scheduling ................190 Websites .......187 Executive — I/O Manager ....................................................................................................................................186 Executive — Object Manager ................................191 Page 6 ©Copyright 2007...................................188 Summary .....190 Books.................................................................................................................188 File System — Security...............................................................................................................189 Test Your Understanding .......................................................................187 File System .............................................................................................................................................................................................................................................................................190 STUDENT NOTES: .........................................................177 UNIX File System..............................................178 UNIX I/O Subsystem.....................................186 Executive — Process Manager ..........................................................................................................................................................................................................................................185 Design Principles ...................................................................................................................................180 UNIX IPC ..................................................................................................................................................................183 Windows XP ...189 References .......................................187 Executive — Local Procedure Call (LPC) Facility.....................................................185 Kernel — Process and Threads ........................Fundamentals of Computer Technology UNIX CPU Scheduling .................................186 Executive — Virtual Memory Manager.......................................................................................................................................................181 Network Support in UNIX ...............................................................................................................................................................................................................................................................................................................................185 System Components — Kernel ..

Fundamentals of Computer Technology


About this Document This module discusses Fundamental concepts of Computer system, Operating System and Networks Target Audience In-Campus Trainees Objectives Get an Insight into the Computer Technologies Obtain Basic Knowledge of Operating Systems Understand Computer Networking Principles Pre-requisite This module requires that the trainee meet the following prerequisites: Basic knowledge of Computer Fundamentals and Digital Electronics Basic Structure of Computer Hardware and Software

Page 7 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology

Session 1: Introduction to Computer Fundamentals

Learning Objectives After completing this chapter, you will be able to: List various Generations of Computers Explain a typical Computer System Differentiate Types of Computers Define an Operating System Identify Operating Systems available today Computer Generations The Computer Evolution over the period of time has resulted in development of various generations and devices. Different technologies have been used for manufacturing the computer hardware. Based on the component technology, computers are classified into five generations. Each computer generation is characterized by a major technological development that fundamentally changed the way computers operate, architectural structure, resulting in increasingly smaller, cheaper, more powerful and more efficient and reliable devices. The study of these aspects, helps one to distinguish between past and the present dimensions of the computer.

First Generation Computers (1937-1953) These computers were pure hardware machines which contained no Operating System. Programming was done in the machine language which differs from one computer to another. The user deals with several switches in the front panel to start, run or halt the computer. The internal status of the computer is displayed on several lights on the front panel. Invariably only a designer or programmer could operate the computer due to the complexities involved. These machines used electronic switches, in the form of vacuum tubes, instead of electromechanical relays. In principle, the electronic switches would be more reliable, since they would have no moving parts that would wear out, but the technology was still new at that time and the vacuum tubes were comparable to relays in reliability. Electronic components had one major benefit, 1,000 times faster than mechanical switches. they could "open" and "close" about

The earliest attempt to build an electronic computer was by J.V. Atanasoff, a Professor of Physics and Mathematics at Iowa State, in 1937. Atanasoff set out to build a machine that would help his graduate students solve systems of partial differential equations.

Page 8 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology By 1941, he and his graduate student Clifford Berry had succeeded in building a machine that could solve 29 simultaneous equations with 29 unknowns. However, the machine was not programmable, and was more of an electronic calculator. Electronic Numerical Integrator and Calculator(ENIAC) was the first general purpose electronic computer. It was an enormous machine weighing about 30 tons and containing more than 18,000 vacuum tubes.

Second Generation Computers (1954-1962) Transistor Invention by Bell Labs was a boon to second generation computers. Smaller in size and also consumes less power. Several companies such as IBM, NCR, RCA etc. quickly introduced transistor technology which also improved reliability of computers. Instead of ‘wiring’ circuits, photo printing was used to build Printed Circuit Boards (PCB). Both computer production and maintenance of computers became easier. The second generation saw several important developments at all levels of computer system design, from the technology used to build the basic circuits to the programming languages used to develop scientific applications Electronic switches in this era were based on discrete diodes and transistors technology with a switching time of approximately 0.3 microseconds. The first machines to be built with this technology include TRADIC (TRAnsistor DIgital Computer) at Bell Laboratories in 1954 and TX-0 at MIT's Lincoln Laboratory. Memory technology was based on magnetic cores, which could be accessed in random order, as opposed to mercury delay lines, in which data was stored as an acoustic wave that passed sequentially through the medium and could be accessed only when the data moved by the I/O interface. Important innovations in Computer Architecture were index registers for controlling loops and floating point units for calculations based on real numbers. Floating-point operations were performed by libraries of software routines in early computers, but were done in hardware in second generation machines.

Third Generation Computers (1963-1972) Integrated Circuit(IC) chip Invention is a great event for electronics field giving rise to microelectronics. IC has multiple advantages over discrete components: smaller size, higher speed, lower hardware cost, improved reliability etc. Digital computer design became more attractive and interesting. The use of computers in a continuous processing and manufacturing sectors such as petroleum refining and electrical power distribution became popular. The computer families by leading companies such as IBM, UNIVAC, HP,ICL and DEC dominated the computer industry. The third generation brought huge gains in computational power: Integrated Circuits, or ICs (semiconductor devices with several transistors built into one physical component), semiconductor memories instead of magnetic cores, microprogramming for efficiently designing complex processors, pipelining and other forms of parallel processing techniques.
Page 9 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Cognizant Technology Solutions. All Rights Reserved C3: Protected . The development of the next generation of computer systems is characterized mainly by the acceptance of parallel processing. and pipelining (internal parallelism) in both the instruction stream and the data stream.000 transistors. Such small circuits pose many technical problems like the increase in temperature and radiation. 1 GB RAM chips have circuitry so small that it can be measured in terms of atoms. called Fourth Generation computers were based on LSI (Large Scale Integration) of circuits (such as microprocessors) . Expert systems. Until this time. parallelism was limited to pipelining and vector processing. yet incredibly powerful computers. since. The fourth generation is generally viewed as running right up until the present.Fundamentals of Computer Technology Operating System software allowed efficient sharing of a computer system by several user programs. although computing power has increased. Many of the operations which require low human intelligence will be performed by these computers. are some of the sophisticated developments in the field of computers. Later developments included VLSI (Very Large Scale Integration) integrated circuits typically 10. signature capturing and recognition. which had up to 100 devices per chip. By using 10 separate functional units that could operate simultaneously and 32 independent memory banks.typically 500 or more transistors on a chip. the CDC 6600 was able to attain a computation rate of 1 million floating point operations per second (1 MFlops). Seymour Cray developed the CDC 6600. solid state memories. which was the first architecture to use functional parallelism.1984) Computers built after 1972. They will be able to take commands in a audio visual way and carry out instructions. and evolved to the use of Medium-Scale Integrated (MSI) circuits. Computer designers began to take advantage of parallelism by using multiple functional units. Modern circuits may now contain millions of components. which had around 10 devices per circuit (or "chip"). further miniaturization could only achieve so much. This has led to very small. overlapping CPU and I/O operations. pattern recognition. By the late 1990’s many people began to suspect that this technology was reaching its limit. microprocessor controlled robots etc. The first ICs were based on Small-Scale Integration (SSI) circuits. In 1964. Page 10 ©Copyright 2007. Fifth Generation Computers (1984-1990) The use of VLSI and artificial intelligence concept is used in this generation of computers. or at most to a few processors sharing jobs. Fourth Generation Computers (1972. the basic technology has remained virtually the same. Multilayered printed circuits were developed and core memory was replaced by faster. voice recognition.

The fig. Principal is the person who instructs the others to do their corresponding work. All Rights Reserved C3: Protected . Other new developments were the widespread use of Computer Networks and the increasing use of single-user workstations. But he will not do all the work by himself.and semiconductor memories became standard on all computers. A typical Computer System We will see a real life situation.Fundamentals of Computer Technology The fifth generation saw the introduction of machines with hundreds of processors that could all be working on different parts of a single program. Cognizant Technology Solutions. But principal has to instruct the staff working under him to carryout the administrative activity in a satisfactory manner.1: College Management Hierarchy In the above structure.by 1990. Large scale parallel processing was employed in commercial products. Page 11 ©Copyright 2007. The staff members can interact with the students and vice-versa. principal is instructed by the management or government. shows the structure of above. Principal has to depend upon the management or government. In a college. Government or Management Principal Teaching& Non – Teaching Staff Student Fig 1. it was possible to build chips with a million components . Without any knowledge of the management or government he does not take any action. The scale of integration in semiconductors continued at an incredible pace .

Fans. Cognizant Technology Solutions. Coils.3 Shows Components of a Typical Computer System Page 12 ©Copyright 2007. The Mechanical components are Switches. 3. All Rights Reserved C3: Protected . Printer. The Electronic components are Resistors.Teaching Staff ) Users (Students) User 1 User 2 User 3 ……. Fig 1. A Computer System is an arrangement of hardware and software.Fundamentals of Computer Technology From the above example we know what the work of principal is. A Computer system may be divided into four major components 1. 4. and Cables. Transistors. User n Compiler Assembler Text Editor Database System Application Programs Operating System Computer Hardware Fig 1.……. Diodes. Capacitors. ICs. Covers. and CRT. Crystals. Chassis. and other peripherals. The term hardware generally refers to the electronic circuits in the computer. LED. Panels. The main hardware modules are keyboard. Disk Drive. Transformers. The Electrical components are Motors. In practice. Speakers. Hardware( Principal ) Operating System (Management) Application Programs ( Teaching & Non. electrical and electronic assemblies and components.2: Abstract View of the Components of a Computer System The computer is an electronic machine with built-in intelligence to execute the instructions. CRT monitor. the term hardware is used for all physical items in a computer including mechanical. Relays. 2. Now we will compare this with the computer system. PCBs.. Wires. Nuts and Screws. power supplies.

Inventory control program. A system program is a program which helps in efficient utilization of the system by other programs and the users. Computer Software is classified into two types: Application and System Software. Page 13 ©Copyright 2007.Fundamentals of Computer Technology Fig 1. The hardware can be seen visually whereas the software is a logical action plan that is not visually noticeable. library management software. The software is developed to solve a problem and it controls the hardware when the program is executed. Cognizant Technology Solutions. It is generally developed for a given type of computer and it is not concerned with specific application or user. tax calculator. billing software and game programs. All Rights Reserved C3: Protected . Typical examples are: Payroll program. class room scheduler. train reservation software. Operating system and compiler are examples of system software. An application program is a program solving users problems.3: Components of a Typical Computer System Any program is software.

A system bus connects the microprocessor to a main memory based on semiconductor DRAM technology and to an I/O subsystem. which have extremely high capacity and allow sound and video images to be stored and retrieved efficiently.4: A Typical Personal Computer System Another way of looking into a typical personal computer is as shown Fig 1. USB and disk drive units for the hard and flexible (floppy) disk storage devices that constitute secondary memory. display.Fundamentals of Computer Technology M a CPU i n M e Cache m o Bus Interface Unit r y Secondary Memory Video Monitor Keyboard Communication Network I/O Devices IO expansion Hard Disk Control Video Control Keyboard Control Network Control slots I/O (local) bus Peripheral I/O Interface control unit System Bus Fig 1. LCD projectors. a TFT-based or flat-panel video monitor. Cognizant Technology Solutions. The I/O devices of a personal computer include the traditional keyboard. connects the I/O devices and their controllers. At the core of this computer is a single-chip microprocessor such as the Pentium – Dual Core or AMD. More recent additions to the I/O devices include drive units for DVD (Digital Versatile Disk). All Rights Reserved C3: Protected . video scanners. such as network. SCSI and RAID cards. A separate I/O bus. The widely used I/O bus (peripheral bus) used in computers of all sizes. provides a shared data path between the Central Processing Unit (CPU) and peripheral controllers. Other common audiovisual I/O devices in personal computers are microphones. The I/O bus is linked to the system bus via a special bus-to-bus control unit sometimes referred to as a Bridge. The microprocessor’s internal (micro) architecture usually contains a number of speedup features not found in its earlier version. Page 14 ©Copyright 2007. such as the industry standard PCI Express (Peripheral Component Interconnect Express) ‘local” bus. loudspeakers. and webcam which are referred to as multimedia equipments.4.

manages all the other programs in a computer. An operating system (sometimes abbreviated as "OS") is the program that. Most desktops offer more power. World-Wide Web browser or electronic mail client). disk drive or network connection) and application programs (such as word processor. processor. memory and hard disk drive all in a battery-operated package slightly larger than an average hardcover book. They require large power and storage capacity. a pointing device or trackball. The best-known supercomputers are built by Cray Supercomputers. Portable: Is a computer that is designed to be moved from one place to another. additional memory and enhanced capabilities for performing a special group of tasks. The other programs are called applications or application programs. most are comprised of multiple high performance computers working in parallel as a single system. Nearly all desktop computers are modular. after being initially loaded into the computer by a boot program. ERP. monitor. Supercomputers are used for the large-scale numerical calculations required in applications such as weather forecasting and aircraft design and simulation. typically bulk data processing such as census. keyboard. Desktops are currently the most affordable computers. Page 15 ©Copyright 2007. The application programs make use of the operating system by making requests for services through a defined Application Program Interface (API).Fundamentals of Computer Technology Computer Types Mainframe: Mainframes are computers used mainly by large organizations for critical applications. Workstation: A desktop computer that has a more powerful processor. Desktop systems are normally set up in a permanent location. with components that can easily be replaced or upgraded. financial transaction processing. What is an Operating System An Operating System is a software program or set of programs that acts as a central control program for the computer. industry/consumer statistics. such as 3D Graphics or game development. Cognizant Technology Solutions. Although some supercomputers are single computer systems. storage and versatility for less cost than their portable counter parts. Supercomputer: This type of computer usually costs hundreds of thousands or even millions of dollars. Desktop: Is a personal computer made for use on a desk in an office or home. All Rights Reserved C3: Protected .are portable computers that integrate the display. mouse. It mediates access between physical devices (such as keyboard. Also called notebooks/laptops .

convenience and efficiency. shared multiuser systems. An operating system is a control program i. users can interact directly with the operating system through a user interface such as a command language or a graphical user interface (GUI). they are ultimately good for users as their similar interfaces make it easier for users to learn new programs. It is known that sometimes these two goals. A computer system has many resources (hardware and software) that may be required to solve a problem: CPU time. In addition. which provides all the building blocks for the programmer to put together. We can view an operating system as a resource allocator. files storage space. Most operating environments.Fundamentals of Computer Technology A set of routines. Cognizant Technology Solutions. A secondary goal is the efficient operation of a computer system. as necessary for their tasks. memory space. such as MSWindows. are contradictory. provide an API so that programmers can write applications consistent with the operating environment. All Rights Reserved C3: Protected . Fig 1.5: Operating System Interfaces Page 16 ©Copyright 2007.e. protocols. The operating system provides the means for the proper use of these resources in the operation of the computer system. it acts as a controller. OS Objectives The primary goal of an operating system is convenience for the user. Although APIs are designed for programmers. input/output devices etc. software and data. It simply provides an environment within which other programs can do useful work. This program controls the execution of user programs to prevent errors and improper use of the computer. The basic resources of a computer system are provided by its hardware. and tools for building software applications. The operating system acts as the manager of these resources and allocates them to specific programs and users. This goal is particularly important for large.

To provide an interface between the computer hardware and the programmer that simplifies and makes feasible the creation. and z/OS are all examples of operating systems. coding. It sends messages to each application or interactive user (or to a system operator) about the status of operation and any errors that may have occurred. printers. each will get fair and non interfering access to the central processing unit for execution. Provide a loader program to move the complied program code to the computer’s memory for execution. An operating system performs these services for applications: In a multitasking operating system where multiple programs can be running at the same time. the operating system determines which applications should run in what order and how much time should be allowed for each application before giving another application a turn. On computers that can provide parallel processing. All major computer platforms (hardware and software) require and sometimes include an operating system.Fundamentals of Computer Technology OS Functions A computer’s operating system (OS) is a group of programs designed to serve two basic purposes: To control the allocation and use of the computing system’s resources among the various users and tasks. Linux. All Rights Reserved C3: Protected . Assure that when there are several active processes in the computer. It handles input and output to and from attached hardware devices. and maintenance of application programs. Page 17 ©Copyright 2007. debugging. Provide access to compilers to translate programs from high-level languages to machine language. and. VMS. It manages the sharing of internal memory among multiple applications. Take care of storage and device allocation. OS/400. and Permit system resources to be shared among users when appropriate. Cognizant Technology Solutions. Provide for long term storage of user information in the form of files. AIX. Windows 2000. An Operating System do the following: Facilitate creation and modification of program and data files through an editor program. such as hard disks. and dial-up ports. and be protected from unauthorized or mischievous intervention as necessary. an operating system can manage how to divide the program so that it runs on more than one processor at a time. Provide routines that handle the intricate details of I/O programming.

The development of EDVAC set the stage for the evolution of commercial computing and operating system software. and a bit later. it can be generally divided into five distinct time periods. designed by John Atanasoff in 1940. The IBM 701 which was also known as the Defense Calculator. To facilitate the use of the hardware. Perhaps the most significant of these early computers was the Electronic Discrete Variable Automatic Computer(EDVAC). developed and simplified. built by Howard Aiken and a group of IBM engineers at Harvard in 1944. which predated the commercial production and sale of computer equipment. and why they evolved as they are now. and see how. and the Electronic Numerical Integrator And Computer (ENIAC). and Herman Goldstine. Since operating systems have historically been closely tied to the architecture of the computers on which they run. 1951-1956 The first generation marked the beginning of commercial computing. Operating systems and computer architecture have a great deal of influence on each other. the Mark I.Fundamentals of Computer Technology Evolution of OS The History of OS is linked with the development of various computer generations. All Rights Reserved C3: Protected . The actual operation of these early computers took place without be benefit of an operating system. software development. and mode of delivery of computer services. developed in 1944-46 by John von Neumann. including the introduction of Eckert and Mauchly’s UNIVersal Automatic Computer I (UNIVAC I) in early 1951. Arthur Burks. The First Generation. Page 18 ©Copyright 2007. since it was the first to fully implement the idea of the stored program and serial execution of instructions. but it does provide some structure where there would otherwise be none. that are characterized by hardware component technology. The mapping of operating systems to computer generations is admittedly crude. Early programs were written in machine language and each contained code for initiating operation of the computer itself. this period witnessed the emergence of the first electronic digital computers on the Atanasoff-Berry Computer (ABC). By tracing that evolution we can identify the common elements of operating systems. In particular. The Zeroth Generation The term Zeroth Generation is used to refer to the period of development of computing. obtaining their data from specific physical I/O device. designed and constructed at the University of Pennsylvania by Wallace Eckert and John Mauchly. Because the history of computer operating systems parallels that of computer hardware. operating systems were designed. called generations. Operation continued without the benefit of an operating system for a time. and were translated with absolute computer addresses that bound them to be loaded and run from these pre assigned storage addresses set by the translator. The hardware component technology of this period was electronic vacuum tubes. Cognizant Technology Solutions. Application programs were run one at a time.

and a job scheduler and a number of utility programs kept in secondary storage. system protection was a problem because the operating system kernel was not protected from being overwritten by an erroneous application program. for the most part. secured the needed resources. Moreover. executed the first user program. and later to procedure oriented languages. In addition. as long as there were programs waiting in the input queue to be executed. Once the system was loaded. recorded timing and accounting information. In addition. which eliminated some of the human intervention in running a job and provided programmers with a number of desirable functions. Backus in 1956. the development of programming languages was moving away from the basic machine languages. mechanical I/O devices were reading or writing program data. Cognizant Technology Solutions. These systems continued to operate under the control of a human operator who initiated operation by mounting a magnetic tape that contained the operating system executable code onto a “boot device”. and then pushing the IPL (initial program load) or “boot” button to initiate the bootstrap loading of the operating system. some very important changes in hardware and software architectures occurred during this period. computer systems remained card and tape-oriented systems. User application programs were preceded by control or specification cards (in those days. The inefficiencies inherent in the above methods of operation led to the development of the mono programmed operating system. Page 19 ©Copyright 2007. first to assembly language. Similarly. disks. The systems were designed to be operated as batch processing system. For the most part. and so on. a program bound to specific devices could not be run at all if any of these devices were busy or broken down. The most obvious was the inefficient use of system resources. Several problems remained. Program processing was. the most significant being the development of FORTRAN by John W. provided by large centralized computers operated under mono programmed batch processing operating systems. computer program were submitted on data cards) which informed the OS of what system resources (software resources such as compilers and loaders and hardware resources such as tape drives and printer) were needed to run a particular application.Fundamentals of Computer Technology There was no provision for moving a program to a different location in storage for any reason. that is. The second Generation. Significant use of random access devices. which was most evident when the CPU waited while the relatively slower. and then went back to begin processing of another user program. however. did not appear until towards the end of the second generation. the operator entered the date and time. All Rights Reserved C3: Protected . other user programs in the queue were not protected from destruction by executing programs. At the same time. and then initiated the operation of the job scheduler program which read and interpreted the control statements. The OS consisted of a permanently resident kernel in main storage. 1956-1964 (Batch Operating Systems): The second generation of computer hardware was most notably characterized by transistors replacing vacuum tubes as the hardware component technology.

with its high speed electronic component. Cognizant Technology Solutions. the data could be transferred from the buffer locations at the faster main memory access speed rather than the slower I/O device speed. or cardpunch. this communication was handled by polling-the CPU stopped its work periodically and polled the channel to determine if there was any massage. the CPU. All Rights Reserved C3: Protected . It remained for the channel to communicate to the CPU such events as data errors and the completion of a transmission. Towards the end of this period. a program’s output could be written in another buffer and later moved from the buffer to the printer. This problem led to the introduction of the data channel. channel was now able to interrupt the CPU with a message. Thus. when the user’s program came to an input statement. This process was called I/O overlap. Polling was obviously inefficient (imagine stopping your work periodically to go to the post office to see if an expected letter has arrived) and led to another significant innovation of the second generation . interval clocks were added in conjunction with the latter.users saw a virtual machine. Recall that programs were executed by processing the machine instructions in a strictly sequential order.usually “I/O complete. an integral and specialpurpose computer with its own instruction set. the channel independently processed data to or from the buffer. What made this all work was the data channel’s ability to work asynchronously and concurrently with the main processor. The data. the computer system that users saw was more and more removed from the actual hardware . the slower mechanical I/O could be happening concurrently with main program processing. Similarly. The data channel was controlled by a channel program set up by the operating system I/O control routines and initiated by a special instruction executed by the CPU. Then. registers. At first.Fundamentals of Computer Technology The most significant innovations addressed the problem of excessive central processor delay due to waiting for input/output operations. near the end of the first generation. This provided communication from the CPU to the data channel to initiate an I/O operation.the interrupt. as random access devices became available. a program’s input data could be read “ahead” from data cards or tape into a special block of memory called a buffer. That is. Of course. division by zero and time-run-out. Then. As a result. and thus operating system came to have a way of regaining control from an exceptionally long or indefinitely looping program. Page 20 ©Copyright 2007. the interrupt idea was later extended from I/O to allow signaling of number of exceptional conditions such as arithmetic overflow.” In fact. and control unit designed to process input/output operations asynchronously from the operation of the computer’s main CPU. was often forced to wait for completion of I/O operations which involved mechanical devices (card readers and tape drives) that were order of magnitude slower. and its widespread adoption in the second generation. tape. The data channel allowed some I/O to be buffered. tapeoriented operating systems began to be replaced by disk-oriented systems. With the more sophisticated disk hardware and the operating system supporting a greater portion of the programmer’s work.

or cards. The idea of taking fuller advantage of the computer’s data channel. since computers were still very large (room-size) and expensive machines. was replaced by very large scale integration (VLSI). This was a major concern. since systems had only one CPU. Thus. These systems worked by introducing two new systems programs. which characterizes the fourth generation. I/O capabilities continued to develop. Cognizant Technology Solutions. a system reader to move input jobs from cards to disk. the system reader program. which yielded significant advantages in both speed and economy. therefore executes just one instruction at time) required that additional features and complexity be added to the operating system. The net result was an increase in system throughput and resource utilization. to the benefit of both user and providers of computer services. it was possible to keep the slower mechanical I/O device running and minimize the amount of time the CPU spent waiting for I/O completion. But the sequential processing of one job at a time remained a significant limitation. apparent concurrent operation. made possible the development of desktop computers with capabilities exceeding those that filled entire rooms and floors of building just twenty years earlier.1994(Personal Computers and Workstations): The fourth generation is characterized by the appearance of the personal computer and the workstation. developed at MIT during the early 1960s. Miniaturization of electronic circuits and components continued and large-scale integration (LSI). and the system writer program. by switching control of the CPU between the currently executing user program. All Rights Reserved C3: Protected . 1964-1979 (Multiprogramming and Time Sharing Systems): The third generation officially began in April 1964 with IBM’s announcement of its System/360 family of computers. Thus. as before. A noteworthy example is the Compatible Time Sharing System (CTSS). and a system writer to move job output from disk to printer. 1980 . That is. VLSI with its capacity for containing thousands of transistors on a small chip. This concurrent operation of three programs (more properly. Researchers began to experiment with multiprogramming and multiprocessing in their computing services called the time-sharing system. the component technology of the third generation.Fundamentals of Computer Technology The second generation was a period of intense operating system development. Operating system development continued with the introduction and widespread adoption of multiprogramming. Also it was the period for sequential batch processing. The Third Generation. Hardware technology began to use integrated circuits (ICs).the actual I/O data transmission could take place under control of separate and asynchronously operating channel program. The Fourth Generation. Page 21 ©Copyright 2007. designers recognized that I/O needed only to be initiated by a CPU instruction . transparent to the computer user who perceived input as coming directly from the cards and output going directly to the printer. Operation of spooling system was. and could. tape. there continued to be low CPU utilization for I/O bound jobs and low I/O device utilization for CPU bound jobs.

Present and Beyond: Artificial Intelligence Fifth generation computing devices. Fifth Generation . The user. the various users are sharing the central processor. and the computer’s response time may be expected to be no more than a few second. in this environment. the user has no interaction with the job during its processing. and the computer’s response time is the turnaround time-the time from submission of the job until execution is complete. Here. Types of Operating Systems Modern computer operating systems may be classified into three groups. the memory. What in the first generation filled an entire room could now fit in the palm of the hand. As these small computers became more powerful. they could be linked together to form networks. Cognizant Technology Solutions. which are distinguished by the nature of interaction that takes place between the computer user and his or her program during its processing. Quantum computation and molecular and nanotechnology will radically change the face of computers in years to come. In 1981 IBM introduced its first computer for the home user. The goal of fifth-generation computing is to develop devices that respond to natural language input and are capable of learning and self-organization.on a single chip. has nearly full interaction with the program during its execution. and other resources of the computer system in a manner facilitated. Fourth generation computers also saw the development of GUIs. and in 1984 Apple introduced the Macintosh. that are being used today. users submit jobs to a central place where these jobs are collected into a batch. The three groups are called batch. time-shared and real time operating systems. In this case. as thousands of integrated circuits were built onto a single silicon chip. Page 22 ©Copyright 2007. and monitored by the operating system. located all the components of the computer – from the central processing unit and memory to input/output controls . and the results are ready for return to the person who submitted the job. which eventually led to the development of the Internet. though there are some applications. In this environment a computer provides computing services to several or many users concurrently on-line. developed in 1971. and subsequently placed on an input queue at the computer where they will be run. are still in development. controlled. such as voice recognition. The Intel 4004 chip. based on artificial intelligence.Fundamentals of Computer Technology The microprocessor brought the fourth generation of computers. In a batch processing operating system environment. All Rights Reserved C3: Protected . The use of parallel processing and superconductors is helping to make artificial intelligence a reality. the mouse and handheld devices. Another mode for delivering computing services is provided by time sharing operating systems. Microprocessors also moved out of the realm of desktop computers and into many areas of life as more and more everyday products began to use microprocessors.

A networked computing system is a collection of physically interconnected computers. provisions for handing communication and transfer of program and data among the other computers with which it is connected. which handle airlines reservations. even though it is actually composed of multiple processors. term is ‘multiprocessing’. it is evident that a time-sharing system is a multiprogramming system. Thus. A distributed operating system. It is especially common to have a background batch system running in conjunction with one of the other two on the same computer. Examples of real time operating systems are those. and can log in to remote machines and copy files from one machine to another. A number of other definitions are important to gaining an understanding of operating systems: A multiprogramming operating system is a system that allows more than one active user program (or part of user program) to be stored in main memory simultaneously. The systems. providing for more than one of these types of computing services simultaneously. Another important. machine tool control. In a network operating system the users are aware of the existence of multiple computers. In fact. in this case. A multiprocessing system is a computer hardware configuration that includes more than one independent processing unit. and monitoring of a nuclear power station. are designed to service those applications where response time is of the essence in order to prevent error. in contrast. A distributed computing system consists of a number of computers that are connected and managed so that they automatically share the job processing load among the constituent computers. and all too similar. real time operating systems. have more than one active user program simultaneously in main storage. in addition to its own stand-alone functionality. misrepresentation or even disaster. which in addition to the typical stand-alone functionality provides coordination of the operations and information flow among the component computers. Cognizant Technology Solutions. Such a system requires an operating system. In a true distributed system. Each machine runs its own local operating system and has its own user (or users). and indeed usually does. are designed to be interrupted by external signal that require the immediate attention of the computer system. is one that appears to its users as a traditional uniprocessor system. The term multiprocessing is generally used to refer to large computer hardware complexes found in major scientific or commercial applications. that should all be handled automatically and efficiently by the operating system. Page 23 ©Copyright 2007. A batch or real time operating system could. All Rights Reserved C3: Protected . The networked and distributed computing environments and their respective operating systems are designed with more complex functional capabilities. many computer operating systems are hybrids. users should not be aware of where their programs are being run or where their files are located. The operating system of each of the interconnected computers must contain. or separate the job load as appropriate particularly configured processors. but note that a multiprogramming system is not necessarily a time-sharing system.Fundamentals of Computer Technology The third classes of operating systems.

Below are some examples of multiprocessing Operating Systems.An Operating System capable of supporting and utilizing more than one computer processor. Linux UNIX Windows 2000 Multitasking . Below are some examples of multitasking Operating Systems.A multi-user Operating System allows for multiple users to use the same computer at the same time and/or different times. Cognizant Technology Solutions. They obviously need a network interface controller and some low-level software to drive it. Operating systems that would fall into this category are: Linux UNIX Windows 2000 Page 24 ©Copyright 2007. a GUI Operating System contains graphics and icons and is commonly navigated using a computer mouse.Operating systems that allow different parts of a software program to run concurrently. GUI . Below are some examples of multi-user Operating Systems. Many computer Operating Systems will fall into more then one of the below categories given below. but these additions do not change the essential structure of the operating systems. What OSs Are Available Today The list of different types of operating systems and a few examples of Operating Systems that fall into each of the categories. All Rights Reserved C3: Protected . UNIX Windows 2000 Multithreading . as well as programs to achieve remote login and remote files access. Linux UNIX Windows 2000 VMS MVS Multiprocessing .Fundamentals of Computer Technology Network operating systems are not fundamentally different from single processor operating systems.An Operating systems that is capable of allowing multiple software processes to be run at the same time. System 7.Short for Graphical User Interface.x Windows 98 Windows CE Multi-user . Below are some examples of GUI Operating Systems.

Process Management Memory Management Secondary Storage Management I/O System File Management Protection System Networking Command Interpreter System Obviously. Processor 2. speed and cost. The type of system desired is the foundation for choices between various algorithms and strategies that will be necessary. To construct such an environment. Objectives. Mega computers c. All Rights Reserved C3: Protected . The design of a new operating system is a major task. Today’s fastest computers are called: a. Camera d.Fundamentals of Computer Technology Networking OS: Windows 2000 Novell Netware OS Layers An operating system provides the environment within which programs are executed. Functions. will keep the Personal Computer from not functioning? a. Cognizant Technology Solutions. Printer c. Evolution. if missing. Types. C.P. not all systems have the same structure. Scanner b. The Definition of an OS.U. The important modules for an operating system are listed below. b. Layers A few examples of Operating Systems that fall into each of the categories. the system is partitioned into small modules with a well-defined interface. Supercomputers d. Summary Computers have been classified into five generations The various components of a typical computer system The Computer types are determined based on size. Terminals Page 25 ©Copyright 2007. Test your Understanding 1. Which component. It is very important that the goals of the system be well defined before the design begins.

Solaris c. All Rights Reserved C3: Protected . Which of the following is not an Operating System? a. c 5. Why Operating System is called a resource manager? 5.Fundamentals of Computer Technology 3. Sun OS Answer: 1. Cognizant Technology Solutions. Linux b. d 2. What is multitasking and Multiprogramming? 4. MVS (Multiple Virtual Storage) d. c Page 26 ©Copyright 2007.

and so called servers that store and transmit information such as Web (WWW) pages and e-mail messages. Most of these computing devices are traditional desktop PCs. or any other device capable of sending and/or receiving data generated by other nodes on the network. all of these devices are called hosts or end systems. you will be able to Explain computer networks Describe the need for a computer network Identify the classification of computer networks Differentiate network topologies List network services Introduction to Computer Networks Networks are changing the way we do business and the way we live. pagers and toasters are being connected to the Internet. All Rights Reserved C3: Protected . Business decisions have to be made ever more quickly. and the decision makers require immediate access to accurate information. the technology has to be flexible enough to reflect changing configurations. Increasingly. Cognizant Technology Solutions. printer.Fundamentals of Computer Technology Session 2: Introduction to Computer Networking Learning Objectives After completing this session. that is. A node can be a computer. Is a particular design robust enough to handle the growth? Understanding what it does and when to use each type of technology is essential for providing the right system in today’s dynamically changing information management. UNIX based workstations. via the Internet). mobile computers. what types of technology are available and which design best fits which set of needs. A computer network is two or more computers connected together using a telecommunication system for the purpose of communicating and sharing resources.g. But before we ask how quickly we can get hooked up. we need to know how networks operate. The public Internet is a world-wide computer network. via Bluetooth) or thousands of kilometers (e. In the internet jargon. a network that interconnects millions of computing devices throughout the world. Such communicating computer systems constitute a computer network and these networks generally involve at least two devices capable of being networked with at least one usually being a computer.g. non-traditional computing devices such as Web TVs. Why Networking Computer networking is the scientific and engineering discipline concerned with communication between computer systems. The devices can be separated by a few meters (e. When a company adds a new division. Page 27 ©Copyright 2007. A network is a set of devices (often referred to as nodes) connected by links. The links connecting the devices are often called communication channels.

the other copies could be used. banking. Another advantage of network is to provide high reliability by having alternative sources of supply. Initially. This is mainly because the Finance department uses only one machine to do the entire task of payroll processing as only this machine has the database of employees. This imbalance has compelled many systems designers to build systems consisting of powerful personal computers. They would all have to take printouts for various purposes. and do the local payroll. there will be only one printer required which can cater to everybody’s needs. the presence of multiple CPUs means that if one goes down. In effect. and many other applications. management might have decided to connect them to be able to extract and correlate information about the entire company. In case. Mainframes are roughly a factor of ten faster than the fastest single chip microprocessor. all files could be replicated on two or three machines. air traffic control. A company with many factories may have a computer at each location to keep track of inventories. each PC can share information from other PCs. if all the machines are connected in a network in which case. as the number of employees is as large as 80-90 thousand. In addition. Cognizant Technology Solutions. Page 28 ©Copyright 2007. the others may be able to take over its work. In Cognizant HR department. This goal may be summarized by saying that it is an attempt to end the “tyranny of geography”. this signifies what is known as information sharing. For example. This would be expensive and probably it would take some time for the company to provide a separate printer to every machine. If we can make this database available to more machines this would result in faster generation of pay slips. but they cost a thousand times more. This is a slightly more general form of information sharing and the goal is to make all programs. This is what is known as Resource Sharing. the ability to continue operating in the face of hardware problem is of great importance. a third person may administer the HR policies. the computers are not connected. each of these computers may have worked in isolation from others. so if one of them is unavailable (due to hardware failure). although at reduced performance. But at some point. another takes care of leaves availed (balance) by the employees. each of them would need a separate printer. This would lead to delay in work. data and equipment available to anyone on the network without regard to the physical location of the resource and the user. which can be accessed by a number of machines.Fundamentals of Computer Technology Network Goals If we connect all PCs in a network. one per user. In other words. one person looks after the resumes of the employees. A database. This problem can be overcome. Small computers have a much better Price/Performance ratio than large ones. is called a central database and this aspect of network is called Load Sharing. monitor productivity. the mere fact that a user happens to be 1000 km away from his data should not prevent him from using the data as if they were local. The Finance department takes 2-3 days to process the salaries of the employees. with data kept on one or more shared file server machines. For military. Another advantage of a network is that it is cost effective. All Rights Reserved C3: Protected .

Stores.Fundamentals of Computer Technology So. and performs other email related operations for other clients on the network. routes. receives. All Rights Reserved C3: Protected . Types of Workstations There are many types of workstations that may be incorporated into a particular network. Print server . multiple CPUs. and performing most or all of the other functions that a workstation would perform to accomplish a printing task if the printer were connected directly to the workstation's printer port.Controls and manages one or more printers and accepts print jobs from other network clients. Mail Server . etc. or other enhancements required for special data processing tasks. graphics. routes. routing calls between the Public Switched Telephone Network (PSTN) and the network or the Internet (e. receives.. reception. large amounts of RAM..Stores various types of files and distributes them to other clients on the network. prefetching and caching documents or other data that is requested very frequently) or as a security precaution to isolate network clients from external threats.Stores. Remote Access Server (RAS) .g. sends.Performs telephony related functions such as answering calls automatically. or other resource intensive applications. sends. File Server . storing and serving voice mail. Proxy Server .Monitors modem lines or other network communications channels for requests to connect to the network from a remote location.g. Types of Servers The following is a list of some of the more common types of servers and their purpose. some of which have high-end displays.Performs some type of function on behalf of other clients on the network to increase the performance of certain operations (e. Cognizant Technology Solutions. we can list down the benefits of network as: Information sharing Resource sharing Load sharing High reliability Cost effective Components of a Computer Network Many of the components of which an average computer network is composed are individual computers. Telephony Server . and performs other functions necessary for the proper transmission. Fax Server . and distribution of faxes. large amounts of hard drive storage space. and performs the necessary security checks and other procedures necessary to log a user onto the network. answers the incoming telephone call or acknowledges the network request. Page 29 ©Copyright 2007. Voice-over IP (VoIP) gateway). performing the functions of an interactive voice response system. which are generally either workstations or servers.

scripts. Dumb Terminals Many networks use dumb terminals instead of workstations either for data entry and display purposes or in some cases where the application runs entirely on the server. etc. while the workstation performs the user interface or GUI portion of the processing (i. All Rights Reserved C3: Protected . images. switches.Has network backup software installed and have large amounts of hard drive storage or other forms of storage (tape. to act as an intermediary between the printer and the device that is requesting a print job to be completed. routers. Cognizant Technology Solutions. Printers Many printers are capable of acting as part of a computer network without any other device. Page 30 ©Copyright 2007.Stores HTML documents. This type of network is useful for transferring information between two computers that are not normally connected to each other by a permanent network connection or for small home networking applications. and distributes this content to other clients on the network on request.Performs the data processing or business logic portion of a client application. the presentation logic) that is required for the application to work properly. A Simple Network A simple computer network may be constructed from two computers by adding a network adapter (Network Interface Controller (NIC)) to each computer and then connecting them together with a special cable called a crossover cable. Is a computer terminal that has limited functionality? Other Devices There are many other types of devices that may be used to build a network.) available to it to be used for the purpose of insuring that data loss does not occur in the network. bridges. Practical Networks Practical networks generally consist of more than two interconnected computers and generally require special devices in addition to the Network Interface Controller that each computer needs to be equipped with. Web Server . accepting instructions for what operations to perform from a workstation and serving the results back to the workstation. and other Web related data (collectively known as content). hardware firewalls. Backup Server ... text files.Fundamentals of Computer Technology Application Server . etc. such as a print server. many of which require an understanding of more advanced computer networking concepts before they are able to be easily understood (e.e.). hubs.g.

industrial. industrial complex. Cognizant Technology Solutions. but that does not extend beyond the boundaries of the immediate town.Fundamentals of Computer Technology Network Types Below is a list of the more common types of computer networks. a network that uses routers and public communications links. although there are other types that are not listed. For administrative purposes. any network whose communications links cross metropolitan. regional. or a military base. large LANs are generally divided into smaller logical segments called workgroups. such as a router or layer 3 switch. private.. Campus Area Network (CAN) A network that connects two or more LANs but that is limited to a specific (possibly private) geographical area such as a college campus. city. less formally. Note: Any interconnection among or between public. a ship. Page 31 ©Copyright 2007. Internet work Two or more networks or network segments connected using devices that operate at layer 3 (the 'network' layer) of the OSI Basic Reference Model(a layered abstract description for communication and computer network protocol design) . A workgroup is a group of computers that share a common set of resources within a LAN. Local Area Network (LAN) A network that is limited to a relatively small spatial area such as a room.e. or governmental networks may also be defined as an internet work. Distributed: A distributed WAN consists of two or more computers in different locations and may also include connections to dumb terminals and other types of terminal devices. Note: A CAN is generally limited to an area that is smaller than a Metropolitan Area Network (MAN). or metropolitan area. or national boundaries) or. a single building. Wide Area Network (WAN) A network that covers a broad geographical area (i. commercial. Types of WANs: Centralized: A centralized WAN consists of a central computer that is connected to dumb terminals and / or other types of terminal devices. Metropolitan Area Network (MAN) A network that connects two or more LANs or CANs together. All Rights Reserved C3: Protected . or an aircraft.

Department of Defense – also known as the World Wide Web (WWW) or the 'Internet' with a capital 'I' to distinguish it from other generic internet works. the intranet or extranet is normally protected from being accessed from the Internet without proper authorization. an extranet cannot consist of a single LAN. Note: Technically. but if they are connected to the Internet. MAN. Intranet A network or internet work that is limited in scope to a single organization or entity or a network or internet work that is limited in scope to a single organization or entity and which uses one kind network protocol called Transmission Control Protocol/Internet Protocol(TCP/IP) protocol suite. Campus Area Network(CAN).. a company's customers may be provided access to some part of its intranet creating an extranet while at the same time the customers may not be considered 'trusted' from a security standpoint). although the Internet may serve as a portal for access to portions of an extranet. an extranet may also be categorized as a CAN.Fundamentals of Computer Technology Internet: A specific internet work. Metropolitan Area Network(MAN). Wide Area Network(WAN).S. It is interesting to note that Intranets and extranets may or may not have connections to the Internet. trusted organizations or entities (e. public. Note: Intranets may also be categorized as a Local Area Network(LAN). WAN. or other type of network. and the Internet itself is not considered to be a part of the intranet or extranet. and other network protocols and software commonly used on the Internet. Page 32 ©Copyright 2007. by definition. Classification of computer networks By network layer Computer networks may be classified according to the network layer at which they operate according to some basic reference models that are considered to be standards in the industry such as the seven layer OSI reference model and the five layer TCP/IP model. consisting of a worldwide interconnection of governmental. File Transfer Protocol (FTP). Cognizant Technology Solutions. academic. Extranet A network or internet work that is limited in scope to a single organization or entity but which also has limited connections to the networks of one or more other usually. and private networks based upon the Advanced Research Projects Agency Network (ARPANET) developed by ARPA of the U.g. Hyper Text Transfer Protocol (HTTP). since an extranet must have at least one connection with an outside network. although. but not necessarily. All Rights Reserved C3: Protected . or other type of network.

quite often using Carrier Sense Multiple Access or the presence of a bus master which controls access to the shared bus resource. By connection method Computer networks may be classified according to the technology that is used to connect the individual devices in the network such as HomePNA. for example as a Personal area network (PAN). many active architectures can also be described as a "bus". for example. but often have problems when two clients want to transmit at the same time on the same bus. However. Local Area Network. as they provide the same logical functions as a passive bus. We will study different network topologies in detail. or WiFi. Ethernet. Mesh network. or Wide area network (WAN). Thus systems which use bus network architectures normally have some scheme of collision handling or collision avoidance for communication on the bus. Ring network. Star-bus network. Power line communication. Client-server and Peer-to-peer (Workgroup) architectures. By network topology Computer networks may be classified according to the network topology upon which the network is based. Bus Network A bus network is a network architecture in which a set of clients are connected via a shared communications line. By functional relationship Computer networks may be classified according to the functional relationships which exist between the elements of the network. Indeed. Campus area network (CAN). for example Active Networking. Bus networks are the simplest way to connect multiple clients. Note: WLAN is also known as PAN (Personal Area Networking) with wireless connection technologies such as Bluetooth (which has a limited range of approximately 15 meters). Star network. Cognizant Technology Solutions. There are several common instances of the bus architecture. Wireless local area network (WLAN). switched Ethernet can still be regarded as a logical bus network. Metropolitan area network (MAN). such as Bus network. All Rights Reserved C3: Protected . if not a physical one. etc. Page 33 ©Copyright 2007. called a bus. and those in some versions of Ethernet networks.Fundamentals of Computer Technology By scale Computer networks may be classified according to the scale or extent of reach of the network. A true bus network is passive – the computers on the bus simply listen for a signal. Tree topology network. including one in the motherboard of most computers. they are not responsible for moving the signal along. the hardware may be abstracted away completely in the case of a software bus.

One virus in the network will affect all of them (but not as badly as a star or ring network). Cognizant Technology Solutions. Low security (all computers on the bus can see all data transmissions). passive bus networks are uncommon in wired networks.1: Bus Network Advantages Easy to implement and extend Well suited for temporary networks (quick setup) Initially less expensive than other topologies Disadvantages Difficult to administer / troubleshoot. All Rights Reserved C3: Protected .(loop must be in closed path). the entire network goes down. Star network Node Central Station/hub/Computer Fig 2. Proper termination is required. almost all current wireless networks can be viewed as examples of passive bus networks. the amount of data flowing causes the network to slow down.Fundamentals of Computer Technology With the dominance of switched Ethernet over passive Ethernet. If there is a problem with the cable.2: Star Network Layout Page 34 ©Copyright 2007. Entire network shuts down if there is a break in the main cable If many computers are attached. Nodes/Computers Bus Fig 2. However. Limited cable length and number of stations. Performance degrades as additional computers are added or on heavy traffic. with radio propagation serving as the shared passive medium. Maintenance costs may be higher in the long run.

hub or computer which acts as a router to transmit messages. The failure of a transmission line linking any peripheral node to the central node will result in the isolation of that peripheral node from all others. Advantages Good performance Easy to set up and to expand. Ring networks also Page 35 ©Copyright 2007. All peripheral nodes may thus communicate with all others by transmitting to. to and from the central node) plus any delay generated in the central node. The star topology reduces the chance of network failure by connecting all of the systems to a central node. to get from computer one to computer four. the central node only.e. seven. if a given ring network has eight computers on it. sometimes including the originating node. through computers two and three. this central hub rebroadcasts all transmissions received from any peripheral node to all peripheral nodes on the network. All Rights Reserved C3: Protected . the originating node must be able to tolerate the reception of an echo of its own transmission. Ring networks tend to be inefficient when compared to Star networks because data must travel through less no. Any non-centralized failure will have very little effect on the network. If the central node is passive. It could also go from computer one through eight.3: Ring network layout A ring network is a topology of computer networks where each node is connected to two other nodes. a star network consists of one central switch. of points before reaching its destination. and to its destination at computer four. and five until reaching four. so as to create a ring. and receiving from. In its simplest form. data must travel from computer one. but is actually a bus. but this method is slower because it travels through more computers. An active star network has an active central node that usually has the means to prevent echo-related problems. but the rest of the systems will be unaffected. When applied to a bus-based network. Cognizant Technology Solutions. the network topology has the physical appearance of a star. delayed by the two-way transmission time (i. whereas on a ring network it would all fail with one fault Disadvantages Expensive to install Extra hardware required Ring network Fig 2.Fundamentals of Computer Technology Star networks are one of the most common computer network topologies. six. If the network uses a hub. Strictly speaking only networks that use switches have a true star topology. For example.

a very reliable network is formed. (very fast. all computers must be turned on. Advantages Data is quickly transferred without a ‘bottle neck’. As a result. Mobile ad-hoc networking (MANET). featured in many consumer devices. A mesh network whose nodes are all connected to each other is a fully connected network. The token ring network is a ring topology only at the logical level. In order for all computers to communicate with each other. It is difficult to troubleshoot the ring. All Rights Reserved C3: Protected . Mesh networking Fig 2. Total dependence upon the one cable. wired networks. all data traffic is in the same direction) The transmission of data is relatively simple as packets travel in one direction only. This concept is applicable to wireless networks. Adding additional nodes has very little impact on bandwidth It prevents network collisions because of the media access method or architecture required. to add a station you must shut down the network temporarily. is a subsection of mesh networking. It allows for continuous connections and reconfiguration around broken or blocked paths by "hopping" from node to node until the destination is reached.Fundamentals of Computer Technology carry the disadvantage that if one of the nodes in the network breaks down then the entire network will break down with it as it requires a full circle in order to function. it runs on a physical star network. voice and instructions between nodes. using central devices called MSAUs or MAUs.4: Mesh network layout Mesh networking is a way to route data. Mesh networks are self-healing: the network can still operate even when a node breaks down or a connection goes bad. Cognizant Technology Solutions. Disadvantages Data packets must pass through every computer between the sender and recipient therefore this makes it slower. and software interaction. Because all stations are wired together. Page 36 ©Copyright 2007. If any of the nodes fail then the ring is broken and data cannot be transmitted successfully.

544 Mbps to 155 Mbps) transmission. Metropolitan Area Network (MAN) MANs are large computer networks usually spanning a campus or a city. on the 3rd June 2006. Local Area Network (LAN) LAN is a computer network covering a local area. For instance. which is responsible for all the computers to talk to each other through the cables. built by Internet Service Providers (ISP). Many WANs are built for one particular organization and are private. a city. Another disadvantage is that a particular LAN technology may only work with specific computers. A WAN provides other LAN users in distant Page 37 ©Copyright 2007.000 people. Two or more LANs in the same metropolitan area connected together are called MANs. MAN links between LANs have been built without cables using either microwave. higher would be the cost. provide connections from an organization's LAN to the Internet. A NIC (Network Interface Card) may not be compatible to all types of LANs. so that users and computers in one location can communicate with users and computers in other locations.Usually. and they generally are not mobile. It effectively extends a network by sharing access to higher cost network infrastructure. A technology similar to the one used in the Children's Machines is available for use on netgear/x86/Meraki nodes. because a connected node could share the connection with nodes nearby. They typically use wireless infrastructure or optical fiber connections to link their sites. The instantaneous connections made by the laptops are claimed by the project to reduce the need for an external infrastructure such as the internet to reach all areas. MANs connect smaller networks within a campus. It is restricted to inside a floor or at the most a building. Using high-speed (1. A LAN at its simplest consists of two or more computers connected through cables and a Network Operating Software (NOS). a university or a college may have a MAN that joins together many of their local area networks (LANs) situated around the site of a fraction of a square kilometer. Cognizant Technology Solutions. LAN performance determines cost: higher the performance required. office or small group of buildings such as a college. Then from their MAN they could have several Wide Area Network (WAN) links to other universities or the Internet. because the hardware that transmits data faster costs more money. and/or neighboring suburbs. UK. hence the name “local area” network. Also. Mesh networks differ from other networks in that the component parts can all connect to each other via multiple hops. All Rights Reserved C3: Protected . This is obvious. The computers can spread across in the same building or the nearby buildings. radio and internet services to an estimated 80. An MIT project developing Children's Machines for under-privileged schools in developing nation’s plans to use mesh networking to create a robust and inexpensive infrastructure for the students who will receive the laptops. radio. mesh networking was used at the "Strawberry Fair" to run mobile live television. Wide Area Network (WAN) WANs are used to connect Local Area Networks (LANs) together.Fundamentals of Computer Technology A mesh network is a networking technique which allows inexpensive peer network nodes to supply back haul services to other nodes in the same network. or infra-red free-space optical communication links. In Cambridge. LANs are connected through phone company’s data transmission services. One of the main drawbacks of a LAN is its physical limitation. Others. like a home.

In a LAN environment. As Cognizant has several offices across the country and they need to be linked together. or Mail Serving. The best example of a WAN is the Internet. There are several WAN types possible. Cognizant Technology Solutions. It has applications that the users need and the files that are being used by all or some of the users (i. Many incompatible LANs are linked in a WAN. File Services: It is the heart of the LAN. Since a computer can transmit data faster than a printer is capable of putting this information on paper. Generally. especially if you want to expand your offices into other cities. LAN technologies also allow access to other common resources like modems and faxes. All Rights Reserved C3: Protected . The print jobs are kept in a place called the Print Queue. The print server provides the processing power required to poll the queue and determines if there is a job pending to be printed. It recovers the physical limitation of the LAN. a computer prints to a network printer over the LAN cabling. you are required to set up a WAN. a WAN takes up a form in between these two extremes. in case someone tries to print while the printer is busy printing some other print job.Fundamentals of Computer Technology locations with the same information and services that are available to the local LAN users.e. one is their own directories or shared directories and other being restricted for administrative purposes. The queue is typically located in a file server and is used to stage the print jobs prior to printing.. the second print job will be retained in the print queue until the first print job is completed. If this case occurs. the job is sent out of the print server’s LPT port to the printer. Actually. Managing the resources becomes more effective. A very basic WAN can be two computers communicating between each other over a Modem connection. a staging area is required. the concept of a WAN came into existence for the desirability of a single network and WAN was the foundation of the Internet. It can cater to the common user needs in different widespread locations. thus making different LANs being able to talk to each other. building or campus. If one is found. Print Services: These are the servers that have a printer or more than one printer being attached to them. and is generally the case. This is different from Personal Area Networks (PANs). shared). Print Sharing. This is known as spooling a job. We will have a brief look at these services. It is generally divided into two distinct parts. printers. Metropolitan Area Networks (MANs) or Local Area Networks (LANs) that are usually limited to a room. Page 38 ©Copyright 2007. The main advantage of a WAN is its wide span. The resources are utilized properly. such as the security directories or system files. geographically. A print server accepts the print jobs in the order they were sent and stores the files. Then. Most important of them are File Serving. The users may or may not have access permission to all of them. A more complicated one may consist of hundreds of offices connected with high capacity digital circuits. Network Services The basic LAN services include sharing of directories and files. we need to connect all the individual LANs of this company in a WAN. There can be more than one file server. If you maintain a central database or other application like shared documents that all personnel should use.

Username and Password: This is even a more secure model than the previous one. employee database. a remote user can log into the LAN and perform virtually all types of transactions as if he/she was actually sitting in the office. The username authentication method can also be set for these particular files. the remote access functionally has largely improved. All Rights Reserved C3: Protected . To maintain a secure system. Cognizant Technology Solutions. but with recent advancement of speed of modems and phone company services. and divisions of an organization. branches. Distributed computer networks consist of computers connected in such a way that any system can potentially communicate with any other system. operating system files. It includes a server portion maintaining the data files and a workstation portion. Security Features The most important part about a LAN is its security. Today. careful measures should be taken to secure it. LANs are the most common form of networks found in most small businesses and schools. The platform for distributed systems has been the enterprise network linking workgroups. You can access a LAN (by a modem) from a remote location to share files or even perform administrative tasks. Broadcasting an important message to a select group or everyone is possible. Peer-to-Peer Network A LAN typically consists of several computers connected to one another. which are very sensitive and needed to be very secured. such as security directories. The concept of remote access has long been an integral part of LAN.Fundamentals of Computer Technology Application Services: An application server is a software that runs on a NOS and provides direct connectivity to a software program. There are many resources. As all resources are available to everyone in the LAN. Then the same procedure is followed as in the above model. These servers might be at geographically diverse areas. which is used to access and manipulate information stored in the Lotus Notes server. Lotus Notes is a kind of application server. the system checks the list names. A LAN is often created for several computers to share an Page 39 ©Copyright 2007. usually located in close proximity such as a computer lab. departments. Remote Access to LAN: Another important service in LAN is the remote access of the LAN resources. In this model. There are various authentication procedures for a secure LAN. connected by WAN links. Message Services: Announce a call or meeting with a quick message to a colleague or coworker’s computer screen and get a quick reply. the user is required to enter a username and password combination. For example. If the name is already there. but in many servers. users have to prove their identity at least a couple of times. the user is given access to the LAN resources. Database Services: Access to remote data is possible because of Computer Networks. The messaging facility is also customizable. the system has a secure list of users already fed in. Each user can define their own group to simplify sending messages to several users. Data is not located in one server. such as ISDN. Username: In this method. When a user types in his/her name. Application servers usually require that a portion of the software be running on both the server and the workstation at the same time.

These central computers are called file servers. Special software protocols. and Apple’s Local Talk. A centralized computer is used to facilitate the sharing of data and hardware with other computers on the network. Today. Each peer computer can share its resources with the other computers on the network independently. The computers using the file server are called clients. such as Microsoft NetBEUI. Cognizant Technology Solutions. a computer used as the central storage unit for data. In earlier days of networking.Fundamentals of Computer Technology intermittently used resource such as a laser printer. This type of network is the type of network you would most likely find in home networks or small networks comprised of a dozen or less computers. A peer-to-peer network is built without the use of a central server. most LANs used peer-to-peer networking to facilitate communication. Most client/server networks are the type of networks you would find in a corporate or business environment. Easy to implement Resource sharing controlled by users No need of a dedicated network administrator Disadvantages: Low level of security Heavy load on computers because of increased communication traffic Resource sharing Resource sharing controlled by users Size of network limited to approx. Advantages: Strong central security Central file storage Resource sharing controlled by administrators Easy management of large number of users Disadvantages: High cost of server hardware and software Need for a dedicated and well trained network administrator Page 40 ©Copyright 2007. Advantages: Low cost as expensive software and hardware are not required. a peer-to-peer network is a network that does not have a central computer or dedicated server. in other words all computers are independent. 10 Constant attack by people with a variety of motives. All Rights Reserved C3: Protected . LANs often include central server computers. are used for establishing communication across a peer-to-peer network. Also known as a P2P network. Client-Server Network In more complex networks client/server networking is usually employed.

bus d. What are the advantages of computer networks? a. Cognizant Technology Solutions. MAN and WAN The common network services offered by servers are: o File Services o Print Services o Message Services o o Application Services Database Services Test your Understanding 1. d 2. Sharing of applications d. All of the above 2. Efficient management of resources b. ring Answers: 1.Fundamentals of Computer Technology Summary Computer networking provides communication tools to allow computers to share information and abilities Networks can be of the following forms: LAN. star c. c Page 41 ©Copyright 2007. mesh b. All Rights Reserved C3: Protected . Reduced costs c. A tree topology is a variation of ________ topology a.

The phrase "central processing unit" is a description of a certain class of logic machines that can execute computer programs. while Table 3. you will be able to: Explain the major components of CPU Define Registers. ALU and Control Unit Major Components of CPU A central processing unit (CPU).Fundamentals of Computer Technology Session 3: CPU Structure Learning Objectives After completing this module. All Rights Reserved C3: Protected . Register set Control Arithmetic logic Unit (ALU) Fig 3. design and implementation of CPUs have changed dramatically since the earliest examples.1 describes the purpose of the various special purpose registers Page 42 ©Copyright 2007. simply processor. The form.1: Major Components of CPU The major components of the CPU are depicted in Fig 3.1. Cognizant Technology Solutions. A CPU that is manufactured as a single integrated circuit is usually known as a microprocessor. but their fundamental operation has remained same. is the component in a digital computer that interprets computer program instructions and processes data.

2: Interaction between components of CPU Fig 3. Sub would be made active. like Add. Page 43 ©Copyright 2007.2 shows the components that are likely to interact in the process of executing an instruction. Depending on the instruction. at any given time.Fundamentals of Computer Technology Table 3. All Rights Reserved C3: Protected .1 List of special purpose registers for the basic computer Register symbol MDR MAR AC IR PC TEMP INPR OUTR Register name Memory Data Register Memory Address Register Accumulator Instruction Register Program Counter Temporary Register Input Register Output Register Function Holds memory operand Holds address for memory Processor register Holds instruction code Holds address of the instruction Holds Temporary data Holds Input data Holds output data Overview of CPU Behavior Central Processing Unit PC Address lines Memory lines Data lines MDR CPU bus Instruction Decoder MAR IR R0 Y R(n-1) ALU control lines Add Sub AL U Carry-in TEMP XOR Z Fig 3. Cognizant Technology Solutions. one of the ALU controls.

3: Behavior Flow of CPU Fig 3. All Rights Reserved C3: Protected .Fundamentals of Computer Technology Instruction Execution Begin No Are there instructions waiting? Yes Fetch the next instruction Execute the instruction No Are there interrupts waiting? Yes Transfer to interrupthandling program Fig 3. Fetch the instruction from memory. The contents of the memory location pointed by PC are stored in IR IR [[PC]] The instruction is decoded The content of the PC will be incremented so as to point to the next instruction [PC] [PC] + x The operands are fetched from memory. The result is stored Page 44 ©Copyright 2007.3 describes the typical flow of the ways by which the CPU behaves. The specified operation is performed. Cognizant Technology Solutions. The phases of the instruction execution are as follows.

Example 3.Memory Arithmetic instruction: Operates on numeric data Logical instruction: Performs Boolean operations Shift instructions: Shifts to the right or left Data Manipulation instructions: Performs arithmetic. DATA is then available on Data Lines The DATA will be loaded into MDR Example 3.1 describes the various steps involved in the process of fetching a data word pointed to. MDR can be carried out during WAIT period e. All Rights Reserved C3: Protected . PC can be incremented Page 45 ©Copyright 2007. logic and shift operations o o o Program Control instructions: Changes the sequence of instructions o Branch. Cognizant Technology Solutions.Fundamentals of Computer Technology Instruction types Data transfer instructions: Transfers the data from one location to another without changing the contents o o o Register .Register Register .1 R1 -: R2 -: Address of the Memory location Data fetched from Memory Step 1: MAR [R1] Step 2: Read Step 3: Wait for MFC signal (WMFC) Step 4: [R2] [MDR] The duration of step 3 depends on the speed of memory Time for READ from memory is more than the time for performing single operation within the CPU Functions.Memory / Memory –Register Memory . CPU transfers address of the required word to MAR MAR is connected to Address lines of Memory Address is transferred to Memory CPU has to specify the type of operation: READ/ WRITE. as soon as the operation is through. Jump instructions: Conditional / Unconditional I/O instructions: Transfers information between CPU or Memory to and from I/O devices Fetching a word from Memory For fetching a word from Memory.g. by register R1. Here it is a READ operation CPU waits until Memory unit signals the completion of READ operation MFC (Memory Function Completed) Signal becomes ACTIVE. which do not need MAR.

2 describes the various steps involved in the process of writing a data word pointed to.Fundamentals of Computer Technology Storing Word in Memory Storing Word in Memory The address of the data to be written is loaded into MAR The data is loaded into MDR Write command is issued Wait for MFC signal Steps 1 and 2 can be carried out simultaneously for Multiple Bus Structure only Example 3. Input &Output gating is required. Performs arithmetic and logical functions The function performed by ALU depends on signal applied to ALU control lines Can be realized with combinational circuits Does not have internal storage To add 2 numbers. by register R1.Data to be stored in Memory Step 1 MAR Step 2 MDR Step 3 Write Step 4 Wait MFC Register Transfers To enable data transfer between various blocks connected to BUS. Content of R1 will be on Bus R4in = 1. Cognizant Technology Solutions. o o R1out = 1.2 R1: . Transfer of data from R1 to R4 needs the following action. All Rights Reserved C3: Protected . this Loads Data from Bus to R4 [R1] [R2] Arithmetic Logic Unit Performs the required micro operations (operations that are executed in a clock tick) for executing the instructions. both the numbers have to be available at the ALU simultaneously Page 46 ©Copyright 2007. Example 3.Memory address of the data R2: .

Yin R2out. to specify the add operation The SUM of the two numbers is stored in the Temporary Register Z Register Gating Electronic Switches are connected to gates of the Register Functions like Mechanical On/Off switches If the switch is in the ON state. Example 3. Control Unit Design Approaches are: o o Hardwired Control that leads to RISC (Reduced Instruction Set Computer) architecture Micro programmed Control leading to CISC (Complex Instruction Set Computer) architecture Page 47 ©Copyright 2007. R3in In example 3. All Rights Reserved C3: Protected .Fundamentals of Computer Technology Example 3. data is transferred from Register to Bus If the switch is in the OFF state.3 talks about the micro-steps involved in adding the contents of the registers R1 and R2 and placing the sum in the register R3.3. this register is also known as “Tristate switch “ The separate control input is used to enable the Gate O/P to drive the bus to 0. Add Z in Z out. Cognizant Technology Solutions. 0. open circuit.3 R1out. the register output is electrically disconnected from the Bus The output of register-switch circuit can be in one of the 3 States . Register Y contains 1 number The other number is gated onto the BUS Add-line is set to 1.1. 1 or electrically disconnected state (Open circuit) Timing of Data Transfers Finite delay is encountered for the gate to open and for the data to travel along the Bus to ALU Propagation Delay through ALU Adder circuit For the result to be properly stored in register Z. data must be maintained on the bus for some time (Hold time) Control Unit Control unit fetches the instructions from the memory and converts them into a sequence of control signals to implement a sequence of register-transfer operations.

4: Schematic diagram of a Hardwired Control Unit Fig 3.4 describes the scheme of operation of a Hardwired Control Unit. flip-flops. which is hard in general The goal is to minimize the number of components used and maximize the speed of operation It can be optimized to produce a fast mode of operation Hardwired Control Unit Status Signals Sequential logic circuit Control Signals Instruction Register Fig 3. All Rights Reserved C3: Protected . Based on the status of the CPU and the instruction to be executed. where all the control signals are stored in a program like format The microprograms are designed to implement or emulate the behaviour of a given instruction set Each instruction causes the corresponding microprogram to be fetched and its control information extracted in a manner that resembles fetching and execution of a program from the main memory Control signals are organized into formatted words (micro instructions) Design changes can be easily implemented just by changing the contents of the control memory Drawbacks: Costly due to the presence of the control memory and its access circuitry. Micro programmed Control It is built around a storage unit called control memory. decoders and other digital circuits It requires changes in the wiring among the various components if the design is to be changed or modified. appropriate control signals are made ACTIVE. Slower due to the extra time required to fetch micro instructions from the control memory Page 48 ©Copyright 2007.Fundamentals of Computer Technology Hardwired Control The control logic is implemented with gates. Cognizant Technology Solutions.

WMFC MDRout. PC in. In each step. Clear Y. Table 3. IRin R3out. Add. MARin.5: Schematic Diagram of a Microprogrammed Control Unit Control Sequence The seven steps that are involved in the execution of an instruction like (R1) (R1) + ((R3)) by a Microprogrammed Control unit is shown below.5 shows the Schematic diagram of a Microprogrammed control unit Status signals Address Logic Control memory Microinstruction Register Instruction register Decoder Control signals Fig 3. Add. WMFC MDRout. Read.Fundamentals of Computer Technology Fig 3.2 describes the control sequence in the form of their respective microinstructions. MARin. Zin Zout. Zin Zout. Set carry-in to ALU.2 Control Sequence in the form of their respective microperations Step 1 2 3 4 5 6 7 Action PCout. Table 3. Read R1out. All Rights Reserved C3: Protected . more than one microperation can be enabled. Cognizant Technology Solutions. End Page 49 ©Copyright 2007. R1in. Yin.

but may also fetch from cache or main memory. like the Pentium 4 and Athlon64. Page 50 ©Copyright 2007. Multiple-Data Extensions) in the case of Intel processors. to be carried out on an operand—data the processor often stores in registers (temporary internal holding locations). For example. Although compatible microprocessors must produce identical results for identical instructions. Cognizant Technology Solutions. 486. Xeon chips generally have more cache and support larger multiprocessor configurations than their desktop counterparts. decode variable-length x86 instructions into one or a few simpler. multiply. Later generations often add instruction-set enhancements such as MMX (Multimedia Extensions) and SSE (Streaming Single-Instruction. internal designs and operation may be entirely different. The Xeon is Intel's brand name for its server-class PC microprocessors intended for multipleprocessor machines. such as the Intel 386. fixed-length internal instructions called micro-ops. unlike the Pentium 4. the AMD Athlon 64. is another example. or compare.Fundamentals of Computer Technology Microinstructions Clear Y Microinstruc tion 1 2 3 4 5 6 7 Intel. initially decodes an instruction into one or more intermediate macro-ops (complex instructions require several macro-ops). which are ultimately converted into one or more microops. Internal architecture may even differ within CPU families and in succeeding generations of highly compatible processor families. which are not accessible outside the CPU. AMD Cary-in MDRout WMFC 0 1 0 0 1 0 0 MARin Read PCout R3out RIout PCin Add : 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 This generational and chronological list of Intel microprocessors attempts to present all of Intel's processors ( Ps) from the pioneering 4-bit (1971) to the present high-end offerings. like add. All Rights Reserved C3: Protected End Zout IRin RIin Yin Zin . Many CPU instructions specify some operation. which extended the AMD x86 architecture to enable 64-bit instructions and addressing. the 64-bit Itanium 2 (2002) and Intel Core 2 and Xeon 5100 and 7100 series processors (2006). Current CPUs. The brand has been maintained over several generations of processors. Different types of instructions may vary in length. AMD64. and Pentium.

b. the CPU controls and co-ordinates the operation of the other major components. Cognizant Technology Solutions. Among other tasks carried out are the control of input and output devices and the passing of data to the Arithmetic/Logical Unit for computation. The CPU has two main components.GREATER THAN (>). The Arithmetic/Logical Unit (ALU) -. b Page 51 ©Copyright 2007.controls the fetching of instructions from the main memory and the subsequent execution of these instructions. Perform arithmetic operations Generate control signals Generate Interrupt Supervise I/O Operations 2. via the system bus. The data to be processed is obtained. d. and less than (<) between operands. All Rights Reserved C3: Protected .carries out arithmetic operations on integer (whole number) and real (with an r-nary point. CPU cannot perform which of the following task? a. DMA 3. o Test your Understanding 1. c. It can also perform simple logical tests for EQUALITY(= =). Which of the following is not a component of CPU? a. c 2. IR c. PC b. namely: o The Control Unit -. Results from the CPU are then sent back to main memory via the system bus. d 3. ALU c. decimal point) operands. MAR b. PC d. In addition to computation. The internal register that contains the current instruction being executed by the ALU is: a. from the main memory. MAR d.Fundamentals of Computer Technology Summary The Central Processing Unit (CPU) performs the actual processing of data. MBR Answers: 1.

Allocate and de-allocate memory space as needed Page 52 ©Copyright 2007. Decide which processes are loaded into memory when memory space becomes available. Many modern operating systems share the same goal of supporting the following system components. you will be able to: Analyze different OS components Describe Process. An operating system provides the environment within which programs are executed. Each word or byte has its own address. To construct such an environment. Each and every module has its own input. Main memory provides storage that can be accessed directly by the CPU. The major activities of an operating system in regard to memory management are: Keep track of which part of memory are currently being used and by which user’s process. All Rights Reserved C3: Protected . Process states and Process Control Blocks Explain the different Scheduling Algorithms Identify how operating systems perform memory allocations to different processes Identify how the OS manages Files and Directories using File System Operating System Components The operating system provides an abstraction of the computer’s resources to simplify the programmer’s job of creating application programs. it must be in the main memory. The creation and deletion of both user and system processes The suspension or resumption of processes. output and functions and all OS need not have the same structure. Process Management The operating system is responsible for the following activities in connection with processes managed.Fundamentals of Computer Technology Session 4: Operating Systems Management Learning Objectives After completing this session. Every OS can be created module by module. Cognizant Technology Solutions. It means that for a program to be executed. Main Memory Management Primary memory or main memory is a large array of words or bytes. the system is partitioned into small modules with a well-defined interface. The provision of mechanisms for process synchronization The provision of mechanisms for process communication The provision of mechanisms for deadlock handling.

Secondary storage consists of tapes. Some examples of storage media are magnetic tape. The three major activities of an operating system in regards to secondary storage management are: Managing the free space available on the secondary storage device Allocation of storage space when new files have to be written Scheduling the requests for memory access Networking A distributed system is a collection of processors that do not share memory. peripheral devices or a clock. All Rights Reserved C3: Protected . A file system is normally organized into directories to ease their use. The communication-network design must consider routing and connection strategies and the problems of contention and security. processes. secondary. Each of these media has its own properties like speed. magnetic disk and optical disk. The directories may contain files and other subdirectories. or users of the resources defined by a computer system. The processors communicate with one another through communication lines called network. Page 53 ©Copyright 2007. then the various processes must be protected from one another’s activities. and its data are lost when power is lost. Only the device driver knows the peculiarities of the specific device to which it is assigned. cache) is ordinarily divided into bytes or words consisting of a fixed number of bytes. which provide long-term storage. data transfer rate and access methods. disks and other media to hold information that will eventually be accessed in primary storage (primary. Computer can store files on the disk (secondary storage). Cognizant Technology Solutions. this set of all addresses available to a program is called an address space. The five major activities of an operating system in regard to file management are: The creation and deletion of files The creation and deletion of directories The support of primitives for manipulating files and directories The mapping of files onto secondary storage The backup of files on stable storage media Input /Output System Management I/O subsystem hides the peculiarities of specific hardware devices from the user.Fundamentals of Computer Technology File Management A file is a collection of related information defined by its creator. capacity. Because main memory is too small to accommodate all data and programs. Secondary Storage Management: Generally. secondary storage and cache storage. Protection System If a computer system has multiple users and allows the concurrent execution of multiple processes. including primary storage. Each location in storage has an address. Protection refers to mechanism for controlling the access of programs. the computer system must provide secondary storage to backup main memory. Instructions and data must be placed in primary storage or cache to be referenced by a running program. systems have several levels of storage.

one processor is shared amongst many processes. secondary memory management. memory and IO resources. To begin with let us define what a “process” is and in which way a process differs from a program. In other words. Referring back to the C language program – it’s a text file. allocates main memory. Current machines allow several processes to share resources. On the other hand. On execution. In fact. And yet the owner of every process gets an illusion that the server (read processor) is available to their process without any interruption. Page 54 ©Copyright 2007. For instance. Processes during their life time may also seek to use I/O devices. A process is an executable entity – it’s a program in execution. Processes get created. A system like a file server may even support processes from multiple users. It is for this reason a process is differentiated from program. In this module we shall study the basic processor sharing mechanism amongst processes. an output may have to appear on a monitor or a printed output may be needed. In any case. a program in execution is a process.. a program is a text script with no dynamic behavior. at any point in time there is a current instruction in execution. files and I/O. Every process has its instruction sequence. in addition. What is a Process? As we know a process is a program in execution. A process terminates when the task it is defined for is completed. Clearly.e. files and IO. The process management component then requires coordination with the main memory management. To understand the importance of this definition. Cognizant Technology Solutions. In other words. This requires clever management and allocation of the processor as a resource. A program by it self is a passive entity and has no dynamic behavior of its own till we create the corresponding process.c in C. It has no dynamics of its own i. the intended operations take place. A process is a program in execution. let’s imagine that we have written a program called my_prog.out file which is an executable file. the malloc instruction in C precisely does that. as well as. In this module we shall explain how a process comes into existence and how processes are managed. When we seek to run this file – we see the program in execution. Once we compile. therefore. When a program is in execution. needs to be stored in specific area within the main memory. process management requires not only making the processor available for execution but. Note that when a program is written and a file is prepared.Fundamentals of Computer Technology Processes and Process management A process is the basic computational element in a modern computer system. A process in execution needs resources like processing resource. When we compile a C language program we get an a. While the program is a text script. it is still a script. it cannot cause any input processing or output to happen. and still later when we run this program. and process management refers to the full spectrum of OS services to support the orderly administration of a collection of processes. So process must have an inherent program counter. All Rights Reserved C3: Protected . a process has a dynamic behavior and is an active entity. may have to be suspended awaiting an event like completing a certain I/O. the script is acted upon. It can result in engaging a processor for some processing and it can also engage in I/O operations. therefore. A detailed consideration of the process management is the natural place to begin the study of OS details. A program counter determines helps to identify the next instruction in the sequence. this program may read in some data and output some data. During the life time of a process it may seek memory dynamically. In reality. In other words. from the stand point of OS a process should be memory resident and.

Five state model The five states of a process are as follows New State: The process being created. Page 55 ©Copyright 2007. Contents of program counter (PC) Contents of program status word (PSW). Contents of general purpose register. All Rights Reserved C3: Protected . Ready State: A process is said to be ready if it use a CPU if one were available.Fundamentals of Computer Technology Process States The process state consist of everything necessary to resume the process execution if it is somehow put aside temporarily. when a process reads from a pipe or special file and there is no input available. The process state or context of a process consists of at least following: Code for the program. Cognizant Technology Solutions. Program's static data. 4.1: Five State Model Process blocks for an event. Operating Systems resource in use. Note that a process is unable to run until some external event happens.1 Fig. appears when a process discovers that it cannot continue. the process is automatically blocked. Program's dynamic data. A ready state process is runnable but temporarily stopped running to let another process run. process actually using the CPU at that particular instant. that is. Blocked (or waiting) State: A process is said to be blocked if it is waiting for some event to happen such that as an I/O completion before it can proceed. Exit state: The process has finished execution. Running State: A process is said to be running if it has the CPU. In other systems. some systems must execute a system call block. Program's procedure call stack. In order to get into blocked state. The state transition diagram is shown in figure 4.

called the process table. or PID) Process state. The scheduler does all the process handling. the operating system maintains a table. Scheduler picks another process. which include base and bounds registers or page table. memory allocation. All Rights Reserved C3: Protected . and so on. A Process Control Block (PCB. can be summarized as follows. I/O status information. Another state is included into this five state model is called suspended state. and it is time to let another process have some CPU time. when the scheduler decides that the running process has run long enough. Scheduler picks the same process when all other processes have had their share and it is time for the first process to run again. When the disk block has been read or the character typed. These are: Implementations differ. Using the process model. Memory management information. such as starting and stopping processes. This is included to increase the multiprogramming level. If no other process is running at that instant. When the process is blocked it can be suspended till it get the event complete. disk processes. also called Task Control Block) is a data structure in the operating system kernel representing the state of a given process. which may be new. Register values for the process including. a list of open files and so on. the status of its open files. an array of structures. Process moves from blocked to ready when the external event for which it was waiting happens. the process waiting for it is unblock and is ready to run again. same process will start running. an integral part of a operating system. The lowest level of the operating system is the scheduler with a number of processes on top of it. etcetera.Fundamentals of Computer Technology Dispatcher picks either the same or another process for execution. running. This state says about whether process is there in the main memory or not. stack pointer. but in general a PCB will include. its accounting and scheduling information. The Program Counter value for the process The address space for the process. Process Control Block (PCB) To implement the process model. I/O devices allocated to this process. directly or indirectly: The identifier of the process (a process identifier. The process model. which may be blocked when they are waiting for some thing happen. notably. it becomes easier to think about what is going on inside the system. There are many processes like user processes. how much CPU time it has accumulated. composed I/O requests. PCB. Cognizant Technology Solutions. Otherwise it may have to wait in ready state for a little while until the CPU is available. its program counter. Each entry identifies a process with information such as process state. waiting or halted. ready. Page 56 ©Copyright 2007. terminal processes. Each process is identified with its own process control block. Process accounting information. such as when the process was last run.

The program counter. If the network process is now the highest priority runnable process. and the stack pointer is set to a temporary stack used by the process handler. Suppose a user process j is running when a network interrupt occurs. program status word. It contains the address of the interrupt service procedure.3.Fundamentals of Computer Technology During a context switch. The kernel must stop the execution of the running process. and the scheduler is called. different processes have different priorities. The information deposited by the interrupt is removed from the stack. Normally. copy out the values in hardware registers to its PCB. 4. and possibly one or more registers are pushed onto the stack by the interrupt hardware. the running process is stopped and another process is given a chance to run. it must contain everything about the process that must be saved when the process is switched from the running state to the ready state so that it can be restarted later as if it had never been stopped. Cognizant Technology Solutions. A PCB structure is shown in Fig. and update the hardware registers with the values of the new process. The network interrupts service procedure starts out by saving all the registers in the process table entry for the current process.2 Pointer State Process number Program counter Registers Memory limits List of open files Figure: 4. Associated with each I/O device is a location near the bottom of memory called the interrupt vector. it will be scheduled to run. If the process that was interrupted is just as important or more so. it is changed from blocked to ready. 4. The CPU then jumps to the address specified in the network interrupt vector. Now the network process can be started. The current process number and a pointer to its entry are kept in global variables. so they can be founded quickly. All Rights Reserved C3: Protected . Page 57 ©Copyright 2007. The switching between two processes is illustrated by Fig. and the network process will have to wait a little while. then it will be scheduled to run again.2: Process Control Block Structure In another words.

There are different possibilities concerning creating new processes: Execution: the parent process continues to execute concurrently with its children processes or it waits until all of its children processes have terminated (sequential).e. Sharing: either the parent and children processes share all resources (likes memory or files) or the children processes share only a subset of their parent's resources or the parent and children processes share no resources in common. A parent process can terminate the execution of one of its children for one of these reasons: The child process has exceeded its usage of the resources it has been allocated. In order to do this. a mechanism must be available to allow the parent process to inspect the state of its children processes. Page 58 ©Copyright 2007.3: Process switching A process may create several new processes during its time of execution. Cognizant Technology Solutions. This type of processes has following features: Its state is not shared in any way by any other process. the results of execution depend only on the input values.Fundamentals of Computer Technology Process A Executing save register Process B Idle reload register Idle save register Executing Idle reload register Executing Figure: 4. The task assigned to the child process is no longer required. i. Its execution is deterministic. The creating process is called parent process. All Rights Reserved C3: Protected . while the new processes are called children processes. A process is independent if it cannot affect or be affected by other processes executing in the system. We distinguish between independent process and cooperating process.

. first-come-firstserved (FCFS). let us examine a few situations we experience in daily life. In the context of processes we also need to understand preemptive and non-preemptive operations. The maximum waiting time for most of the customers is reduced considerably..m. In contrast to independent processes. On the other hand in a preemptive scheduling a suspension may be enforced by an OS. When more than one process is runnable. and algorithm it uses is called the scheduling algorithm. Cognizant Technology Solutions. i.). These queues advance based on some policy. Note neither of these suspensions is forced upon it externally.m. the results of execution depend on relative execution sequence and can not be predicted in advance.). These are usually referred to as scheduling policies. cooperating processes can affect or be affected by other processes executing in the system. typically in driving license offices and other bureaus. where applications are received till a certain time in the day (say 11:00 a. These are processed in the office and the out come is announced for all at the same time (say 2:00 p. Such a pre-emption is irrespective of the size of the job (or even its usefulness some times). Its execution is not deterministic. Its execution is irreproducible. the secretary to the chairman of department always preempts any one's job to attend to the chairman's copy requests.e. Scheduling: A Few Scenarios The OS maintains the data for processes in various queues. When we wish to buy a railway ticket at the ticket window.e. The problem of determining when processors should be assigned and to which processes is called processor scheduling or CPU scheduling. the queue is processed using a ``all customers are equal policy '' i.e. This may be to attend to an interrupt or because the process may have consumed its allocated time slot and OS must start execution of some other process. The part of the operating system concerned with this decision is called the scheduler. the results of execution are not always the same for the same input. They are characterized by: Their states are shared by other processes. Some times their jobs are interrupted in favor of shorter jobs. The policy simply is priority based scheduling. All such applications are then taken as a batch. Page 59 ©Copyright 2007. This kind of scheduling is called shortest job first policy. In a non preemptive operation a process may suspend its operations temporarily or completely on its own.Fundamentals of Computer Technology Its execution is reproducible. The OS keeps the process identifications in each queue. A process may suspend its operation for IO or terminate on completion. All Rights Reserved C3: Protected . This way they service a large number of customers quickly. The chairman has the highest priority. However. in a photocopy shop. Non-preemptive operations usually proceed towards completion uninterrupted. Process Scheduling Basic concepts The assignment of physical processors to processes allows processors to accomplish work. In a university department. Next batch of applications are received the following day and that batch is processed next. customers with bulk copy requirements are often asked to wait.. i. To understand the nature of OS's scheduling policies. The operators prefer to quickly service short job requests. the results of execution will always be the same for the same input. We also come across situations.e. i. the operating system must decide which one first. Its execution can be stopped and restarted without any negative effect. This kind of scheduling is termed batch processing.

4: Types of Scheduler Process Scheduling Algorithms Preemptive Vs Non-preemptive Scheduling The Scheduling algorithms can be divided into two categories with respect to how they deal with clock interrupts. efficiency. etc. Cognizant Technology Solutions. Types of Scheduler The different types of scheduler dealing with the different states of the process are Long term scheduler dealing with ready process Medium-term scheduler dealing with secondary storage Short-term scheduler dealing with dispatch a process for execution Fig. All Rights Reserved C3: Protected . etc. response time.Fundamentals of Computer Technology Objectives of scheduling Many objectives must be considered in the design of a scheduling discipline. a scheduler should consider fairness.. throughput. In particular. interactive system or real-time system. Some of these goals depends on the system one is using for example batch system. but there are also some goals that are desirable in all systems. 4. turnaround time. Page 60 ©Copyright 2007.

a scheduler executes jobs in the following two situations.. short jobs are made to wait by longer jobs but the overall treatment of all processes is fair. its process control block PCB is linked into the tail of the queue. Preemptive Scheduling A scheduling discipline is preemptive if. Cognizant Technology Solutions.e. and given to another process. the process. When a process enters the ready queue. In nonpreemptive scheduling. once a process has been given the CPU can taken away. response times are more predictable because incoming high priority jobs can not displace waiting jobs. It functions as follows. called its quantum. Types of scheduling algorithms FCFS Scheduling Round Robin Scheduling SJF Scheduling SRT Scheduling Priority Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling First-Come-First-Served The simplest scheduling algorithm is the First-Come-First-Served (FCFS) algorithm.Fundamentals of Computer Technology Non-preemptive Scheduling A scheduling discipline is nonpreemptive if. it is allocated to the process located at the head of the ready queue. Page 61 ©Copyright 2007. When a process switches from running state to the waiting state. which it is allowed to run. Following are some characteristics of nonpreemptive scheduling 1. 3. which requests the CPU. In nonpreemptive system. If the process is still running at the end of the quantum. When a process terminates. Round-robin Round-robin scheduling is preemptive algorithm. first is allocated the CPU first. The running process is then removed from the ready queue. i. the CPU is preempted. b. All Rights Reserved C3: Protected . If the process has blocked or finished before the quantum has elapsed. Other names of this algorithm are: First-In-First-Out (FIFO) Run-to-Completion Run-Until-Done The FCFS algorithm is simply realized with a FIFO queue. once a process has been given the CPU. In nonpreemptive system. a. the CPU switching is done. Each process is assigned a time interval. As soon as the CPU is free. 2. The strategy of allowing processes that are logically runnable to be temporarily suspended is called Preemptive Scheduling and it is contrast to the "run to completion" method. the CPU cannot be taken away from that process.

In the production environment where the same jobs run regularly. Page 62 ©Copyright 2007. Priority algorithm Priority can be associated with each process depending on how urgently a process should execute. it is not useful in timesharing environment in which reasonable response time must be guaranteed. The SJF scheduling is especially appropriate for batch jobs for which the run times are known in advance. i. Shortest-Job-First (SJF) Other name of this algorithm is Shortest-Process-Next (SPN). and so on. Switching from one process to another requires certain amount of time for doing the administration. after doing 20 msec of useful work. The SJF algorithm favors short jobs (or processors) at the expense of longer ones.e. based on the past performance of the process. Like FCFS. 20% of the CPU time will be wasted for administrative overhead. the second one after 500 msec. The quantum is set to 20 msec. Setting the quantum too short causes too many process switches and decreases the CPU utilization. Since the SJF scheduling algorithm gives the minimum average time for a given set of processes. updating various tables and lists etc. In other words. it may be possible to provide reasonable estimate of run time. the CPU will have to spend 5 msec on context switching. such as saving and loading registers and memory maps. The last one have to wait 5 sec before getting a chance to start. If the CPU is idle. But setting it to long may cause poor response time. If the quantum is set to 500 msec for example. SJF is non preemptive therefore. The obvious problem with SJF scheme is that it requires precise knowledge of how long a job or process will run. But in the development environment users rarely know how their program will execute. Equal priority processes are scheduled by the FCFS algorithm. The CPU is then allocated to the process with the highest priority. it is probably optimal. All Rights Reserved C3: Protected . The best SJF algorithm can do is to rely on user estimates of run times.Fundamentals of Computer Technology The interesting issue with round-robin scheduling is the selection of the quantum length. This amount of time is called process switch time or context switch time. Ten processes will be put on the list of runnable processes. But imagine what happens if ten interactive users hit the carriage return key at roughly the same time. assuming all others use their full quanta. when CPU is available. the wasted time will be less than 1%. it is assigned to the process that has smallest next CPU burst. Shortest-Job-First (SJF) is a non-preemptive discipline in which waiting job (or process) with the smallest estimated run-time-to-completion is run next. Suppose this time takes 5 msec. and this information is not usually available. Cognizant Technology Solutions. the first process will start immediately.

A process that is ready to run but lacking the CPU can be considered blocked. and run that process either Preemptive or Non-preemptively Each queue has its own scheduling algorithm or policy.e. All the priority algorithms mentioned above are non-preemptive scheduling algorithms. Another solution to the problem of indefinite blockage of low-priority processes is aging. A priority-scheduling algorithm can leave some low-priority processes waiting indefinite for the CPU. Even a process with an initial priority of 0 would have the highest priority in the system and would execute. once the CPU has been allocated to a process. Page 63 ©Copyright 2007. The processes are permanently assigned to one another. In a heavy loaded computer system. i. One of the critical problems with priority scheduling algorithms is the indefinite blocking or starvation. For example. A preemptive priority scheduling algorithm will preempt the CPU if the priority of the newly arrived process is higher than the priority of the currently running process. if 0 is the lowest and 127 is the highest priority. the new process will execute only if its priority is higher than the priority of the running process. either by terminating or by requesting I/O devices. All Rights Reserved C3: Protected . such as Memory size Process priority Process type Algorithm chooses the process from the occupied queue that has the highest priority. Due to the preemptive scheduling algorithm.Fundamentals of Computer Technology Priorities can be defined either internally or externally. it can keep the CPU until it releases it. based on some property of the process. Non-preemptive scheduling algorithms will simply put the new process at the head of the ready queue. the number of open files etc. FCFS is intrinsically non-preemptive. often political factors. Multilevel queue scheduling algorithm A multilevel queue scheduling algorithm partitions the ready queue in several separate queues. In a multilevel queue scheduling processes are permanently assigned to one queue. a steady stream of high-priority processes can prevent a low-priority process from ever getting the CPU. memory requirements. we could increment a waiting process's priority by 1 every 15 minutes. Internally defined priorities use some measurable quantity or quantities to compute the priority of a process. such as the type and the amount of funds being paid for computer use and other external.. For example. for example: time limits. its priority is compared with the priority of the currently running process. When a process arrives at the ready queue. Aging is the technique of gradually increasing the priority of the processes that wait in the system for a long time. Cognizant Technology Solutions. waiting for the CPU. External priorities are set by criteria that are external to the operating system.

Multilevel Feedback Queues In multilevel queue scheduling we assign a process to a queue and it remains in that queue until the process is allowed access to the CPU. If a process uses too much of the CPU it will be moved to a lower priority queue. Possibility II If there is a time slice between the queues then each queue gets a certain amount of CPU times. Any jobs that need more than 24ms are executed with any spare CPU capacity once Q0 and Q1 processes have been serviced. which it can then schedule among the processes in its queue. That is. Since processes do not move between queue so. with these processes being executed on a FCFS basis. and interactive editing processes will all empty. Any job arriving is put into Q0. Multilevel feedback queue scheduling allows us to do this. Q0 is the highest priority queue and Q2 is the lowest priority queue. For example. in the above figure no process in the batch queue could run unless the queues for system processes. The above description means that any jobs that require less than 8ms of the CPU are serviced very quickly. Whilst running processes in Q1. but it is inflexible.Fundamentals of Computer Technology Possibility I If each queue has absolute priority over lower-priority queues then no process in the queue could run unless the queue for the highest-priority processes were all empty. then the currently running process is preempted so that the Q0 process can be serviced. This queue (Q1) has a time quantum of 16ms associated with it. Q1 and Q2). The scheduler first executes process in Q0 and only considers Q1 and Q2 when Q0 is empty. However. interactive processes. Page 64 ©Copyright 2007. Consider processes with different CPU burst characteristics. it does so with a quantum of 8ms (say). If the process does not complete. Assume we have three queues (Q0. This will leave I/O bound and (fast) interactive processes in the higher priority queue(s). All Rights Reserved C3: Protected . Any processes not finishing in this time are demoted to Q2. Any processes that require between 8ms and 24ms are also serviced fairly quickly. there may be instances when it is advantageous to move process between queues. this policy has the advantage of low scheduling overhead. When it runs. 80% of the CPU time to foreground queue using RR. processes do not move between queues. This is a reasonable scheme as batch processes do not suddenly change to an interactive process and vice versa. if a new process arrived in Q0. For instance. it is preempted and placed at the end of the Q1 queue. Cognizant Technology Solutions. 20% of the CPU time to background queue using FCFS.

Cognizant Technology Solutions. There is always the possibility to build memories that can be accessed at CPU speeds. The schemes employed for organizing and managing a computer’s storage are discussed in this module. they are loaded in primary memory.Fundamentals of Computer Technology In implementing a multilevel feedback queue there are various parameters that define the scheduler. so modern CPUs typically contain fewer registers. There are three aspects to memory management in an operating system such as: Allocation of primary memory at initiation of a program or a process Allocations in response to requests during execution of a program or process Map the process address space into allocated portion of the primary memory Minimize access times using a cost-effective amount of primary memory The memory management unit is responsible for allocating main memory to processes. Registers are such a memory. Operating system responsibilities in memory management include memory allocation and deallocation efficient utilization of memory and protection of memory areas allocated to a program or process from interference by other programs or processes. It administers the use of the primary memory. and tape drives which provide massive inexpensive capacity for the abundance of programs and data that must be kept readily available for processing. Main or the primary memory has faster access time compared to secondary memory. one way is to keep the programs and information in primary memory only while the CPU is using them and to write the information back on to secondary memory soon after it has been used or updated/changed. since the CPU can fetch instructions from primary/main memory only. Data can be loaded into ALU registers from main memory or stored from the registers into the primary memory. Memory management strategies have evolved with operating systems and hardware technology. As the main memory has a limited storage space. which have influenced operating systems design. When data and programs are to be executed. drum. The primary memory unit is basically a part of the executable memory and is sometimes called the executable memory. which belongs to different users of the program. Page 65 ©Copyright 2007. The memory of a computer system includes all the resources of the computer used for storing information. though it is volatile in nature. the program together with the data required by the programs must be available in the main memory so that the CPU can reference them directly. However. The organization and management of the main memory/primary memory or real memory of a computer system has been one of the most important factors. The number of queues The scheduling algorithm for each queue The method used to demote processes to lower priority queues The method used to promote processes to a higher priority queue (presumably by some form of aging) The method used to determine which queue a process will enter Memory Management Need for memory Management For the execution of user programs. which stores information in storage media such as most commonly used disks drives. All Rights Reserved C3: Protected . Secondary memory or secondary storage is a long-term importunate memory. and to protect the memory allocated to each process from undesired access by other process. The memory manager should manage the sharing of primary memory and minimize memory access time. these memories are very expensive.

fast main memory is used to provide fast access to a much larger virtual memory which is actually stored on cheaper. formatters.Fundamentals of Computer Technology including the automatic movement of programs and data back-and-forth between the primary and secondary memories. both program and data. When the computer is turned off. the information is deleted from RAM. The external memory is disk. The hard disk can write and read information to and from the main memory much faster than a floppy disk. are stored on a disk until loaded into memory. The main memory and the floppy disk have less storage capacity than the hard disk. disks systems are only one of many possible storage systems: registers caches. Main memory can be viewed as a fast cache for secondary memory. main memory. holding the data until it is retrieved at a later time. It is active only when computer is on. Disk-based systems provide the primary on-line storage of information. As we move down the hierarchy. Writing information to ROM is made by vendor. Cognizant Technology Solutions. The design of a computer memory system attempts to balance these factors: using only as much expensive memory as absolutely necessary while trying to provide as much cheap memory as possible. there would be no reason to use the slower. In a larger sense. Unlike information stored in RAM. and then use the disk as both the source and destination of the information for their processing. and tapes and so on. All Rights Reserved C3: Protected . sort routines. There are has two kinds of memory: random-access memory (RAM) and read-only memory (ROM). disks. while the access time increases and the amount of storage at each level increases. If computer is switched off. the cost per bit decreases. There are two kinds of disks: hard disk and floppy disk. but very fast. the proper management of disk storage is of central importance to a computer system. more expensive memory. since if a given storage system was both fatter and cheaper than another.5) according to their speed or their cost. The amount of space on a disk is measured in Giga bytes. The size of the main memory is measured in megabytes. This is reasonable. with other properties being the same. and so on. and volatility. Memory hierarchy The main memory is usually located on chips inside the system unit. Each storage system provides the basic functions of storing a piece of data. which can be organized in a hierarchy (Fig. Page 66 ©Copyright 2007. cost. The main differences between the various storage systems are their speed. RAM is not a permanent storage place for information. The instructions that the computer gets and the data the processes are kept in RAM during computer works. Demand paging is an example of such a system design: a limited amount of expensive. Most programs. Information stored on the disks is moved in and out of RAM. like assemblers. ROM is the memory where information is only read. The access speed of main memory is also much faster than a hard disk. information stored on a disk is not deleted when the computer is turned off. however. We can see a wide variety of storage in a computer system. size. The higher levels are expensive. information is not deleted from ROM.4. slower secondary memory. Hence. editors.

The programmer (or compiler) implements the register allocation and replacement algorithms to decide what information to keep in registers. which interfaces between the processor and main memory. It is smaller and faster than the main memory. Careful selection of cache size and a replacement policy can mean that 80 to 90 percent of all accesses are in the cache. we first check if it is in the cache. This task is complicated by two other aspects as modern computing systems. The transfer between caches and main memory is performed in units called cache blocks/lines. are a high-speed cache for main memory. It acts as “attraction memory”: contains the value of main memory locations which were recently accessed (Temporal Locality). cache management is an important design problem. Page 67 ©Copyright 2007. All Rights Reserved C3: Protected . If it is. we use the information from the main storage system. Since caches have limited size. it is copied into a faster storage system (the cache) on a temporary basis. putting a copy in the cache in the hope that it will be needed again. Cognizant Technology Solutions. Assuring that at least the portion of code to be executed is in memory when a processor is assigned to a process is the job of the memory manager of the operating system. Cache memory is high speed memory.5: Storage hierarchy Memory management A program’s machine language code must be in the computer’s main memory in order to execute. As it is used. such as index registers and accumulators. Mapping between memory and cache is (mostly) static. Caches contain also the value of memory locations which are close to locations which were recently accessed (Spatial Locality). The movement of information between levels of a storage hierarchy may be either explicit or implicit as depicted Registers Cache Main Memory Secondary memory Fig: 4. and what to keep in main memory. we use the information directly from the cache. internal programmable registers. Cache is placed closer to the processor than the main memory. resulting in very high performance. Information is normally stored in some storage system (like main memory). both in hardware and software. When a particular piece of information is needed. If not.Fundamentals of Computer Technology Caching is an important principle of computer systems. Extending this view.

6: Address Mapping Page 68 ©Copyright 2007. and the idea of placing them into any currently available block of storage is called relocation. of memory are allocated to these processes when they enter the system. enter the system. All Rights Reserved C3: Protected . The logical address space is the set of addresses seen by the user (or user process). or blocks. viewed as a whole. The second aspect of modern computing systems affecting memory management is the need to allow the programmer to use a range of program addresses. we know that multiprogramming mean that several (at least two) processes can be active within the system during any particular time inval. Therefore. at any given moment. From its definition. some allocated to processes active at that moment. Providing an efficiently operating virtual memory is another task for the memory management facility. and provide it in a way that is invisible to the programmer. and others free and available to a new process which may. A mapping is a correspondence between a range of virtual addresses and some memory (or a memory-mapped object). Logical Address Space Physical Address Space ace Address mapping ace Logical Address Physical Address Fig. The physical address space is the set of addresses in physical memory (RAM). programs designed to execute in this multiprogramming environment must be compiled so that they can execute from any block of storage available at the time of the program’s execution. the computer’s memory. That is. the logical address space is typically much larger than the physical address space. and are subsequently freed when the process leaves the system. 4. In systems with “virtual memory”. Pieces. The two address spaces need not be the same size and usually aren’t in most modern systems. Cognizant Technology Solutions. consists of a part of blocks. In general.Fundamentals of Computer Technology The first is multiprogramming. which may be larger. This is accomplished by extending the actual memory with secondary memory such as disk. then. at any time. But these multiple active processes result from various jobs entering and leaving the system in an unpredictable manner. Such program is called relocatable programs. with characteristics (especially size) different from actual memory. perhaps significantly larger than the range of memory locations actually available. we want to provide the programmer with a virtual memory. The physical location of the memory will be managed by the virtual memory system.

Page 69 ©Copyright 2007. We have not yet considered the data that the program will operate upon. memory is divided into a number of fixed size or variable sized partitions or regions which are allocated to running processes. execute it and then unload it before loading the next process. For example: a process needs m words of memory may run in a partition of n words where n ≥ m. Nor do we have to worry about keeping processes separate in memory. Partitioned Allocation Multi Programming improves CPU Utilization. but before multiprogramming a single process is placed in the memory using single contiguous allocation. That is. Cognizant Technology Solutions. Single Contiguous allocation If we only allow a single process in memory at a time we can make life simple for ourselves. and each partition is allocated to a process while execution. but fragmented into many scattered blocks. The way how the memory is allocated to the process are Single contiguous memory allocation Partitioned allocation o o Static Partitioning Dynamic Partitioning The process of partitioning the memory is called as memory organization.Fundamentals of Computer Technology Memory Organization The main memory is allocated to the process as when it request for execution. All we have to do is load a process into memory. then it is accounted for external fragmentation. the processor does not permit multi-programming and only one process is allowed to be in memory at a time. This assumes that it has a driver for each device it needs to communicate with. These memory fragments can not be used. The difference (n – m) is called internal fragmentation. All Rights Reserved C3: Protected . This is both wasteful and unrealistic. In addition. However. This facilitates the multiprogramming. The variable size partition scheme may result in a situation where available memory is not contiguous. If a partition is unused and available. Using this model we do not have to worry about swapping processes out to disc when we run out of memory. but too small to be used by any waiting process. even this simple scheme has its problems. We distinguish between internal fragmentation and external fragmentation. In a multiprogramming system. There are various ways of dividing the memory into number of partitions. We are also forgetting about the operating system routines. The OS can be considered another process and so we have two processes running which means we have left behind our ideal where we can consider that the memory is only being used by one process. memory which is internal to a partition but is not being used. if we only allow one process to run at any one time then we can make life very simple. We are also assuming that a process is self contained in that it has everything within it that allows it to function.

The Fig. 4. In this way. it can be put into an input queue for the smallest partition large enough to hold it. Memory access of a running program is first compared with the contents of the limit register. In fixed partition the numbers of partitions are fixed but the sizes may either be fixed or varying. heap etc. All Rights Reserved C3: Protected . Since the partitions are fixed in this scheme. The unused space within the allocated partition is called as internal fragmentation. The number of programs (i. It does not support a system having dynamically data structure such as stack. Page 70 ©Copyright 2007. When a process is scheduled.Fundamentals of Computer Technology Protection and Sharing: Multiprogramming introduces one essential problem of protection. Not only that the operating system must be protected from user programs/processes but each user process should also be protected from maliciously accessing the areas of other processes. any space in a partition not used by a job is lost. In addition to protection.e. that partition is free for another program waiting in a queue. the limit register is loaded with the highest virtual address in a program. any attempt to access a memory location beyond the boundary is trapped.7 shows an example for the equal sized and unequal sized partition in fixed partitioning. which in turn may reduce the effectiveness of short-term scheduling. One traditional approach to sharing is to place data and code in a dedicated common partition. The primary function of a limit register is to detect attempts to access memory location beyond the boundary assigned by the operating system. any attempt by a participating process to access memory outside of its own participation is normally regarded as a protection violation. Cognizant Technology Solutions. In system that uses base register for relocation. degree of multiprogramming) residing in memory will be bound by the number of partition. Static Partitioned Allocation One method is to divide the memory into fixed sized partitions. a good memory management mechanism must also provide for controlled sharing of data and code between cooperating processes. It limits the degree of multiprogramming. When a program terminates. no permission is given to the user process. The basic approach here is to divide memory into several fixed size partitions where each partition will accommodate only one program for execution. If it exceeds the limit register. In systems with protection keys. When a job arrives. Fixed partitioning imposes several restrictions: No single program/process may exceed the size of the largest partition in a given system. this obstacle may be circumvented by changing the keys of all shared blocks upon every process switch in order to grant access rights to currently running process. a common approach is to use limit (bound) register for protection. However. queue.

7: Example of Fixed partition memory of 64 MB memory Placement algorithm Equal-size partitions o Because all partitions are of equal size.Fundamentals of Computer Technology Fig. All Rights Reserved C3: Protected . it does not matter which partition is used Unequal-size partitions o o o Can assign each process to the smallest partition within which it will fit Queue for each partition Processes are assigned in such a way as to minimize wasted memory within a partition Page 71 ©Copyright 2007. 4. Cognizant Technology Solutions.

operating system keeps track of which parts of memory are available and which are allocated.9 Page 72 ©Copyright 2007. Compared to fixed partitions. 4. Memory manager continues creating and allocating partitions to requesting processes until all physical memory is exhausted or maximum allowable degree of multiprogramming is reached. in dynamic partitions. whereas they are fixed in the former. In variable partition. The flexibility of not being tied to a fixed number of partitions that may be too large or too small for requesting processes. improves memory utilization but it also complicates the process of allocation and de-allocation of memory. When a process terminates or becomes swappedout.8: Memory assignment for fixed partitions Dynamic Partitioned Allocation The main problem with fixed size partition is the wastage of memory by programs that are smaller than their partitions (i. neither the size nor the number of dynamically allocated partition need be limited at any other time. internal fragmentation). location and size of partitions vary dynamically in the latter as processes are created and terminated. Fig. the memory manager can return the vacated space to the pool of free memory areas from which partition allocations are made. Cognizant Technology Solutions.Fundamentals of Computer Technology The Fig.8 shows the memory assignment for fixed partition Fig.e. 4. The effect of dynamic partitioning is shown in the following figure. 4. All Rights Reserved C3: Protected . The main difference between the fixed partition and variable partitions is that the number. A different memory management approach known as dynamic partitions (also called variable partition) which creates partitions dynamically to meet the requirements of each requesting process.

9: Effect of dynamic partitioning Example: Assume that we have 64MB main memory available in which 8MB is occupied by operating system program. The common strategies to allocate free partitions to ready processes are: Best-fit algorithm o o o o Chooses the block that is closest in size to the request Worst performer overall Since smallest block is found for process. The process 4 is waiting in a queue since only 4M was free it is waiting for 8MB. All Rights Reserved C3: Protected . The process 1 of 20MB enters and it creates the first partition of size 20 MB. The remaining 4MB was left unused. the smallest amount of fragmentation is left Memory compaction must be done more often Page 73 ©Copyright 2007.Fundamentals of Computer Technology Fig. Cognizant Technology Solutions. The process 2 of size 14MB enters and create second partition of size 14 MB. 4. The unused holes are called external fragmentation. There is no wastage of memory as internal fragmentation. Using this PDT the OS allocates the partition for the incoming process. operating system keeps track of status (whether allocated or free) of memory partitions. similarly third by process 3 of its size as 18 MB. This is done through a data structure called partition description table. Placement Algorithm Once partitions are defined. Once a process 2 released it uses that free space by creating two partition in turn.

Fundamentals of Computer Technology First-fit algorithm o o o Scans memory form the beginning and chooses the first available block that is large enough Fastest May have many process loaded in the front end of memory that must be searched over when trying to find a free block

Next-fit o Scans memory from the location of the last placement o More often allocate a block of memory at the end of memory where the largest block is found o The largest block of memory is broken up into smaller blocks o Compaction is required to obtain a large block at the end of memory Allocate the largest hole It must also search entire list It produces the largest leftover hole The largest block of memory is broken up into smaller blocks Compaction is required to obtain a large block at the end of memory Worst-fit o o o o o

The following figure, Fig. 4.10 shows the allocation example in dynamic partitioning.

Fig. 4.10: Example of memory configuration before and after allocation of 16MB block

Page 74 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology Advantages One advantage with variable partition is that memory utilization is generally better than fixed size partitions, since partitions are created accordingly to the size of process. Protection and sharing in static and dynamic partitions are quite similar, because of same hardware requirement except for some additional consideration due to compaction of memory during dynamic partitioning.

One advantage of dynamic partitioning is to support processes whose memory requirement increases during their execution. In that case operating system creates a larger partition and moves a process into it. If there is an adjacent free area it simply expands it. Disadvantages Dynamic memory management requires lots of operating system space, time, complex memory management algorithm and bookkeeping operations. Paged Memory Physical memory is divided into fixed size blocks called frames. Logical memory is also divided into blocks of the same, fixed size called pages. When a program is to be executed, its pages are loaded into any available memory frames from the disk. The disk is also divided into fixed size, which is the same size as the memory frames. The page table or page map table is created when the process is allocated to the main memory.

Fig. 4.11: Assignment of process pages to free frames

Fig. 4.12: Page Table for the process allocated in main memory

Page 75 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology The above figures, Fig. 4.11 and Fig. 4.12 show the allocation of process to paged memory and the PMT created for the same.

The logical address consists of two parts page number and an offset. The address translation is as follows: Extract the page number Using this as an index to PMT find the frame number Combine the frame number and offset to find the physical address

Fig 4.13 Address Translation for the paging system

The Fig. 4.13: shows the address translation for the paging system.

Segmented Memory Management The process is divided into number of segments. All segments of all programs do not have to be of the same length. There is a maximum segment length. When a process is allocated in main memory a segment table is created which consist of base and bound for each segments. Addressing consist of two parts - a segment number and an offset. Since segments are not equal, segmentation is similar to dynamic partitioning. The address translation is as follows: Extract the segment number Use that as an index and find base and the bound for the segment from SMT Compare the offset with the bound Add base and the offset to calculate the physical address

Page 76 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

When the scheduler admits a new process (of high priority) for which no partition is free. called virtual memory. Swapping helps in CPU utilization by replacing suspend able processes but residing into main memory with ready to execute processes from secondary storages. The memory manager performs this task by swapping out low priority processes suspended for a comparatively long time in order to load and execute the higher priority process.Fundamentals of Computer Technology The address translation for an logical address is shown in the following figure. swapping of processes between main memory and secondary storage is done. Page 77 ©Copyright 2007. fixed partitioning of memory is simple and effective.14: Address Translation for a logical address Virtual memory management With a batch system. Wherever a new process is ready to be loaded into memory and if no partition is free. When the higher priority process is terminated. With timesharing systems and graphically oriented personal computers. Swapping requires secondary storage device such as fast disk to store the suspended processes from main memory. The other strategy. 4. 4. All Rights Reserved C3: Protected .14 Fig. One problem with swapping process is that it takes a long time to access process from the secondary storage device. Fig. Cognizant Technology Solutions. Most modern Operating systems use this concept and swapping is now used in conjunction with Virtual Memory. The overhead must be considered when deciding whether to swap a process in order to make room for another process. allows programs to run even when they are only partially in main memory. a memory manager is invoked to make a partition free to accommodate the process. the lower priority process can be swapped back and continued. Sometimes there is not enough main memory to hold all the currently active processes. so excess processes must be kept on disk and brought in to run dynamically. the situation is different.

The virtual address space is divided up into units called pages. which translates it to another address before passing it on the memory unit. Writing a program in a large virtual address space is more convenient. This unit sits between the CPU and the memory unit. This code is almost never executed. not only for users but also for the system: A program is no longer limited by the size of physical memory that is available. real user programs don't need to be completely in system memory while they execute. The CPU utilization and the system throughput may increase. it's not necessary for all parts of the program to be in memory at the same time. Cognizant Technology Solutions. In other words. Executing a program that is partially in memory can have many benefits. Whenever the CPU wants to access memory (whether it is to load an instruction or load or store data). more user can be run at the same time. the translation is done at the granularity of a page. is called a virtual address. The Memory Management Unit maps these virtual addresses to the physical ones. Because each user may take less physical memory. after any indexing or other addressing-mode arithmetic. and the address it gets translated to by the MMU is called a physical address. usually between 1024 and 8192 bytes. Each page is a power of 2 bytes long. Page 78 ©Copyright 2007. The corresponding units in physical memory are called page frames. there exists a set of memory addresses that programs can produce. The address generated by the CPU. Fig. then address p+o is mapped to physical address f+o for any offset o less than the page size. So programming with very large virtual memory is possible Most modern computers have special hardware called a memory management unit (MMU). Less I/O operation would be needed to load users into memory. For example: programs often have code to handle unusual error events. On any computer . Virtual memory management allows the execution of processes that are partially in system memory. which very rarely occur in practice.Fundamentals of Computer Technology In general. Even in those cases where the entire program is needed. The pages and page frames are always the same size. If virtual address p is mapped to physical address f (where p is a multiple of the page size). it sends the desired memory address to the MMU. 4. so each user could run faster. These program generated addresses are called virtual addresses and form the virtual address space. All Rights Reserved C3: Protected . each page is mapped to a contiguous region of physical memory called a page frame.15: Virtual Address Translation Normally.

17: Physical Address Calculation Page 79 ©Copyright 2007. just as it has a handler for any other kind of interrupt. Each entry contains some flags (such as the valid bit mentioned earlier) and a frame number. which are the low-order bits of the virtual address. the MMU contains a page table. Here's how it works: The tables used by the MMU have a valid bit for each page in the virtual address space. Much more importantly. Cognizant Technology Solutions. If it is clear. however. it allows infrequently-used pages to be stored on disk. The physical address is formed by concatenating the frame number with the offset. any attempt by the CPU to access an address on the page generates an interrupt called a page fault trap. All Rights Reserved C3: Protected . Fig.Fundamentals of Computer Technology The MMU allows a contiguous region of virtual memory to be mapped to page frames scattered around physical memory making life much easier for the OS when allocating memory. 4.16: Transfer from disk to Page Frames Conceptually. If this bit is set. Fig. which is simply an array of entries indexed by page number. 4. The OS has an interrupt handler for page faults. It is the job of this handler to get the requested page into memory. the translation of virtual addresses on a page proceeds as normal.

and refers to the relocation of the contents of memory between physical memory and backing storage. A "trap" occurs at the end of the processing of an instruction. virtual memory could make programs run twice as slowly as they would without it. acquiring the previous contents from a cache of modified pages.) Page 80 ©Copyright 2007. Thus the lookup is always done by special-purpose hardware. or acquiring a free physical page and reloading the previous contents of the virtual page from the backing storage area. the speed of memory is often the bottleneck (processors are getting so fast that they spend much of their time waiting for memory). backing storage. the lookup in the page table has to be fast. The operation known as paging is a transition. or from one of these pools to a process. Since in modern computers. Cognizant Technology Solutions. while a "fault" occurs during the processing of an instruction. or from one of these pools to backing storage. First. since it is done on every single memory reference--at least once per instruction executed (to fetch the instruction itself) and often two or more times per instruction. All Rights Reserved C3: Protected . the table lookup makes each memory reference generated by the CPU cause two references to memory. or from the memory allocated to a process to one of the various system-defined pools of pages of physical memory. A page fault is an event that is triggered when a page is to be moved. and memory management data structures known as page tables. 4.Fundamentals of Computer Technology Fig. The page tables track the translation of virtual address space into the associated physical memory. Examples of events that trigger page faults include references to any portion of virtual address space that is not currently valid.18: Paging Hardware There are two problems with this conceptual view. or to the contents of the memory page in the backing storage area. Even with special hardware. An AST is based on a trap. Depending on tracking information in the page tables. resolving this page fault may require acquiring and initializing a page of physical memory from a list of free pages. if the page table is stored in memory. What is a Page Fault? A virtual address space is implemented using a combination of physical memory. A page fault occurs during the processing of an instruction. and means that the instruction must be restarted once the paging completes and the virtual memory is valid. meaning that there is currently no physical memory associated with the virtual memory. ("Traps" and "faults" are basic reporting mechanisms.

where n is the number of page frames. but since page faults are expected to tens of thousands of times less frequent than memory references. In other words. While this algorithm may seem at first glance to be reasonable. doing it on every reference is completely out of the question. Unfortunately. use the frame whose page has been in memory the longest. Cognizant Technology Solutions. It can be shown that OPT is the best possible algorithm. search through the table for the smallest entry. All Rights Reserved C3: Protected . OPT gives the smallest number of page faults. but FIFO treats them the same way. choose page A. in the sense that for any reference string (sequence of page numbers touched by a process). A page that has been recently referenced is likely to be referenced again in the near future. The problem is that a page that has been memory for a long time could equally likely be ``hot'' (frequently used) or ``cold'' (unused). LRU is actually quite a good algorithm. LRU (Least Recently Used) Pick the frame whose page has not been referenced for the longest time. It's only use is as a theoretical limit. and on every reference store the counter into a table entry associated with the referenced frame. that's ok. OPT. This algorithm is also pretty bad. and may indeed be worse than RAND (Random) Simply pick a random frame. Thus LRU is likely to approximate OPT. This approach requires a search through the whole table on each page fault. Otherwise. this approach requires a list operation on every single memory reference. When a page fault occurs.Replace a page of the faulting process Global replacement . like SJF processor scheduling. Unfortunately. and even though it is a pretty simple list operation. it is actually about as bad as you can get. Processes tend to have a few hot pages that they reference over and over again. the least-recently used frame is the one at the tail of the list. On a reference to page Page 81 ©Copyright 2007. One is to maintain a list. it is moved to the head of the list. In fact FIFO is no better than. This algorithm is sometimes called Belady's MIN algorithm after its inventor. OPT (Optimum) Pick the frame whose page will not be used for the longest time in the future.Fundamentals of Computer Technology Page Replacement Algorithms The algorithms to follow when there exists more page frames than can fit in memory. The idea behind this algorithm is that page references are not random. A clever variant on this scheme is to maintain an n by n array of bits. first-out) Keep the page frames in an ordinary queue. Every time a page is referenced. Which page should be replaced? Local replacement . If there is a page in memory that will never be used again. is not implementable because it requires knowledge of the future. On a page fault. if (for example) page A will be next referenced 8 million instructions in the future and page B will be referenced 6 million instructions in the future. and always choose the frame at the head of the queue for replacement. An alternative approach is to maintain a counter or timer. There are two ways of finding the least recently used page frame. even if it were done in hardware.Possibly replace the page of another process FIFO (First-in. moving a frame to the tail of the queue when it loaded with a new page. initialized to 0. it's frame is obviously the best choice for replacement.

The frame that hasn't been reference for the largest number of ``ticks'' will be associated with the counter that has the largest number of leading zeros. is just about as impractical as OPT. choose the frame for replacement. All Rights Reserved C3: Protected . (That will select the frame unreferenced for the largest number of ticks. it starts searching where it last left off. If the last timer interrupt was recent. This variant is called NFU (Not Frequently Used). but before the referenced bit for a frame is cleared it is saved in a counter associated with the frame and maintained in software by the OS. it is possible to get a good enough approximation to LRU (which is probably why nobody makes hardware to support true LRU). the OS prefers frames whose referenced bits are still clear. the search will return to where it started. Page 82 ©Copyright 2007. If the referenced bit is clear. One approach is to add the bit to the counter. the OS arranges for periodic timer interrupts (say once every millisecond) and on each ``tick. Cognizant Technology Solutions. where n is the number of bits in the counter. The frame with the lowest counter value will be the one that was referenced in the smallest number of recent ``ticks''. Unfortunately. and return. give the frame a ``second chance'' by clearing its referenced bit and going on to the next frame (wrapping around to frame zero at the end of memory). look at the page frames one at a time. The problem with this technique is that the granularity is too coarse. since at worst. This algorithm is usually called CLOCK because the frames can be visualized as being around the rim of an (analogue) clock. not when in the tick it was referenced. in order of their physical addresses.'' it goes through the page table and clears all the referenced bits. in its pure form. with the current location indicated by the second hand. all the bits will be clear and there will be no information to distinguished frames from each other. Each time this algorithm is called. at the cost of increasing the overhead. Eventually.Fundamentals of Computer Technology k. a frame with a zero referenced bit must be found. NRU (Not Recently Used) There is a form of support that is almost universally provided by the hardware: Each page table entry has a referenced bit that is set to 1 by the hardware whenever the entry is used in a translation. With NRU. SLRU (Sampled LRU) This algorithm is similar to NRU. If the referenced bit is set. but the OS software can clear it whenever it wants. by making the ticks short and the counters very long. and break ties in favor of the frame longest unreferenced before that). all of these techniques require hardware support and nobody makes hardware that supports them. Thus we can approximate the least-recently used frame by selecting the frame corresponding to the smallest value (in binary). We can get as close an approximation to true LRU as we like. Thus LRU. On a page fault. This only approximates LRU for two reasons: It only records whether a page was referenced during a tick. It turns out that if row k has the smallest value (when treated as a binary number). Second Chance When a page fault occurs. A better approach is to shift the bit into the counter (from the left). Fortunately. first set all the bits in row k to 1 and then set all bits in column k to zero. The hardware never clears this bit to zero. then frame k is the least recently used. and it only remembers the most recent n ticks. since they contain pages that have not been referenced since the last timer interrupt.

tape etc. Commonly. or may be rigidly formatted. alphabetic or alphanumeric. bytes or records. such as text files. it may be desirable to control by whom and in what ways files may be accessed. The storage is the same regardless of the underlying hardware. and are the most common forms. a file is a collection of related information defined by its creator. and backup utilities. Also files are normally organized into directories to ease their use. which supports an abstract representation of the secondary storage supported by the operating system. disk.. recovery. This control is known as file protection. It is a very general concept. File management system is considered part of the operating system Manages a trusted. zip drive. Files are mapped by the operating system onto physical devices. the operating system provides a uniform logical view of information storage. Although other media are used. E. consistency. bytes. Each of these devices has its own characteristics and physical organization. Objectives for a File Management System. backups) For convenient use of the computer system. removable hard drives such as floppy drive. shared resource Bridges the gap between: o low-level disk organization (an array of blocks). Cognizant Technology Solutions. files represent programs (both source and object forms) and data. lines or records whose meaning is defined by its creator and user. most of the ideas about implementing file systems were developed with disks in mind.g. Consequently. when multiple users have access to files. File management is one of the most visible services of an operating system. a file is a sequence of bits. Files are basically named unit of storage defined by the operating system. such as tapes and disks. Files can be stored on storage media like hard disks. Files store data and programs. so we look at a variety of directory structures. o o o o o o o o Provide a convenient naming system for files Provide uniform I/O support for a variety of storage device types Provide a standardized set of I/O interface routines Guarantee that the data in the file are valid Optimize performance Minimize or eliminate the potential for lost or destroyed data Provide I/O support and access control for multiple users Support system administration (e. All Rights Reserved C3: Protected .g. magnetic tape. The operating system implements the abstract concept of a file by managing mass storage devices. and the user's views (a stream or collection of records) Also includes tools outside the kernel. In general. Files may be free form.Fundamentals of Computer Technology File System Management Overview of Files File system is a service. the file. It is defined as a sequence of bits. defrag. Data files may be numeric. Page 83 ©Copyright 2007. The operating system abstracts from the physical properties of its storage devices to define a logical storage unit. File system provides access on permanent media to named files. formatting. Computers can store information in several different physical forms. File systems are implemented primarily on disks. read-only medium like CDROM. Finally.

Often when the user attempts to execute an object program whose source file has been modified (edited) since the object file was produced. Severe problems may result from new applications that require information structured in ways not supported by the operating system. In this case. Page 84 ©Copyright 2007. E. no `/' characters o o Limited length Only certain format. the source file will be recompiled automatically. and so on.Fundamentals of Computer Technology A file is named and is referred to by its name. File system must provide a convenient naming scheme Textual Names May have restrictions o Only certain characters. it must then contain the code to support these file structures correctly. The file system automatically packs and unpacks bytes into physical disk blocks as necessary. the user could waste a significant amount of time executing the old object file. Files are usually kept on disks. the operating system must be able to identify the source file from the object file. This attempt normally produces garbage. Notice that in order for this function to be possible. The operating system often defined all files to be simply a stream of bytes. All disk I/O is in units of one block (physical record). It is unlikely that the physical record size will exactly match the length of the desired logical record. Cognizant Technology Solutions. it can then operate on the file in reasonable ways. the name (or account number) of its creator. Otherwise. E. the logical record is one byte. In addition. but can be prevented if the operating system has been told that the file is a binary object program. For example. One problem is the resulting size of the operating system. Disk systems typically have a well-defined block size determined by the size of a sector. This function ensures that the user always runs an up-to-date object file. All Rights Reserved C3: Protected . There are disadvantages to having the operating system know the structure of a file. 8 + 3 Case (in)sensitive Names may obey conventions (. Logical records may even vary in length packing a number of logical records into physical blocks is a common solution to this problem.g. It has certain other properties such as its type. the time of its creation. check the time that each file was last modified or created. If the operating system defined fourteen different file structures. its length. and all blocks are the same size.g DOS. and determine the language of the source program (in order to use the correct compiler). every file must be definable as one of the file types supported by the operating system. a common mistake occurs when a user tries to print the binary object form of a program. If an operating system knows the structure of a file.c files or C files) o o Interpreted by tools (UNIX) Interpreted by operating system (Windows) One major consideration is how much of this structure should be known and supported by the operating system. Each byte is individually addressable by its offset from the beginning (or end) of the file.

the system searches the directory to find the location of the file. If each block is 512 bytes. assume the file system is disk-based. but resets the size to zero. For convenience. The directory entry will need to store a pointer to the current end of the file. such as renaming a file. Creating a file. All file systems suffer from internal fragmentation. the directory is searched for the associated directory entry. To understand how file systems are supported. read. the directory will need a pointer to the next block to be read. in general. After being used. Deleting: Find the proper directory entry. The wasted bytes allocated to keep everything in units of blocks (instead of bytes) are internal fragmentation. Two main access methods are: o o Sequential access Direct (Random) access Reposition: Set current file position to a specified value. which can be performed on files. write. Access/modification: When the information from the file is used. memory contents should be written back to disk. All Rights Reserved C3: Protected . The conversion from logical records to physical blocks is relatively simple software problem. Again. Two steps are necessary to create a file. Once that block is read. First. a system call is made specifying both the name of the file and the information to be written to the file. The write pointer must be updated. In either case. Writing a file. Given the name of the file. we need to consider the operations. the last 99 bytes would be wasted. Using this pointer. large block sizes cause more internal fragmentation. it should be accessed and read to main memory. then a file of 1949 bytes would be allocated 4 blocks (2048bytes). Reading a File. space in the file system must be found for the file. would be implemented. The packing can be done either by the user’s application program or by the operating system. let us look at these file operations in more detail. Release all the file space and erase the entry. some portion of the last block of each file may be wasted. and delete files. This operation does not require the actual I/O but might be restricted by access method. the file may be considered to be a sequence of blocks. To define a file properly. In this way successive writes can be used to write a sequence of block to the file. Second. And again. Cognizant Technology Solutions. Truncating: Saves all attributes of the file. To write a file. All of the basic I/O function operates in terms of blocks.Fundamentals of Computer Technology Knowledge of the logical record size. Page 85 ©Copyright 2007. It should then be easy to see how similar operations. physical block size and packing technique determine how many logical records are packed into each physical block. the address of the next block can be computed and the information can be written. Let us consider what the operating system must do for each of the five basic file operations. In general. System calls are provided to create. Notice that allocating disk space in blocks means that. File Operations A file is an abstract data type. rewind. To read from a file. a system call specifies the name of the file and where (in memory) the next block of the file should be put. The directory entry records the name of the file and its location in the file system. the pointer is updated. an entry for the new file must be made in the directory.

open counter would be incremented by one. Open operations would put the entry into local process file table and check global file table for correspondent entry. Delete a file. only this small table is searched. Having found the associated directory entry. In general. To delete a file. such as a printer or a display. the entry will be deleted from the global table. and the current file position is simply reset to the gaining of the file. require that a file be opened explicitly by the programmer with a system call (open) before it can be used. More commonly. Rewinding a file need not involve any actual I/O rather the directory is searched for the appropriate entry. many systems will open a file when it first becomes actively used. Some systems implicitly open a file when the first reference is made to it. When the file is no longer actively used. we will also want to edit the file and modify its contents.Fundamentals of Computer Technology Appending. In this case it is demanded. not the entire directory. it is closed and removed from the table of open files. we search the directory for the named file. a current file position. most systems have only one. A common modification is appending new information to the end of an existing file. The (open) system call will typically return a pointer to the entry in the table of open files. If the entry was found. avoiding any further searching. a file is either being read or written. The nine operations described above are certainly the minimal required file operations. Renaming. The open operation takes a file name and searches the directory. else new entry would be created. All Rights Reserved C3: Protected . When a file operation is requested. Page 86 ©Copyright 2007. Copy: Can be constructed from create. is used in all I/O operations. not the actual file name. that file would be opened/closed explicitly. The operating system keeps a small table containing information about all open files. Close operations would decrement open counter of correspondent entry in the global table. It is known that all of the operations mentioned involve searching the directory for the entry associated with the named file. saving space in the directory entry. a read pointer and a write pointer. we release all file space (so it can be reused by other files) and invalidate the directory entry. This pointer. however. We may want to create a copy of a file. The file is automatically closed when the job or program that opened the file terminates. If counter becomes zero. Cognizant Technology Solutions. The directory entry contains all of the important information needed to operate on the file. truncate. To avoid this constant searching. copying the directory entry into the table of open files. Rewind a file. read/write and delete operation or implemented independently. Most systems. we may want to rename an existing file. Both the read and write operations use this same pointer. Since files are named objects. thus although it would be possible to have two pointers. and reducing the system complexity. Open/Close: Some systems allow using file by more then one user. or copy it to an I/O device.

This is by far the most common mode of access of files. for some integer n (perhaps only for n = 1). and advances the file pointer to the new end. TLB lookup is one example of a keyed search Random (Direct) access o o o Other access methods. Some systems provide only one access method for files. a program may be able to skip forward or back n records.. and on some systems. All Rights Reserved C3: Protected . They are often used in accessing large databases. Such a file can be rewound. The read operation on a file automatically advances the file pointer. This information must be accessed and read into computer memory before it is used. Sequential access is based upon a tape model of a file. which is based upon a disk model of a file. editor programs usually access files in this fashion. This scheme is known as sequential access to a file. one record after the other. the file is viewed as a numbered sequence of blocks or records. then read block 53. Thus we may read block 14. On other systems. The information stored in a file can be accessed in a variety of methods: Sequential access o in order. Direct Access An alternative access method is direct access. such as those of IBM. such as indexed. in any order. For example. Similarly a write appends the new information to the end of the file.Fundamentals of Computer Technology File Access Files store information. Sequential Access Information in the file is processed in order. Page 87 ©Copyright 2007. There are no restrictions on the order of reading or writing for a direct access file. then read or Each read specifies the file pointer Keyed.g. There are several ways the information in the file can be accessed. and then write block 7. we compute which block contains the answer and then read that block directly to provide the desired information. can be built on top of the above basic techniques. When a query concerning a particular subject arrives. Cognizant Technology Solutions. and choosing the right one for a particular application is a major design problem. A direct access file allows arbitrary blocks to be read or written. one record after another o read all bytes/records from the beginning o o cannot jump around. For direct access. Direct access files are of great use for immediate access to large amounts of information. e. hash table or dictionary. but with particular value(s). could rewind or back up convenient when medium was mag tape bytes/records read in any order skipping the previous records essential for data base systems read can be • • Move file pointer (seek). and so the concept is less important. many different access methods are supported.

Some systems allow only that a file is defined as sequential or direct when it is created. the user need be concerned only with the logical directory and file structure.. Files are represented by entries in a device directory or volume table of concerns. location. and type. A relative block number is an index relative to the beginning of the file. The file directory entry concentrates on logical properties of each name: file. and so on. The block number provided by the user to the operating system is normally a relative block number. A directory structure provides a mechanism for organizing the many files in the file system. An alternative approach is to retain read next and write next. it becomes increasingly difficult for the users to organize and keep track of all of the files on the file system. Then to perform a read block n. Our main interest now is with the file directory structure.Fundamentals of Computer Technology The file operations must be modified to include the block number as a parameter. In fact. how it is allocated. In this way. The index. The use of relative block numbers allows the operating system to decide where the file should be placed. The device directory records information. even though the actual absolute disk address of the block may be 14703 for the first block. Page 88 ©Copyright 2007. contains pointers to the various blocks. A file directory entry may simply point to the device directory entry to provide physical properties or may duplicate this information. The file directories are a logical organization of the files on all devices. many systems actually have two separate directory structures: the device directory and the file directories. where n is the block number. protection access code. for all files on that device. as with sequential access. Other Access Methods Other access method can be built on top of a direct access method. where n is the block number. owing user. Thus the first relative block of the file is 0. position file to n. Some systems start their relative block number at 0. and to add an operation. however.is 1. A device directory may be sufficient for a single-user system with limited storage space. and can completely ignore the problems of physically allocating space for files. rather than read the next. device directories should be well understood. how long it is. such a file can only be accessed in a manner consistent with its declaration. As the amount of storage and the number of users increase. accounting information. The primary index file would contain pointers to secondary index files which then point to the actual data items. others start at 1.. These additional methods generally involve the construction of an index for the file. To find an entry in the file the index is consulted first. and so on. we would position to block n and then read next. like an index in the back of a book. and so on. The device directory is stored on each physical device and describes all files on that device. the next. size. With large files the index file itself may become too large to be kept in memory. The device directory entry mainly concentrates on describing the physical properties of the files: where it is. Not all operating systems support both sequential and direct access for files. and write block n rather than write the next. All Rights Reserved C3: Protected . One solution is then to create an index for the index file. file type. and 14704 for the second. It may span device boundaries and include several different disk units. Thus we have to read block n. and prevents the user from accessing portions of the file system that may not be part of his file. such as name. Cognizant Technology Solutions.

then release the space allocated to it. and decreases the average search time.Fundamentals of Computer Technology The particular information kept for each file in the directory varies from operating system to operating system. we must firt search the directory to be sure that no existing file has the same name. This is simple to program but time consuming in execution. when a file is open. If we think of the directory as a symbol table that translates file names into their directory entries. Page 89 ©Copyright 2007. delete entries. Next we consider what data structure is used for the directory. File name. the directory information about this file is brought into main memory. For those systems that support different types. To create a new file. Protection. Then we can add a new entry at the end of the directory. date and process identification. we do not have to sort before listing). however. In a system with a large number of files. We want to be able to insert entries. (b) last modification. A linked binary tree might help here. Size . To reuse the directory entry. Current Position . These can be useful for protection and usage monitoring. Access control information of the number of processes that are currently using (have opened) this file. as needed. search for a named entry and list all the entries in the directory. we can do one of several things. To delete a file. However. Location. More specifically. the list must be kept sorted. This requirement may complicate creating and deleting files. words of blocks) and the maximum all owner size. The following is a list of some of the information. the search algorithm is more complex to program. A third alternative is to copy the last entry in the directory in the freed location and decrease the length of the directory. of course. It may take from 16 to over 100 bytes to record this information for the each file. We can mark it unused (a special name such as an all-blank name. or a used/unused bit in each entry). Not all systems keep all this information. A pointer to the device and location on that device of the file. All Rights Reserved C3: Protected . (Notice. A sorted list allows a binary search.A pointer to the current read or write position in the file. File type. the size of the directory itself may be hundreds of thousands of bytes. The real disadvantage of a linear list of directory entries is the linear search to find a file. it becomes apparent that the directory itself can be organized in many ways. A linear list of directory entries requires a linear search to find a particular entry. This information remains there until the file is closed. Cognizant Technology Solutions. A linked list can also be used to decrease the time to delete a file. The symbolic file name. In addition. and (c) last use. that if we want to be able to produce a list of all files in a directory sorted by file name. or attach it to a list of free directory entries.The current size of the file (in bytes. we search the directory for the named file. thus the device directory may need to be stored on the device and brought into memory piecemeal. since we may have to move substantial amounts of directory information to maintain a sorted directory. Time. This information may be kept for (a) creation. which may be kept in a directory entry.

The directory is essentially a symbol table. The directory is essentially a symbol table. Fig. 4. 4. and are in use.19. and are in use.20: Two-level Directory Systems Fig.Fundamentals of Computer Technology Directories Many different file directory structures have been proposed.20. The operating system takes the symbolic file name and finds the named file. Page 90 ©Copyright 2007. Cognizant Technology Solutions. 4.21: Hierarchical Directory systems Many different file directory structures have been proposed. We examine some directory structures here in figures. 4. 4. The operating system takes the symbolic file name and finds the named file. All Rights Reserved C3: Protected .21 Fig. We examine some directory structures here. 4.19: Single –level Directory Systems Fig.

the file can be copied to tape and the disk space of that file released for reuse by another file. which are to be performed on a directory. Create File. In this case. List Directory. Linked list cannot be used for simplifying delete/create operation. and similar names may indicate a relationship between the files. Search. The implementation of Directory is given below: Linear List (Unsorted) Linear List of filenames with pointers to data blocks Search of each entry may involve going through the whole list. make some step. we may want to be able to find all files that match a particular pattern. it is generally a good idea to save the contents and structure of the file system at regular intervals. We need to be able to search a directory structure to find the entry for a particular file. that allow reusing the entry.Fundamentals of Computer Technology Directory Structure Organization When considering a particular directory structure. Delete file: search list for the named file. associate used bit with each entry. When a file is no longer needed. Create file methods: search the list of the file with the same name. add new entry to the end of the list or insert it to the first unused entry spot. insert new entry to the proper position. shift the rest of the list back at one entry. Backup. All Rights Reserved C3: Protected . we need to keep in mind the operations. if not found. use the linked list implementation for the list. add all the space of the file to the free space list. Delete File. Disadvantages: Many write operations are involved to create/delete a file. Disadvantages: Traversing the whole directory list takes a lot of disk reads which makes search very slow Sorted Linear List List of filenames sorted in alphabetical order with pointers to datablock Search takes only logarithmical number of entry checks Create file method: find the proper position of the new entry. Advantages: Simplicity and Universality. This often consists of copying all files to magnetic tape. copy the last entry to the freed spot and keep track of list size. This provides a backup copy in use. reposition the rest of the list. Page 91 ©Copyright 2007. we want to remove it from the directory. We need to be able to list the files in a directory and the contents of the directory entry for each file in the list. New files need to be created and added to the directory. keep list of free directory entries. Advantages: Faster search and Universality. For reliability. Since files have symbolic names. Possible steps of reusing an entry: give an entry special name. Delete file method: find the entry and release the file’s space. Cognizant Technology Solutions.

All Rights Reserved C3: Protected . But there are some issues such as reliability. the major types of file allocation (which defines the implementation): Contiguous Allocation Linked Allocation File Allocation Table Index Allocation Page 92 ©Copyright 2007. Hast function is used to map the filename into entry lndex. which can be treated differently. Depending on addressing.Fundamentals of Computer Technology Balanced Tree or Tree-like structure Search in average takes only logarithmical time. create or delete a file need to just convert the name into index. Create/Delete methods in average take logarithmical number of repositioning. To get any particular block from disk is just the matter of time. effective space usage. stored on disk can be modified on place. Advantages: All methods implementation is fast and simple and Universal. The general issue with any file implementation is internal fragmentation. possible source of errors. These characteristics more or less define how files are implemented on the low level. Advantages: Faster method implementation might be better for certain logical directory structures. Disadvantages: Resizing issue. To search. Programming overheads and does not represent Graph logical structure for the directory in a reasonable way. Space allocation techniques for files and directories The most important characteristic of the disk secondary storage are: Disk is divided on fixed size blocks All I/O transfers between memory and disk are performed in units of blocks Any information is allocated and stored on the disk in blocks. Cognizant Technology Solutions. Information. convenience. using hash function. access rate. To access/modify any particular information in the file we need to read corresponding block from this collection into memory and offset correspondingly. Disadvantages: Sophisticated. Need some mechanism to resolve collisions. Hash Table Entries are stored in the linear list. Disk supports both sequential and random access. Any file on the low level can be viewed as the collection of blocks.

Let the system relocate file into bigger hole. This way is also the least convenient. the disk hole that is good enough for the file should be found using the chosen algorithm for finding the hole. if file size is not specified properly difficult to resize. This also leads for ineffectively used space. If one block is corrupted all the rest blocks of file are inaccessible. Problems: Unequally supports sequential and random access. Last block contains invalid number. Problems: Effectiveness of space usage: finding the free space for the file. and pre-allocation for the file leads to internal fragmentation. Cognizant Technology Solutions. Convenience: need to specify the file size upfront. which is not trivial task for user. This problem can be decreased through allocating and accessing files by clusters. If file exceeds declared size terminates modification and let user to reallocate bigger size. Two ways to deal with resizing issue o Rely on user declaration of the size. Space required for pointers. All Rights Reserved C3: Protected . external fragmentation.Fundamentals of Computer Technology Contiguous Allocation Uses the ideas of contiguous multiple partition memory allocation with allocation unit equal to one block Each file occupies contiguous set of blocks on the disk Disk addresses define the linear ordering of blocks on the disk All information about file location property is implemented through file starting block and file size in blocks To create the file of specified size. Page 93 ©Copyright 2007. To create a new file just create directory entry with negative head and tail block numbers. Random is much slower. To read need read blocks from the head to desired block in order No external fragmentation No resizing issues. Supports sequential and random access equally efficiently. Write causes a free block to be found and added to the tail of the list with changing tail block number in directory. when the original hole is overgrown. Possibility to be linked to wrong block due to read error can damage big part of file system that doesn’t belong to this particular file. Then correspondent entry should be made in directory. To access information in the file need to find number B of the block on which this information resides and access the disk block number starting block + B. o Linked Allocation File is implemented as linked list of blocks Directory entry contains the head and tail block numbers Each block contains the number of next block.

Fundamentals of Computer Technology File Allocation Table (FAT) Variation of linked allocation Section of the disk at the beginning of each partition is reserved for FAT. Advantage: No external fragmentation and equal support for sequential and random access Page 94 ©Copyright 2007. If the block number B is not used by the file. Cognizant Technology Solutions. Indexed Allocation Similar to paging memory allocation Blocks are allocated to the file from wherever free disk space is found Each file has additional index block. the number of index block is contained by directory entry. This eases the reliability control and improves random access rate Incorporate the free space management data in the same table. then B-th entry to the FAT is number of next block in the file. slows the sequential access Reliability Advantage Locality of addresses improved. the B-th entry to the FAT is 0 If the block number B is the last block of the file. FAT has one entry for each disk block and is indexed by block number If the block number B belongs to the file. All Rights Reserved C3: Protected . Index block implements location property. the B-th entry to the FAT is end_of_file. which is specially defined by the OS number Problems If FAT is not cached. Index block contains number of blocks allocated to the file in order of allocation.

Ready.the mechanism that an operating system or program uses to organize and keep track of files. Processes are allocated to the CPU as per some standard non-preemptive and preemptive algorithms.Fundamentals of Computer Technology Summary Primary functions of an OS are: o o o o Memory Management Process Management Device Management File and Information Management A process is a program in execution A process life cycle runs through the states New. also referred to as a file management system or file system. Running. File system provides the access methods for accessing files. Blocked. A file system. Partitioned memory allocation is of two types. Page 95 ©Copyright 2007. is exactly what its name implies . and does the directory implementation. Cognizant Technology Solutions. All Rights Reserved C3: Protected . Single contiguous memory allocation is used for small operating system with no special requirement for hardware and software. Static Partitioning and Dynamic Partitioning. maintains directory structures. Completed in a deterministic manner.

The first category contains devices that perform input and output operations. In others. A mechanical component is the device. Memory Mapped I/O Understand Direct Memory Access Understand how computer I/O devices work Overview In previous sessions. with primary storage being provided by the main memory of the computer. the device most often used for distributing software is the CDROM or DVD. For example. Computer peripherals can be divided into two categories. and the emergence of many innovative applications on the World Wide Web. memories. floppy disks. in particular magnetic disks. you will be able to: Understand Hardware I/O. Connection of I/O bus to input – output devices Page 96 ©Copyright 2007. such as the keyboard.Fundamentals of Computer Technology Session 5: I/O Interfacing Learning Objectives After completing this module. we discussed about hardware and software features of processors. including the hardware and software facilities. are used for on-line storage of data. such as optical disks. We also discussed the means by which a computer communicates with external devices. In this context. Cognizant Technology Solutions. and magnetic tapes. printer and video display. the computer consists only of the processor and its memory. Much of the tremendous growth in the computer field in recent years is a result of the synergy between computers and communications. These developments have touched every aspect of our lives. while the electronic component is the device controller. This session presents the characteristics of some commonly used computer peripherals and how they are connected in a computer system The name peripheral refers to any external device connected to a computer. the storage medium can be removed from the drive unit for transferring data from one computer system to another. I/O hardware consists of mechanical and electronic components. among the most important computer peripherals are devices that provide connection to the Internet. Programmed I/O. from business to entertainment and education. Today. Some mass storage devices. All Rights Reserved C3: Protected . The second category contains devices intended primarily for secondary storage of data. mouse.

e. and Control Processor places a particular address on address lines Device which recognizes the address responds to the commands on Control lines Processor requests for either Read / Write (i..Fundamentals of Computer Technology I/O bus Processor Data Address Control Interface Interface Interface Interface Keyboard and display terminal Printer Magnetic disc Magnetic tape Fig 5.1 shows the way the I/O devices and the CPU are connected to the I/O Bus. SOUT Data Registers like Data-IN. Input / Output) The data will be placed on the Data lines Any machine instruction that can access memory can be used to transfer data to or from I/O devices Hardware to connect I/O Device to BUS Interface Circuit: o o o o Address Decoder Control Circuits Data registers Status registers The Registers in I/O Interface Status Registers like SIN. Cognizant Technology Solutions.1: I/O Bus and I/O devices Fig 5. All Rights Reserved C3: Protected . Data-OUT Page 97 ©Copyright 2007. Accessing I/O Devices Most modern computers use single bus arrangement for connecting I/O devices to CPU & Memory Bus consists of a set of 3 lines -: Address. Data.

Cognizant Technology Solutions. Useful in small low-speed computers or in systems that are dedicated to monitor a device continuously. memory and I/O devices usually communicate via the system register An I/O device is connected to the bus via I/O ports which from CPU’s perspective is an addressable data register The address line of the system bus used to select memory locations can also be used to select IO devices Modes of addressing: o o Memory-mapped I/O: single address space for memory locations and I/O devices Isolated I/O: address space for I/O is isolated from the memory address space Memory Mapped I/O Data Address READ WRITE Main memory CPU I/O port 1 I/O port 2 I/O port 3 I/O device A I/O device B Fig 5.2: Memory Mapped I/O Page 98 ©Copyright 2007. CPU. All Rights Reserved C3: Protected . Inefficient as the CPU wastes time in checking the flag instead of doing some other useful processing task.Fundamentals of Computer Technology Implementation of I/O operations Programmed I/O Interrupt Driven I/O Direct Memory access (DMA) I/O Processor (IOP) Programmed I/O Here Processor repeatedly checks the status flag to achieve synchronization between CPU and I/O devices.

which requires computations to be performed and results to be printed on Line printer This is followed by more computations and output Program consists of 2 routines COMPUTE & PRINT The printer accepts only one line at a time PRINT routine should send 1 line of text at a time and wait for getting it printed The above simple approach is time consuming.2 Used in Motorola 680X0 series Isolated I/O The main memory and I/O lines are separate as shown in Fig 5. it sends an INTERRUPT signal to the processor. Cognizant Technology Solutions. to execute COMPUTE routine while printing is in progress.e. Alternatively.3 Used in Intel 80X86 series Data Address READ M WRITE M READ IO WRITE IO Main memory CPU I/O port 1 I/O port 2 I/O port 3 I/O device A I/O device B Fig 5.Fundamentals of Computer Technology A part of main memory address space is assigned to the I/O ports The same address and data lines are used as shown in Fig 5. the CPU can issue I/O command to a module and can perform some other task. as CPU has to wait for long time If it is possible to overlap printing & computation. When I/O Device is ready.1 Consider a task. faster overall speed of execution can be achieved Page 99 ©Copyright 2007. One of the Bus Control lines is dedicated for interrupt request Using Interrupts.3: Isolated I/O Interrupt –Driven I/O In programmed I/O. i. All Rights Reserved C3: Protected . WAIT period of the CPU is eliminated Example 5. CPU busily waits for the I/O module for transmission and reception of data.

between EXTERNAL devices & Main Memory. We have discussed the data transfer between Processor & I/O devices For I/O transfer. All Rights Reserved C3: Protected . Processor determines the status of I/O devices To do this o Processor either polls a status flag in I/O Interface device (or) o CPU waits for the device to send Interrupt signal Considerable overhead is incurred in the above I/O transfer processing To transfer large blocks of data at high Speed. Printer sends an Interrupt Signal to the CPU In response. which is the number of words in the memory block o o Control to specify the mode of transfer such as read or write A control to start the DMA transfer After receiving information. COMPUTE routine is executed to produce n lines of output PRINT routine is executed to send first line of text to printer PRINT routine is temporarily suspended Execution of COMPUTE routine can continue After completion of printing of current line. Second register stores Word count Third register contains status and control flags Page 100 ©Copyright 2007. the processor sends the following data to controller o The starting address of the memory block where data are available (for read) or where data are to be stored (for write) o The word count. DMA controller proceeds to perform the requested transfer After entire transfer of word block. Cognizant Technology Solutions.Fundamentals of Computer Technology How to achieve better Speed of Execution? First. DMA controller sends an Interrupt signal to Processor Registers in a DMA Interface The first register stores the starting address. CPU stops execution of COMPUTE routine CPU transfers control to PRINT routine PRINT routine sends next line to Printer Direct Memory Access (DMA) So far. DMA approach can be used The continuous intervention by Processor can be drastically reduced DMA controller allows data transfer between I/O device and Memory DMA controller acts as a Processor CPU controls the operation of DMA controller To initiate the transfer of blocks of words.

READ operation o R/W bit = 0. such as arithmetic. a special circuit called BUS ARBITER is used Bus Arbiter co-ordinates the activities of all devices requesting Memory Transfers Input-Output Processor (IOP) Processor with direct memory access capability that communicates with I/O devices Unlike the DMA controller that must be setup entirely by the CPU. Cognizant Technology Solutions. this flag causes the controller to raise an Interrupt after data transfer IRQ -: (Interrupt Request) IRQ bit will be 1. logic. All Rights Reserved C3: Protected . WRITE operation Done Flag -: It will be 1.Fundamentals of Computer Technology Status & Control Flags R/W bit determines the direction of data transfer o R/W bit = 1. DMA controller sends Interrupt signal to the Processor Operating system. IOP can fetch and execute its own instructions IOP instructions are specially designed to facilitate I/O transfer IOP can also perform other processing tasks. puts the suspended program in Runnable state so that. when it has requested an interrupt Role of Operating System in DMA transfer I/O operations are always performed by the Operating System of the computer in response to a request from an application program Operating system initiates the DMA operation for the current program Operating system starts the execution of another program After transfer. when controller finishes data transfer IE (Interrupt Enable flag): When set to 1. branching and code translation Page 101 ©Copyright 2007. it will be selected NEXT for I/O transfer BUS ARBITER DMA controller & Processor should not use the same BUS at a time to access Main Memory Different DMA controllers used for various I/O devices should not use same BUS to access Main Memory To solve the above conflicts.

You do not need special commands to access them. For example. I/O devices are treated as special files. Cognizant Technology Solutions. Similarly. a user who has the ‘read’ permission for a file on the hard disk can only view its contents. standard output. Cp<filename> /dev/lp Since I/O devices are treated as files in UNIX. you can apply permissions. printers and disks are files. The standard input file is the keyboard. When a process starts. For example. Each I/O device is assigned a path name. such as the ‘read’ or ‘write’ permissions on the files. you can grant or deny various access to a device. such as printer. while a user with the ‘read’ and ‘write’ permissions can view it and modify its contents. a line printer would be stored as /dev/lp. For example. three special files are automatically opened: standard input. while the standard output file and standard error file is the VDU. For example. usually /dev. Page 102 ©Copyright 2007. the following command copies or prints the file that you specify in <filename> to the printer.4: Block Diagram of a Computer with IOP I/O Management In UNIX. in the context of an I/O device. and standard error. All Rights Reserved C3: Protected . You can access the special files in UNIX in the same way as you access other files.Fundamentals of Computer Technology Block diagram of a computer with Input-Output Processor Central processing unit (CPU) Peripheral Devices Memory Unit Memory bus PD PD PD PD Input-Output Processor (IOP) I/O bus Fig 5.

Some of the driver files and their functions are listed in the following table. enable you to read and write data on the device as a character stream. to the computer. To copy or display a file to the VDU (also called a console).sys to distinguish it from other files. Character special files. block special files and character special files. In DOS. The config. A driver file can also be given the extension . The driver is compiled as a . Cognizant Technology Solutions.sys system file loads the device driver and the device can then be used in the computer Page 103 ©Copyright 2007. you can use the command: Copy file con This command copies the contents of the file to the console. UNIX implements I/O using a collection of device drivers. such as C. Block special files. such as a tape drive or a digital musical instrument.exe file.sys. you can add a device. When a process starts. in which each driver typically controls one device. enable you to individually address and access the data stored on each block of the device. This is in contrast to UNIX. All Rights Reserved C3: Protected . standard output. such as hard disks. you need to specify the path of the device driver file in a DOS system file called config. such as printers. To add the device.SYS MOUSE. you can install the device driver whenever you want. The drivers are linked to the operating system when the kernel is generated. Table 5. where the device drivers are compiled in the kernel and cannot be installed once the compilation is done.SYS RAMDRIVE. files and devices MS-DOS Similar to UNIX. serial port and the printer. The kernel is the core of the operating system and manages the memory. Each device driver in DOS is written in programming language. standard error. The code in the driver performs the I/O operation.Fundamentals of Computer Technology The special files in UNIX are divided into two categories. It supports both character special and block special files for input and output. MS-DOS treats its devices as files. five files are opened: standard input.1: The Driver Files and their functions Driver File DISPLAY.SYS Function contains the console driver that supports a foreign language contains the mouse driver contains the printer driver that supports a foreign language contains the RAM disk driver for the extended memory To install the device.com or a .SYS PRINTER.

The OS automatically configures itself so that it can attach devices such as the VDU and the printer. interrupts. and ‘play’ it without configuring the device manually. All Rights Reserved C3: Protected . devices are installed on a computer using the plug-and-play feature. Data. DMA and I/O Processor Page 104 ©Copyright 2007. Plug-and-play is a set of specifications that enables you to ‘plug’ in a device. and Control I/O operations are implemented through Programmed I/O. Summary Most modern computers use single bus arrangement for connecting I/O devices to CPU & Memory Bus consists of set of 3 lines -: Address.Fundamentals of Computer Technology Windows Family In windows 95 and windows 98 series. Cognizant Technology Solutions. Windows 2000 and XP supports the above feature.

HTTP. such as TCP. As if this weren’t enough. Another popular LAN protocol for PCs is the IBM token-ring network. In the field of telecommunications. and robust connectivity among a large number of computers. but must evolve to accommodate changes in both the underlying technologies upon which they are based as well as changes in the demands placed on them by application programs. UDP. Many protocols exist in computer networking ranging from the high level to the low level. signaling. The communication protocols for digital computer network communication have many features intended to ensure reliable interchange of data over an imperfect communication channel. It also may include conventions like message acknowledgement or data compression to support reliable and/or high-performance network communication. and FTP. like TCP/IP. cost effective. a communications protocol is the set of standard rules for data representation. The Internet Protocol family includes Internet Protocol (IP) and all higher-level network protocols built on top of it. Designing a network to meet these requirements is no small task. A network protocol defines a "language" of rules and conventions for communication between network devices. Cognizant Technology Solutions. An example of a simple communications protocol adapted to voice communication is the case of a radio dispatcher talking to mobile stations. fair. Modern operating systems include services or daemons that implement support for a given network protocol. networks do not remain fixed at any single point in time. Communication protocol is basically following certain rules so that the system works properly. Page 105 ©Copyright 2007. All Rights Reserved C3: Protected . Some protocols. A protocol includes formatting rules that specify how data is packaged into messages.Fundamentals of Computer Technology Session 6: Network Protocols and Cognizant Network System Learning Objectives After completing this session. authentication and error detection required to send information over a communications channel. A Computer network must provide general. One of the most popular protocols for LANs is called Ethernet. you will be able to understand Network Protocols OSI Reference model TCP/IP Protocol Definition The protocol defines a common set of rules and signals that computers on the network use to communicate. have also been implemented in silicon hardware for optimized performance.

for example. The top three layers define how the applications within the end stations will communicate with each other and with users. and Figure 6. which are divided into two groups. it is a set of guidelines that application developers can use to create and implement applications that run on a network.2: The Lower 4 Layers of OSI Page 106 ©Copyright 2007. you can see that the user interfaces with the computer at the application layer. Fig 6. The bottom four layers define how data is transmitted end-to-end. Remember that none of the upper layers know anything about networking or network addresses. This means that you can transfer data between a UNIX host and a PC. Figure 6. It also provides a framework for creating and implementing networking standards. One of the greatest functions of the OSI specifications is to assist in data transfer between disparate hosts. and internetworking schemes.2. The OSI is not physical.Fundamentals of Computer Technology The Open Systems Interface (OSI) Reference Model The OSI reference model was created in the late 1970s to help facilitate data transfer between network nodes. That is the responsibility of the four bottom layers. All Rights Reserved C3: Protected . rather. Cognizant Technology Solutions.1.2 shows the four lower layers and their functions. Fig 6.1: The Upper 3 Layers of OSI In Figure 6. The OSI has seven different layers. and also that the upper layers are responsible for applications communicating between hosts. devices. which are shown in Figure 6.1 shows the three upper layers and their functions.

it remains today the most popular means of comparison for protocol suites. The OSI Layers The International Standards Organization (ISO) is the Emily Post of the network protocol world. The OSI reference model has seven layers: The Application layer The Presentation layer The Session layer The Transport layer The Network layer The Data Link layer The Physical layer Figure 6. The following pages discuss this in detail. Just like Ms. a) Layer functions Page 107 ©Copyright 2007. Cognizant Technology Solutions. All Rights Reserved C3: Protected .3 shows the functions defined at each layer of the OSI model. Defining the etiquette of communication models.Fundamentals of Computer Technology The four bottom layers define how data is transferred through a physical wire or through switches and routers. who wrote the book setting the standards—or protocols—for human social interaction. Post. the ISO developed the OSI reference model as the precedent and guide for an open network protocol set. and how to rebuild a data stream from a transmitting host to a destination host’s application.

3: OSI Layer Function Page 108 ©Copyright 2007.Fundamentals of Computer Technology b) Layer based Network Architecture Fig 6. Cognizant Technology Solutions. All Rights Reserved C3: Protected .

market trading.400 standard to deliver messages between different e-mail applications. but for present and future internetworking. They can also share public domain software. Financial transaction services Target the financial community. and Alta Vista. E-mail gateways Are versatile and can use Simple Mail Transfer Protocol (SMTP) or the X. client/server processes. applications may unite communicating components from more than one network application. Electronic Data Interchange (EDI) Is a composite of specialized standards and processes that facilitate the flow of tasks such as accounting. remote access. Many network applications provide services for communication over enterprise networks. shipping/receiving. the need is fast developing to reach beyond their limits. and order and inventory tracking between businesses. network management activities. video. Netscape Navigator. for example. currency exchange rates. and other browsers like Mosaic simplify both accessing and viewing Web sites. Excite. Yahoo !. Internet navigation utilities Include applications like Gopher and WAIS. which help users locate the resources and information they need on the Internet. file transfers. e-mail. Cognizant Technology Solutions.Fundamentals of Computer Technology The Application Layer The Application layer of the OSI model is where users communicate with the computer. Special interest bulletin boards Include the many Internet chat rooms where people can connect and communicate with each other either by posting messages or engage in a live conversation through typing. and credit data to their subscribers. The Application layer is responsible for identifying and establishing the availability of the intended communication partner and determining if sufficient resources for the intended communication exist. and even sound. text. All Rights Reserved C3: Protected . Most are multimedia and include some or all of the following: graphics. Internet Explorer. transactions and information exchanges between organizations are broadening to require internetworking applications like the following: World Wide Web (WWW) Connects countless servers (the number seems to grow with each passing day) presenting diverse formats. They gather and sell information pertaining to investments. Although computer applications sometimes require only desktop resources. Today. and information location. commodities. as well as search engines like Google. Page 109 ©Copyright 2007.

Cognizant Technology Solutions. Page 110 ©Copyright 2007. encryption.Fundamentals of Computer Technology The Presentation Layer The Presentation layer gets its name from its purpose: It presents data to the Application layer. QuickTime This is for use with Macintosh or PowerPC programs. Tasks like data compression. one signed number representation to another). Computers are configured to receive this generically formatted data and then convert the data back into its native format for actual reading (for example. A successful data transfer technique is to adapt the data into a standard format before transmission. All Rights Reserved C3: Protected . MPEG The Moving Picture Experts Group’s standard for the compression and coding of motion video for CDs is increasingly popular. MIDI The Musical Instrument Digital Interface is used for digitized music. The following serve to direct graphic and visual image presentation: PICT This is picture format used by Macintosh or PowerPC programs for transferring QuickDraw graphics. TIFF The Tagged Image File Format is a standard graphics format for high-resolution. Some Presentation layer standards are involved in multimedia operations. bitmapped images. JPEG The Joint Photographic Experts Group brings these photo standards to us. EBCDIC to ASCII. The OSI has protocol standards that define how data should be formatted. and decryption are associated with this layer. from Little Endian format to Big Endian format. the Presentation layer ensures that data transferred from the Application layer of one system can be read by the Application layer of another host.5Mbps. it manages audio and video applications. Other standards guide movies and sound. decompression. By providing translation services. It provides digital storage and bit rates up to 1. It is essentially a translator and provides coding and conversion functions.

which both establishes and maintains sessions between AppleTalk client and server machines. managing. It also hides details of any network-dependent information from the higher layers by providing transparent data transfer. Some of you might already be familiar with TCP and UDP and know that TCP is a reliable service and UDP is not. Page 111 ©Copyright 2007. The Transport layer is responsible for providing mechanisms for multiplexing upper-layer application. session establishment. X Window Is widely used by intelligent terminals for communicating with remote UNIX computers. and teardown of virtual circuits. half-duplex. The Session layer also provides dialog control between devices. All Rights Reserved C3: Protected . Cognizant Technology Solutions. It coordinates communication between systems and serves to organize their communication by offering three different modes: simplex. or nodes. allowing them to operate as though they were locally attached monitors. Remote Procedure Call (RPC) Is a broad client/server redirection tool used for disparate service environments .The following are some examples of Session-layer protocols and interfaces (according to Cisco): Network File System (NFS) Was developed by Sun Microsystems and used with TCP/IP and UNIX workstations to allow transparent access to remote resources. Its procedures are created on clients and performed on servers. They provide end-to-end data transport services and can establish a logical connection between the sending host and the destination host on an inter network. and then tearing down sessions between Presentation layer entities. Application developers have their choice of the two protocols when working with TCP/IP protocols. and full-duplex The Session layer basically keeps different applications’ data separate from the data of other applications . The Transport Layer Services located in the Transport layer do both namely segmentation and reassembling of data from upper-layer applications and unite it onto the same data stream. AppleTalk Session Protocol (ASP) Is another client/server mechanism. Structured Query Language (SQL) SQL was developed by IBM to provide users with a simpler way to define their information requirements on both local and remote systems.Fundamentals of Computer Technology The Session Layer The Session layer is responsible for setting up.

and data loss.Fundamentals of Computer Technology Flow Control Data integrity is ensured at the Transport layer by maintaining flow control and allowing users the option of requesting reliable data transport between systems. The two operating systems communicate by sending messages over the network confirming that the transfer is approved and that both sides are ready for it to take place. both hosts’ application programs begin by notifying their individual operating systems that a connection is about to be initiated. All Rights Reserved C3: Protected . and the protocols involved ensure the following will be achieved: The segments delivered are acknowledged back to the sender upon their reception. A manageable data flow is maintained in order to avoid congestion. Cognizant Technology Solutions. Connection-Oriented Communication In reliable transport operation.4 portrays a typical reliable session taking place between sending and receiving systems. Any segments not acknowledged are retransmitted. Prevents a sending host on one side of the connection from overflowing the buffers in the receiving host—an event that can result in lost data. overloading. Once the required synchronization is complete. In it. one device first establishes a connection oriented session with its peer system. Fig 6. Segments are sequenced back into their proper order upon arrival at their destination.4: Establishing a connection Oriented session Page 112 ©Copyright 2007. a connection is fully established and the data transfer begins. Reliable data transport employs a connection-oriented communications session between systems. Cisco sometimes refers to this as a three-way handshake. Figure 6.

it sends out a “ready” transport indicator.5). congestion can occur because a high-speed computer is generating data traffic faster than the network can transfer it or because many computers are simultaneously sending datagrams through a single gateway or destination. it then resumes its transmission. the transport can issue a “not ready” indicator to the sender. After the peer receiver processes the segments already in its memory reservoir. The final segment is also an acknowledgment. signaling the sending device to stop transmitting segment traffic to its overwhelmed peer. But. and it will discard any additional datagrams that arrive. datagrams are delivered to the receiving host in exactly the same sequence they’re transmitted. Page 113 ©Copyright 2007. Cognizant Technology Solutions. a gateway or destination can become congested even though no single source caused the problem. During a transfer. connection-oriented data transfer. duplicated. network flood control systems work quite well. The answer to the problem is to have the receiving host acknowledge receiving each and every data segment. If any data segments are lost. the two machines periodically check with each other. it stores them in a memory section called a buffer. reliable. a failure will result in. its flood capacity will be exceeded.4. if the datagram deluge continues. of the flood (as shown in Figure 6. When the machine waiting to transmit the rest of its datagrams receives this “go” indictor.Fundamentals of Computer Technology While the information is being transferred between hosts. However. The second and third segments acknowledge the request and establish connection parameters between hosts. the transmission fails if this order is breached. In the latter case. a device’s memory will eventually be exhausted. Data transfer can now begin. In fundamental. This mechanism works kind of like a stoplight. In either case. The first “connection agreement” segment is a request for synchronization. Instead of dumping resources and allowing data to be lost. or damaged along the way. All Rights Reserved C3: Protected . Usually. The following summarizes the steps in the connection-oriented session pictured in Figure 6. This buffering action solves the problem only if the datagrams are part of a small burst. It notifies the destination host that the connection agreement is accepted and that the actual connection has been established. there are simply too many cars on that freeway. no worries—because of the transport function. communicating through their protocol software to ensure that all is going well and that the data is being received properly. When a machine receives a flood of datagrams too quickly for it to process. or source. no one car is the problem. the problem is basically akin to a freeway bottleneck—too much traffic for too small a capacity.

the sender uses the break to transmit more data. Page 114 ©Copyright 2007. The quantity of data segments the transmitting machine is allowed to send without receiving an acknowledgment for them is called a window. Reality is rarely that simple. Windowing controls how much information is transferred from one end to the other. Configured to a window size of 3. TCP/IP measures it by counting the number of bytes.6(b) shown are windows of size 1 and 3 respectively. While some protocols quantify information by observing the number of packets. When a window size of 1 is configured. it’s allowed to transmit three data segments before an acknowledgment is received. and most often acknowledgments and packets will commingle as they travel over the network and pass through routers.Fundamentals of Computer Technology Fig 6. Cognizant Technology Solutions. but not to worry. the sending machine waits for an acknowledgment for each data segment it transmits before transmitting another. In Figure 6.6(a) and Figure 6. Because there’s time available after the sender transmits the data segment and before it finishes processing acknowledgments from the receiving machine. both the sending and receiving machines are workstations. All Rights Reserved C3: Protected . you’ll learn about applied routing later . Routing complicates things.5: Transmitting segments with flow contrrol Windowing Data throughput would be low if the transmitting machine had to wait for an acknowledgment after sending each segment. In our simplified example.

Page 115 ©Copyright 2007. This technique requires a receiving machine to communicate with the transmitting source by sending an acknowledgment message back to the sender when it receives data. All Rights Reserved C3: Protected . The method that achieves this is known as positive acknowledgment with retransmission. Cognizant Technology Solutions.7. The receiving node acknowledges it has received them by requesting segment 4. the sending machine transmits segments 1. the sender then transmits segments 4. When it receives the acknowledgment. If segment 5 doesn’t make it to the destination.Fundamentals of Computer Technology Fig 6. the receiving node acknowledges that event with a request for the segment to be resent. which it must receive in order to move on to the transmission of segment 7. It guarantees the data won’t be duplicated or lost. When it sends a segment. 5. and 6. and 3.6: Windowing Acknowledgments Reliable data delivery ensures the integrity of a stream of data sent from one machine to the other through a fully functional data link. 2. the transmitting machine starts a timer and retransmits if it expires before an acknowledgment is returned from the receiving end. The sending machine will then resend the lost segment and wait for an acknowledgment. The sender documents each segment it sends and waits for this acknowledgment before sending the next segment. In Figure 6.

All Rights Reserved C3: Protected .Fundamentals of Computer Technology Fig 6. then the router will look up the destination network address in the routing table. Data packets Are used to transport user data through the inter network. Two types of packets are used at the network layer: data and route updates. the router drops the packet. Routers. or other layer-3 devices. If the packet is not destined for the router. This means that the Network layer is responsible for transporting traffic between devices that are not locally attached. If the entry for the destination network is not found in the routing table. Once an exit interface is chosen. the destination IP address is checked. Page 116 ©Copyright 2007. the packet will be sent to the interface to be framed and sent out on the local network. are specified at the Network layer and provide the routing services in an inter network. Cognizant Technology Solutions. and protocols used to support data traffic are called routed protocols.7: Reliable delivery by the Transport Layer The Network Layer The Network layer is responsible for routing through an inter network and for network addressing. When a packet is received on a router interface.

delay of the line. Fig 6. and examples are RIP. that broadcasts are not forwarded through a router. Interface The exit interface a packet will take when destined for a specific network. and OSPF. Each host on the network connected to that router must use that same network number. to name a few.Fundamentals of Computer Technology Route update packets Are used to update neighbor routers about networks connected to routers in the inter network.8: Routing table used in a router The routing table used in a router includes the following information: Network addresses Protocol-specific network addresses. Routers also break up collision domains. Routing update packets are used to help build and maintain routing tables on each router. by default. while others use bandwidth. Page 117 ©Copyright 2007. or even tick count (1/18 of a second). Cognizant Technology Solutions. Protocols that send route update packets are called routing protocols.8 shows an example of a routing table. Routers break up broadcast domains. Metric It is the distance to the remote network. This means. All Rights Reserved C3: Protected . EIGRP. This is good. Different routing protocols use different methods of computing this distance. A router must maintain a routing table for individual routing protocols because each routing protocol keeps track of a network with a different addressing scheme. Each interface in a router is a separate network and must be assigned unique network identification numbers. Some routing protocols use hop count (the number of routers a packet passes through when routing to a remote network). Think of it as a street sign in each of the different languages spoken by the residents on a street. but this can also accomplished through layer-2 switches. Figure 6.

and other tools were attached to the lunar modules of the Apollo project. Layer-3 devices (routers in this case) provide connections between Virtual LANs (VLANs). which work at the Network layer. These various pieces of equipment were useful only during certain stages of space flight and were stripped off the module and discarded when their designated stage was complete. The Data Link layer is responsible for uniquely identifying each device on a local network. Fig 6. Routers use the logical address in a network layer header to determine the next hop router to forward the packet to. Data traveling through networks is similar. The Data Link Layer The Data Link layer ensures that messages are delivered to the proper device and translates messages from the Network layer into bits for the Physical layer to transmit. Page 118 ©Copyright 2007. They also keep track of the best way to get to a remote network. will not forward any broadcast or multicast packets. created by an administrator. This added information forms a sort of capsule that surrounds the original message in much the same way that engines. Routers can use access lists. by default. do not care about where a host is located but only where networks are located. Cognizant Technology Solutions. adding functionality to the existing IEEE standards. All Rights Reserved C3: Protected . navigational devices. Notice in the figure that the IEEE 802.9: Data Link Layer You need to understand that routers. Routers can provide layer-2 bridging functions if needed and can simultaneously route through the same interface. It formats the message into data frames and adds a customized header containing the hardware destination and source address.2 standard is used in conjunction with the other IEEE standards.Fundamentals of Computer Technology Some points about routers that you must remember: Routers. to control security on packets trying to either enter or exit an interface. Figure 6.9 shows the Data Link layer with the Ethernet and IEEE specifications.

first served access where everyone shares the same bandwidth. it is framed with control information at the Data Link layer. Cognizant Technology Solutions. the device will only forward frames to the segment where the destination hardware address is located. The LLC can also provide flow control and sequencing of control bits. Page 119 ©Copyright 2007. After a filter table is built on the layer-2 device. However. but that information is stripped off at the receiving router and only the original packet is left completely intact. it will forward the frame to all connected segments. Switches and Bridges at the Data Link Layer Switches and bridges both work at the Data link layer and filter the frames using hardware (MAC) addresses. error notification (not correction). An LLC header tells the Data Link layer what to do with a packet once a frame is received. only encapsulated with the type of control information to be passed on to the different media types. Physical addressing is defined here. the Data Link layer uses hardware addressing. This tells the switch where that device is located. ASICs can run up to gigabit speeds with very low latency. the switch updates the filter table on that device’s location. This is called transparent bridging. Line discipline. as well as logical topologies. If the destination device is on the same segment as the frame.2 This sublayer is responsible for identifying Network layer protocols and then encapsulating them. the destination address of the transmitting frame may be a broadcast address. The IEEE Ethernet Data Link layer has two sub-layers: Media Access Control (MAC) 802. Bridges and switches read each frame as it passes through the network. If the destination is on another segment. in which case the switch will forward all broadcasts to every connected segment by default. ordered delivery of frames. For example. and optional flow control can also be used at this sub layer. It is important to understand that the packet was never altered along the route. a host will receive a frame and then look in the LLC header to understand that the packet is destined for the IP protocol at the Network layer. the layer-2 device will block the frame from going to any other segments. Each time a packet is sent between routers. Logical Link Control (LLC) 802.Fundamentals of Computer Technology For a host to send packets to individual hosts and between routers. This framing of the packet continues for each hop until the packet is finally delivered to the receiving host. Contention media access is first come. Logical topology is the signal path through a physical topology. If the unknown device replies to this forwarding of the frame. The layer-2 device then puts the source hardware address in a filter table and keeps track of which port it was received on. All Rights Reserved C3: Protected . Layer-2 switching is considered hardware-based bridging because it uses a specialized hardware called Application-Specific Integrated Circuits (ASICs). the frame is only transmitted to that segment. When a layer-2 device (switch) interface receives a frame and the destination hardware address is unknown to the device’s filter table.3 This defines how packets are placed on the media.

In other words. All Rights Reserved C3: Protected . The CCNA course and exam are only interested in the Ethernet standards. while the DTE is the attached device. Different kinds of media represent these bit values in different ways. creating the physical star effect. allowing disparate systems to communicate. Some use audio tones. The Physical layer communicates directly with the various types of actual communication media. Every device connected to the hub. or DCE. The DCE is usually located at the service provider. The biggest benefit of using switches instead of hubs in your inter network is that each switch port is its own collision domain. A repeater receives a digital signal and re-amplifies it or regenerates the digital signal. If you wanted to connect to a Token Ring switch or LAN. However. or hubs. Hubs. and the various qualities of the physical media’s attachment interface. The Physical layer’s connectors and different physical topologies are defined by the OSI as standards. Layer-2 devices propagate layer-2 broadcast storms. Bits come only in values of 1 or 0—a Morse code with numerical values. is identified. The services available to the DTE are most often accessed via a MODEM or Channel Service Unit/Data Service Unit (CSU/DSU). switches and bridges do not break up broadcast domains. The only way to stop a broadcast storm from propagating through an inter network is with a layer-3 device (router). each device connected to the switch must use an Ethernet frame type. Page 120 ©Copyright 2007. like repeaters. and functional requirements for activating. or DTE. instead forward all broadcasts. then forwards the digital signal out to all active ports without looking at any data. This means that the signal has to run from end to end of the network. Hubs allow only one device per network to communicate at a time. Any digital signal received from a segment on a hub port is regenerated or re-amplified and transmitted out all ports on the hub.Fundamentals of Computer Technology All devices that the broadcast is forwarded to are considered to be in the same broadcast domain. Ethernet networks use a logical bus topology. maintaining. whereas a hub creates one large collision domain. the interface between the Data Terminal Equipment. Another benefit of LAN switching over hub implementations is that each device on every segment plugged into a switch can transmit simultaneously because each segment is its own collision domain. do not look at any traffic as they enter and are transmitted out to the other parts of the physical media. Cognizant Technology Solutions. However. and deactivating a physical link between end systems. while others employ state transitions— changes in voltage from high to low and low to high. Specific protocols are needed for each type of media to describe the proper bit patterns to be used. Hubs at the Physical Layer Hubs are really multiple port repeaters. Switches cannot translate between different media types. you would need a router to provide the translation services. This means that all devices plugged into a hub are in the same collision domain as well as in the same broadcast domain. how data is encoded into media signals. must listen if a device transmits. A broadcast domain is defined as all devices on a network segment that hear all broadcasts sent on that segment. The Physical layer specifications specify the electrical. mechanical. procedural. An Active hub does the same thing. Hubs create a physical star network where the hub is a central device and cables extend in all directions. The Physical Layer The Physical layer has two responsibilities: it sends bits and receives bits. At the Physical layer. and the Data Circuit-Terminating Equipment.

for instance. Which operating systems would be included? Users everywhere wanted to be able to take advantage of the connectivity options promised through utilizing TCP/IP. a UNIX FTP server could be accessed by a Microsoft FTP client to transfer files without either party having to worry about compatibility issues. so that applications utilizing the TCP/IP protocol could write to a standard. For example. cross-platform client-server architecture Consider what happened during the initial development of applications for the TCP/IP protocol suite. that they provide functionality with most. Because these utilities use the Windows Sockets API. agreedupon interface. The Internet community as a whole decides whether a particular change or implementation is worthwhile. Naturally. but it does guarantee that changes are well thought out. development of the protocols has passed from the hands of the government and has been the responsibility of the Internet community for some time. A set of utilities for connecting dissimilar operating systems Many connectivity utilities have been written for the TCP/IP suite. the inherent spirit of the original specifications is still intact. if not all other implementations of TCP/IP. A scalable. Microsoft’s TCP/IP includes support for Windows Sockets and for connectivity to other Windows Sockets-compliant TCP/IP stacks. detailing how the protocol suite should be used and implemented. TCP/IP was originally designed as a set of Wide Area Network (WAN) protocols for the express purpose of maintaining communication links and data transfer between sites in the event of an atomic/nuclear war. and therefore every kind of operating system. and that a set of specifications is publicly available that can be referenced at any time over the Internet. Therefore the Windows Sockets API was established. for example. regardless of the operating system they were currently running. and functionally efficient. SQL server and SNMP.Fundamentals of Computer Technology Introduction to TCP/IP The Transmission Control Protocol/Internet Protocol (TCP/IP) is an industry-standard suite of protocols designed to be routable. But. Vendors wanted to be able to write their own client/server applications. Cognizant Technology Solutions. it is not proprietary or subject to as many compatibility issues. including the File Transfer Protocol (FTP) and Terminal Emulation Protocol (Telnet). this slows down the implementation of new features and characteristics compared to how quickly one directed company might make changes. the specifications for Windows Sockets on TCP/IP were written to make the operating system transparent to the application. This functionality also allows a Windows NT machine running a Telnet client to access and run commands on an IBM mainframe running a Telnet server. The specification for how to write applications was also up for public perusal. All Rights Reserved C3: Protected . connectivity from one machine to another is not dependent on the network operating system used on either machine. Page 121 ©Copyright 2007. Installing Microsoft’s TCP/IP as a protocol on your machine or network provides the following advantages: An industry-standard protocol Because TCP/IP is not maintained or written by one company. The evolution of these protocols from a small four-site project into the foundation of the worldwide Internet has been extraordinary. despite more than 25 years of work and numerous modifications to the protocol suite. robust. Since those early days. Because the contributors included everyone.

This is the responsibility of higher layers of the networking model. all these implementations utilize gateways or firewalls that act on behalf of the requesting machines. damaged. Internet Group Management Protocol (IGMP). or out of order. and the Address Resolution Protocol (ARP). Page 122 ©Copyright 2007. All the protocols in the Transport layer must use IP to send data. To connect to the Internet. The Four Layers of TCP/IP TCP/IP maps to a four-layer architectural model.10: Relationship between Layers in OSI and TCP/IP Each of the four layers of the model is responsible for all the activities of the layers to which it maps.10 illustrates these relationships. such as token-ring or Ethernet. a valid IP address is required.Fundamentals of Computer Technology Access to the Internet TCP/IP is the de facto protocol of the Internet and allows access to a wealth of information that can be found at thousands of locations around the world. However. such as the Transport layer or the Application layer. All Rights Reserved C3: Protected . and the Application layer corresponds to the Session. This model is called the Internet Protocol Suite and is broken into the Network Interface. The Network Interface layer is responsible for communicating directly with the network. and identify the type of service being used. fragment and reassemble packets. because IP is not a connection-based protocol. Internet. duplicated. Cognizant Technology Solutions. Each of these is described in more detail later in this chapter. It must understand the network architecture being used. provide security information. Each of these layers corresponds to one or more layers of the OSI model. and Application layers of the OSI model. However. and Application layers. Because IP addresses have become more and more scarce. it does not guarantee that packets transmitted onto the wire will not be lost. The Internet layer corresponds to the Network layer. The Network Interface layer corresponds to the Physical and Data Link layers. Now that you understand the benefits of installing TCP/IP. The Internet layer is responsible for communicating directly with the Network Interface layer. The Internet layer is primarily concerned with the routing and delivery of packets through the Internet Protocol (IP). and as security issues surrounding access to the Internet have been raised. The Transport layer corresponds to the Transport layer. many creative alternatives have been established to allow connections to the Internet. The Internet Protocol includes rules as to how to address and direct packets. Fig 6. Presentation. and provide an interface allowing the Internet layer to communicate with it. Transport. Other protocols that exist in the Internet Layer are the Internet Control Messaging Protocol (ICMP). Figure 6. you are ready to learn about how the TCP/IP protocol suite maps to a four-layer model. though.

as well as many others. When data is received. Cognizant Technology Solutions. Numerous protocols have been written for use in this layer.Fundamentals of Computer Technology The Transport layer maps to the Transport layer of the OSI model and is responsible for providing communication between machines for applications. The interface between each of these layers is written to have the capability to pass information from one layer to the other. The four layer structure of TCP/IP is built as information is passed down from applications to the physical network layer. Figure 4. Presentation. and the addition of a header is called encapsulation.11 illustrates how each layer adds its own information to the data and hands it down to the lower layers. The primary difference between these two types of communications is whether there is a mechanism for tracking data and guaranteeing the delivery of the data to its destination. Transmission Control Protocol (TCP) is the protocol used for connection-based communication between two machines providing reliable data transfer. Simple Mail Transfer Protocol (SMTP). The Application layer of the Internet protocol suite is responsible for all the activities that occur in the Session. Page 123 ©Copyright 2007. the opposite procedure takes place as each layer removes its header before passing the data to the layer above. and Application layers of the OSI model. until what is left is only the information needed by that layer. each layer treats all of the information it receives from the layer above as data and adds control information to the front of that data. It also illustrates how that data is then stripped off by the corresponding layer of the receiving machine. When data is sent. including Simple Network Management Protocol (SNMP). User Datagram Protocol (UDP) is used for connectionless communication with no guarantee of delivery. This control information is called a header. This communication can be connectionoriented or-connectionless. File Transfer Protocol (FTP). All Rights Reserved C3: Protected .

The layers provide only guidelines.12 shows where each of these protocols resides in the architectural model. not just two (TCP and IP). Namely.11: Layers in the TCP/IP protocol suite The interface between the Network Interface layer and the Internet layer does not pass a great deal of information. seven primary protocols are associated with TCP/IP: Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Internet Protocol (IP) Internet Control Message Protocol (ICMP) Address Resolution Protocol (ARP)/Reverse Address Resolution Protocol(RARP) Internet Group Management Protocol (IGMP) Figures 6. All Rights Reserved C3: Protected . The Application layer must have full access to the Transport layer to change and alter parameters as necessary. The most important thing to remember about all of these boundary layers is that they must use the agreed upon rules for passing information from one layer to the other. Rules and specifications for the Transport layer include giving the Transport layer the capability to change these parameters or to pass parameters it receives from the Application layer down to the Internet layer. whether or not they are using the TCP or UDP protocol for transferring data. and all other available mechanisms for IP. the Page 124 ©Copyright 2007. although it must follow certain rules. though. they must be silently discarded. Each protocol has a graphic to help you visualize the type of communication that is being achieved through these protocols. The telephone is meant to represent TCP. The interface between the Internet layer and the Transport layer must be able to provide each layer full access to such information as the source and destination addresses. In fact. The interface between the Transport layer and the Application layer is written to provide an interface to applications. whether TCP or UDP should be utilized in the transport of data. and if it receives any frames that do not have an IP frame type. Cognizant Technology Solutions. the letter is meant to represent UDP. it must listen to all broadcasts and send the rest of the data in the frame up to the Internet layer for processing. the real work is done by the protocols that are contained within the layers. the security guard is meant to represent ICMP.Fundamentals of Computer Technology Fig 6. This chapter describes the TCP/IP protocol as being a suite of protocols. the cable TV is meant to represent IGMP. The interface utilizes the Windows Sockets and NetBIOS APIs to transfer parameters and data between the two layers.

Cognizant Technology Solutions. Fig 6. there is additional overhead involved with using TCP to transmit packets. If. for some reason. Because TCP sets up a connection between two machines.12: Protocols within the layers of the TCP/IP Protocol Suite Figure 6. A person in an unknown forest is meant to represent RARP. TCP packets are delivered to sockets or ports. This protocol is a connection-based protocol and requires the establishment of a session before data is transmitted between two machines.13 shows the TCP/IP protocol architecture.13: Components of commercial TCP/IP Software Packages Page 125 ©Copyright 2007. Transmission Control Protocol The first protocol that lives in the Transport layer is the Transmission Control Protocol (TCP). it is designed to verify that all packets sent by a machine are received on the other end. where he/she would like to know the current location at the earliest. packets are lost. this diagram is by no means exhaustive. Each of these protocols and the details of their implementation is discussed in the following sections. Fig 6. Because a session is established and delivery of packets is guaranteed. but shows the major protocol and application components common to most commercial TCP/IP software packages and their relationship. and the mail truck/phone operator is meant to represent IP. All Rights Reserved C3: Protected . the sending machine resends the data.Fundamentals of Computer Technology detective is meant to represent ARP.

14: Definition of a Socket Figure 6. In this case. Ports themselves do not care whether the data they receive is in order or not. The communication process between the Transport layer and the Application layer involves identifying the application that has requested either a reliable or unreliable transport mechanism. Fig 6. Ports and Sockets Each process that wants to communicate with another process identifies itself to the TCP/IP protocol suite by one or more ports. A port is a 16-bit number. the IP address (location) and the port number (application) are often combined into one functional address called a socket. To identify both the location and application to which a stream of data needs to be sent. and work in exactly the same way.14 illustrates the format for defining a socket.Fundamentals of Computer Technology To understand TCP further. and acknowledgments. but the applications running on those ports might. Ports can be used by both TCP and UDP for delivering data between two machines. Defining these standard port numbers helps eliminate having to guess to which port an application is listening so that applications can direct their queries or messages directly. Figure 6. These port assignments are called the well-known ports and represent the ports to which standard applications listen. specifically those from 1 to 1023. Page 126 ©Copyright 2007. A Socket is also referred to as an End-Point. Port numbers above the well-known port range are available for running applications. A socket is a special type of file handle which is used by a process to request network services from the operating system. you must understand ports and sockets. A socket can be defined for either TCP or UDP connections. used by the host-to-host protocol to identify to which higher-level protocol or application program (process) it must deliver incoming messages. connection-oriented communications. however.Processes X and Y communicate over a TCP connection carried by IP datagrams. All Rights Reserved C3: Protected . A pair of end-points is known as a connection. Ports identify to which process on the machine data should be sent for further processing. Specific port numbers have been assigned by the Internet Assigned Numbers Authority (IANA). sliding windows.15 shows the TCP Connection . The following sections cover each of these areas. Cognizant Technology Solutions. Port assignments are the means used to identify application processes to the Transport layer. the client or user has to be able to identify to which port the application is connecting.

or session. Fig 6. and by notifying the sender when it is received so it can send more.16: Connection Based communication Page 127 ©Copyright 2007.16 illustrates how TCP sets up a connection-oriented session between two machines. This is equivalent to dialing a phone number and waiting for someone to answer. between two machines before any data is transferred. in what order it was sent. The second step is for the machine to send an acknowledgment that it is listening and willing to accept data. TCP exists within the Transport layer. The first step in the communication process is to send a message indicating a desire to synchronize the systems. A session is able to track the progress of individual packets by monitoring when a packet is sent. This step is equivalent to a person answering the phone.15: Applications Communicating through Reliable Connections Connection-Oriented Communication The Transmission Control Protocol (TCP) is a connection-based protocol that establishes a connection. The third step is for the calling machine to send a message indicating that it understands the receiving machine’s willingness to listen and that data transmission will now begin.Fundamentals of Computer Technology Fig 6. Figure 6. Cognizant Technology Solutions. All Rights Reserved C3: Protected . providing a reliable and guaranteed delivery mechanism to a destination machine. and then waiting for the caller to say something. between the Application layer and the IP layer. Connection-based protocols guarantee the delivery of packets by tracking the transmission and receipt of individual packets during communication.

Fundamentals of Computer Technology After the TCP session has been created, the machines begin to communicate just as people do during a phone call. In the example of the telephone, if the caller uses a cellular phone and some of the transmission is lost, the user indicates she did not receive the message by saying “What did you say? I didn’t hear that.” This indicates to the sender that he needs to resend the data. Figure 6.18 illustrates the format of a TCP header. The header includes all the parameters that are used to guarantee delivery of packets and to provide error-checking and control. Notice that the header specifies a source and destination port for the communication. This tells the machine where it is supposed to send the data, and from where the data came.

Fig 6.17: Format of a TCP Segment

Source Port (16-bit) - used by the receiver to reply

Destination Port (16-bit) - destination port number

Sequence Number - sequence number of the first data byte in this segment. If the SYN control bit is set, the sequence number is the initial sequence number (n) and the first data byte is n+1. Acknowledgment Number - If the ACK control bit is set, this field contains the value of the next sequence number that the receiver is expecting to receive. Data Offset - 32-bit words in the TCP header. It indicates where the data begins. This is otherwise also referred to as HLEN (Header Length) in 32 bit words. Reserved - six bits reserved for future use; must be zero. URG - Urgent pointer field. ACK - acknowledgment field is valid if set to TRUE PSH – Push transfer is enabled, if TRUE RST - resets the connection. SYN - synchronizes the sequence numbers; meant for establishing a TCP connection. FIN - no more data from sender; meant for clearing the TCP connection in one particular direction.

Page 128 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology Window - used in ACK segments. It specifies the number of data bytes beginning with the one indicated in the acknowledgment number field which the receiver (= the sender of this segment) is willing to accept.

Checksum - The 16-bit one's complement of the one's complement sum of all 16-bit words in the pseudo-header, the TCP header and the TCP data. While computing the checksum, the checksum field itself is considered zero.

The pseudo-header is actually a pseudo-IP-header, only used for the checksum calculation, with the format shown in Fig 6.18.

Fig 6.18: Format of Pseudo-header

Urgent Pointer - points to the first data octet following the urgent data. Meaningful only when the URG control bit is set.

Options Just as in the case of IP datagram options, options can be either: A single byte containing the option number, or A variable length option in the format shown in Fig 4.19(a):

Fig 6.19 (a) TCP/IP (Variable length)

Fig 6.19 (b) Maximum Segment Size Options Fig 6.19: TCP options.

Page 129 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology There are currently only three options defined:

Kind Length Meaning ---- ------ ------0 - End of option list. 1 - No-Operation. 2 4 Maximum Segment Size.

The Maximum Segment Size Option (Fig 4.19(b)) is only used during the establishment of the connection (SYN control bit set) and is sent from the side that is to receive data to indicate the maximum segment length it can handle. If this option is not used, any segment size is allowed.

Padding - all zero bytes used to fill up the TCP header to a total length that is a multiple of 32 bits. The last part of the frame is the actual data being transmitted.

Three way Handshake for Connection Establishment Figure 6.20 describes the three different handshakes that are employed during a connection establishment between the client C and the server S.



Send SYN=1,seq=x


Receive SYN=1,seq=x Send SYN=1,seq=y



ACK=1, Ack=x+1

Receive SYN=1, seq=y ACK=1, Ack=x+1 Send ACK=1,Ack=y+1


Receive ACK=1 Ack=y+1

Fig 6.20: Three way handshake

Initially C sends a TCP Segment setting SYN=1 meaning that it is trying a synchronise on the sequence number x as it wishes to communicate with S. In receiving the above, S sends back an
Page 130 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

If handshake-2 fails here again C times out and retransmits seq=x.Fundamentals of Computer Technology acknowledgement with ACK=1 and Acknowledgement field having x+1 meaning that the next expected data byte will have the sequence number x+1. All Rights Reserved C3: Protected .21(a) describes the closure of that part of the connection from C to S. during the handshake. C learns that the earlier handshake-3 should have been a failure and hence ultimately. If handshake-3 fails then S times out looking for ACK=y+1. in a similar way as S did. where the TCP connection is full duplex in nature. on receipt of this S understands that handshake 2 should have been a failure and hence retransmits handshake-2 ultimately leading to success. Cognizant Technology Solutions.21 b corresponds to the closure of this simplex connection too. the above procedure is very robust in the sense the failure of any of the handshake will be tolerated and ultimately the connection would be established. For example. On the receipt of the second acknowledgement in the third handshake a TCP connection is said to have been established. At the same time S tries to synchronise on the sequence number Y. For the better synchronization C acknowledges. At the end of this pair of handshake the TCP connection becomes simplex from S to C. Page 131 ©Copyright 2007. And retransmits and the retransmission is likely to succeed and hence handshake-1. But. Figure 6. On receiving the transmitted handshake-2. Like 3 way handshakes these are also robust. 2 way handshake for clearing connection Figure 6. after these three successful handshakes a TCP connection is established. and hence retransmits handshake-2. if handshake-1 fails then C times out.

seq=j Send ACK=1. Ack=j+1 Time Fig B Fig 6.Fundamentals of Computer Technology Send FIN=1. All Rights Reserved C3: Protected . Ack=i+1 Receive ACK=1. Cognizant Technology Solutions. Ack=j+1 2 Receive ACK=1. Ack=i+1 Fig A Send FIN=1. seq=i+1 Time 2 Send ACK=1. seq=j 1 Receive FIN=1. seq=i 1 Receive FIN=1.21: Closure of TCP connection Page 132 ©Copyright 2007.

a receive window sends an acknowledgment for every two sequenced packets it receives. 5 and 6. By default. the number of acknowledgments sent over the network is reduced. All Rights Reserved C3: Protected . Cognizant Technology Solutions.22: Send and Receive windows Packets do not always make it to their destination. A sliding window allows a sending machine to send the window data in a stream without having to wait for an acknowledgment for every single packet. Figure 6. assuming no network problems. A receiving window allows a machine to receive packets out of order and reorganize them while it waits for more packets. and 7 and 8. As the receiving window receives packets. and is also the amount of data that is being received by the destination machine. it slides the window to the right so that it can send any additional data stored in memory. By default. An acknowledgment for packets 1 and 2.Fundamentals of Computer Technology Sliding Windows TCP uses the concept of sliding windows for transferring data between machines. representing eight standard Ethernet frames. But it can only slide over by the number of acknowledgments it has received. Not all data that is sent is guaranteed to be received.22 shows the send and receive windows that exist on machines that have TCP/IP installed. until acknowledgment for a packet of data is received. Standard Ethernet frames are a little more than 1KB apiece. so they must be kept track of on both machines. but it really isn’t. In this manner. it sends acknowledgments to the sending window that the packets arrived intact. Therefore. if the send window in figure 6. At first this seems redundant. and IP does not guarantee the orderly delivery of packets. A window represents the subset of data that is currently being sent to a destination machine. though. window sizes in Windows NT are a little more than 8 KB in size. Acknowledgments Acknowledgments are a very important component necessary to ensure the reliable delivery of packets. TCP keeps track of the data that has been sent out. and the flow of traffic is increased. The sending window slides over to the next eight packets waiting to be sent and sends those out to the receiving window. 3 and 4. When the send window receives acknowledgments for data it has sent. TCP has been designed to recover in the event that packets are lost along the way. the data is re-sent. 6.23 sends eight packets to the receive window on the other machine. This reorganization may be necessary because TCP utilizes IP to transmit data. Page 133 ©Copyright 2007. perhaps by busy routers. and if it doesn’t receive an acknowledgment for that data from the destination machine in a certain amount of time. In fact. further data transmission is halted completely. four acknowledgment packets come back. Each machine has both a send window and a receive window that it utilizes to buffer data and make the communication process more efficient. Fig. Sliding windows are often referred to in the UNIX environment as streams.

Because TCP guarantees delivery and reliability of traffic flow. packets can get lost and acknowledgments may be delayed. However. 8 seconds. The number of attempts can be altered in the Registry. the second Retransmit Timer is set for 2 seconds.24 illustrates the resending of data after the first Retransmit Timer has expired. on busy networks. the Retransmit Timer doubles. the window cannot slide past any data that has not been acknowledged. In the sending window. the send window is instructed to resend the packet and wait twice as long as the time set on the preceding timer. If the window cannot slide beyond a packet of data. The default starting point for this timer is approximately 3 seconds but is usually reduced to less than a second almost immediately. specifying how long to wait for an acknowledgment before making the assumption that the packet did not get to its destination. and the communication fails. a Retransmit Timer is set for each packet. After this timer has expired. All Rights Reserved C3: Protected . up to a fifth attempt that waits 16 seconds. the third for 4 seconds. Cognizant Technology Solutions. the fourth. TCP eventually has to shut down the session. but if after these attempts an acknowledgment still cannot be received. Each window is given a timer: the send window has the Retransmit Timer and the receive window has the Delayed Acknowledgment Timer. Each machine is therefore instructed to wait a certain amount of time before either retransmitting data or sending acknowledgments for packets that arrive out of sequence.Fundamentals of Computer Technology Fig 6. if the Retransmit Timer started at approximately 1 second. Each time an acknowledgment is not received. These timers help define what to do when communication isn’t flowing very smoothly. Figure 6.23: Sliding after receiving acknowledgements As long as the acknowledgments begin flowing back regularly from the receiving machine. no more data beyond the window is transmitted. data flows smoothly and efficiently. the TCP session is closed and errors are reported to the application. For instance. The Registry location for changing the number of times to retry a transmission is in the following subkey: Page 134 ©Copyright 2007.

the other packets are considered interesting. if a packet doesn’t show up. by default an acknowledgment is sent for every two sequenced packets. for instance.25: Setting of the delayed Acknowledgement Timer for out of sequence packet Page 135 ©Copyright 2007. 6. The Delayed Acknowledgment Timer is hard-coded for 200 milliseconds. an acknowledgment for two sequenced packets is not possible. If packets arrive out of order (if. or 1/5 the Retransmit Timer. a Delayed Acknowledgment Timer is set on the first packet in the pair. but useless. Again though. including those for packets 3 through 8 that might have appeared. starting from the left-hand side of the window. If packet 2 does not show up before the Delayed Acknowledgment Timer expires. Until packet 2 arrives.Fundamentals of Computer Technology Fig. 1 and 3 arrive but 2 is missing). Fig 6. No other acknowledgments are sent. and only packet 1. a Delayed Acknowledgment Timer is set for those packets that arrive out of order. the window is not enabled to slide past it. the receive window slides to the right.24: Retransmission of data after the Retransmit Timer has expired In the receiving window.25 illustrates the Delayed Acknowledgment Timer in action. is sent. enabling more data to be received. When packets arrive out of order. Remember. All Rights Reserved C3: Protected . As data is acknowledged and passed to the Application layer. Cognizant Technology Solutions. Figure 6. In the parenthetical example. a Timer is set on packet number 1. an acknowledgment for packet 1.

Fundamentals of Computer Technology Cognizant Network System Fig 6. All Rights Reserved C3: Protected . Cognizant Technology Solutions.26: Cognizant Data and Voice Network Page 136 ©Copyright 2007.

Cognizant Technology Solutions.defines a common set of rules and signals that computers on the network use to communicate. TCP is connection-oriented and IP is connection-less. All Rights Reserved C3: Protected . Two popular network models serve as functional guidelines for dividing up communication tasks: o o OSI (Open System Interconnect) TCP/IP TCP/IP provides the ability to facilitate communication and share resources between varying networks and platforms. TCP and IP are two separate protocols.Fundamentals of Computer Technology Summary Protocol . IP address is Four Byte (32 bit) and quantities in dotted decimal notation. Page 137 ©Copyright 2007.

routers.1 shows an example of internetowork. they are most active at the data link layer. Cognizant Technology Solutions. and a point-to-point link. Internetworking devices are divided into four categories: repeaters.1 illustrates different kinds of network technologies that can be interconnected by routers and other networking devices to create an internetwork. In this figure. gateways provide translation services between incompatible LANs or applications and are active in all of the layers. An internetwork is often referred to as a “network of networks” because it is made up of lots of smaller networks. Internetworking refers to the industry. We see Ethernets.1: Different Network Technologies can be connected to create an Internetwork We use the term “internetwork.” or sometimes just “internet” to refer to an arbitrary collection of networks interconnected to provide some sort of host-to-host packet delivery service. and gateways. The nodes that interconnect the networks are called routers. that functions as a single large network. Each of these internetworking devices also operates in all of the layers below in which it is most active Page 138 ©Copyright 2007. connected by intermediate networking devices. products. All Rights Reserved C3: Protected . Routers provide links between two separate but sametype LANs and the most active in the network layer. Figure 7. and procedures that meet the challenge of creating and administering internetworks. Bridges utilize addressing protocols and can affect the flow control of a single LAN. an FDDI ring. Fig 7. Finally.Fundamentals of Computer Technology Session 7: Internetworking and Network Management What Is an Internetwork? An internetwork is a collection of individual networks. Repeaters act only upon the electrical components of a signal and therefore active only at the physical layer. Fig.7. bridges. Each of these four device types interacts with protocols at different layers of the OSI Model. Each of these is a single-technology network.

regenerates the original bit pattern. Fig. stations C and D receive a truer copy of the frame than would otherwise have been possible. A repeater installed on a link receives the signal before it becomes too weak or corrupted. all stations (including C and D) will receive the frame. The difference is that. Page 139 ©Copyright 2007.2: A repeater in the OSI model Signals that carry information within a network can travel a fixed distance before attenuation endangers the integrity of the data. 7. just as they would without the repeater.3. The two sections are connected by the repeater in fig 7. If station A sends a frame to station B. and puts the refreshed copy back onto the link. A repeater allows us to extend only the physical length of a network. The repeater does not change the functionality of the network in any way.Fundamentals of Computer Technology Repeaters: A repeater(or regenerator) is an electronic device that operates on only the physical layer of the OSI model. with the repeater. All Rights Reserved C3: Protected . Cognizant Technology Solutions. The repeater does not have the intelligence to keep the frame from passing to the right side when it is meant for a station on the left.

it creates a copy bit for bit.4) Bridges can divide a large network into smaller segments (Fig 7. Cognizant Technology Solutions. 7. not an amplifier Bridges Fig. at the original strength.4: A Bridge in the OSI model Bridges operate in both the physical and the data link layers of the OSI model (see Figure 7. it regenerates it. All Rights Reserved C3: Protected .5).Fundamentals of Computer Technology Fig. but the comparison is inaccurate.3: A repeater Not an amplifier It is tempting to compare a repeater to an amplifier. A repeater does not amplify the signal. it amplifies equally everything fed into it. A repeater is a regenerative. An amplifier cannot discriminate between the intended signal and noise. 7. When it receives a weekend or corrupted signal. Page 140 ©Copyright 2007.

however. When a frame enters a bridge. it reads the address contained in the frame and compares that address with a table of all the stations on both segments.Fundamentals of Computer Technology Fig 7. Fig 7. When it finds a match. bridges contain logic that allows them to keep the traffic for each segment separate. a fact that makes them useful for controlling congestion and isolating problem links. In this way.6 shows two segments joined by a bridge.5: A Bridge They can also relay frames between two originally separate LANs. it discovers to which segment the station belongs and relays the packet only to that segment. As a bridge encounters a packet. For example. Page 141 ©Copyright 2007. Cognizant Technology Solutions. All Rights Reserved C3: Protected . A bridge operates at the data link layer. the bridge not only regenerates the signal but checks the address of the destination and forwards the new copy only to the segment to which the address belongs. Bridges can also provide security through this partitioning of traffic. unlike repeaters. giving it access to the physical addresses of all stations connected to it. they filter traffic.

is of the pass/no pass variety. In fig b. a configuration that makes a simple bridge straightforward and inexpensive to manufacture. If a station is removed. Station A is on the same segment as station D. The logic included in a simple bridge. the table must be modified. a bridge must have a look-up table that contains the physical addresses of every station connected to it. where it is received by station G. the newly invalid address must be deleted. Before a simple bridge can be used. All Rights Reserved C3: Protected .6: Function of a bridge A packet from station A addressed to station D arrives at the bridge. A simple bridge links two segments and contains a table that lists the addresses of all the stations included in each of them. What makes it primitive is that these addresses must be entered manually.Fundamentals of Computer Technology Fig. therefore. The bridge allows the packet to cross and relays it to the entire lower segment. Page 142 ©Copyright 2007. the packet is blocked from crossing into the lower segment instead the packet is relayed to the entire upper segment and received by station D. therefore. an operator must sit down and enter the addresses of every station. Simple Bridge Simple Bridges are the most primitive and least expensive type of bridge. Whenever a new station is added. Cognizant Technology Solutions. a packet generated by station A is intended for station G. The table indicates to which segment each station belongs. Types of Bridges To select between segments. Installation and maintenance of simple bridges are time-consuming and potentially more trouble than the cost savings are worth. 7.

It checks the destination to decide where to send the packet. By continuing this process even after the table is complete. it relays the packet to all of the stations on both segments.7: Multiport bridge Transparent Bridge A transparent. All of a sudden. In figure7. Now. bridge builds its table of station addresses on its own as it performs its bridge functions.6. If it does not yet recognize the destination address. whenever the bridge encounters packets addressed to A. Cognizant Technology Solutions. But because the bridge is constantly checking the source address of received packets. the bridge has three tables. each one holding the physical addresses of stations reachable through the corresponding port. It uses the source address to build its table. if the bridge in fig 7. the bridge learns that packets coming A are coming from the upper segment. it notes which side the packet came from and associates that address with the segment to which it belongs. When the transparent bridge is first installed. Eventually it has a complete table of station addresses and their respective segment stored in its memory. the bridge learns the segment associated with that station. then when station A sends its packet to station G.Fundamentals of Computer Technology Multiport Bridge A multiport Bridge can be used to connect more than two LANs. Suppose the person at station A trades offices with the person at station G. Fig 7. is a transparent bridge. it looks at both the destination and the source addresses.7. All Rights Reserved C3: Protected . For example. or learning. As it encounters each packet. As it reads the source address. it notices that packets from station A are now coming from the lower segment and that packets from station G are coming from the upper segment and updates its table accordingly. the stored segment locations for both stations are wrong. With the first packet transmitted by each station. and that station A must be located in the upper segment. a transparent bridge is also selfupdating. its table is empty. and they both take their computers(including their NICs) with them. Page 143 ©Copyright 2007. it knows to relay them only to the upper segment.

data link. Routers operate in the physical. 7.Fundamentals of Computer Technology Routers Repeaters and bridges are simple hardware devices capable of executing specific tasks.8: A router in the OSI model Routers relay packets among multiple interconnected networks. 7.9 shows Fig. and network layers of the OSI model.9: Routers in an Internet Page 144 ©Copyright 2007. Cognizant Technology Solutions. Fig 7. They route packets from one network to any of a number of potential destination networks on an internet. Fig. All Rights Reserved C3: Protected . They have access to network layer addresses and contain software that enables them to determine which of several possible paths between those addresses is the best for particular transmission. Routers are more sophisticated.

two or more networks at the same time. That router checks the destination address. A packet sent from a station on one network to a station on a neighboring network goes first to the jointly held router. routers have addresses on. The principal difference between the two is that bridging occurs at a lower level and is therefore more of a hardware function whereas routing occurs at a higher level where the software component is more important. and links to. Routers act like stations on a network. it can perform more complex analysis to determine the optimal path for the packet. Routing is often confused with bridging. If there is no one router connected to both the sending and receiving networks. That router forwards the packet to the next router on the path and so on. Routing is a key feature of the Internet because it enables messages to pass from one computer to another and eventually reach the target machine. Each intermediary computer performs routing by passing along the message to the next computer. Routing: In computer networking the term routing refers to selecting paths in a computer network along which to send data. Page 145 ©Copyright 2007. and passes it to the destination network (if that network is a neighbor) or across a neighboring network to the next router on the chosen path. which are members of only one network. which performs a similar function. if a received packet is addressed to a node on a network of which the router is not a member. Part of this process involves analyzing a routing table to determine the best path. And because routing occurs at a higher level. However. Routing is usually performed by a dedicated device called a router. finds what it considers the best route for the packet. they receive packets from one connected network and pass them to a second connected network. the sending router transfers the packet across one of its connected networks to the next router in the direction of the ultimate destination. In their simplest function. it passes the packet along the appropriate network to another router. the process of moving a packet of data from source to destination is involved. the router is capable of determining which of its connected networks is the best next relay point for the packet. All Rights Reserved C3: Protected . Once a router has identified the best route for a packet to travel. which switches it over to the destination network. Cognizant Technology Solutions. until destination is reached.Fundamentals of Computer Technology A possible internet work of five networks. But unlike most stations. In internetworking.

size and format as well. The gateway understands the protocols used by each network linked into the router and is therefore able to translate from one to another. the gateway must adjust the data rate. In some cases. Cognizant Technology Solutions.Fundamentals of Computer Technology Gateways Gateways potentially operate in all seven layers of the OSI model. accepts. and relays packets only across networks using similar protocols. can accept a packet formatted for one protocol and convert it to a packet formatted for another protocol. TCP/IP ) before forwarding it A gateway is generally software installed within a router.11: TCP/IP and the internet (page 705 : forouzan) Page 146 ©Copyright 2007. Fig 7.10: A gateway in the OSI model A gateway is a protocol converter.11 shows a gateway connecting an SNA network (IBM) to a NetWare network (Novell). In other cases. All Rights Reserved C3: Protected . Fig 7. See Figure 7. the only modifications necessary are the header and trailer of the packet.10 Fig 7.(eg. A router by itself transfers. A gateway on the other hand.

Page 147 ©Copyright 2007. etc. Other firewalls provide less strict protections. and so forth. Many corporations use their firewall systems as a place to store public information about corporate products and services. a firewall can act as your corporate "ambassador" to the Internet.net. Why would I want a firewall? The Internet. The actual means by which this is accomplished varies widely. or just sitting in the street blowing their car horns. while others emphasize permitting traffic. the hardest part of hooking to the Internet. a firewall is very important. files to download. Unlike in a situation where a computer system is being attacked by someone dialing in with a modem. Generally. if you're a large company.dec. often they provide summaries to the administrator about what kinds and amount of traffic passed through it. Cognizant Technology Solutions.gov. Probably the most important thing to recognize about a firewall is that it implements an access control policy. Some people try to get real work done over the Internet.: UUnet. thereby protecting the network against any attacks other than attacks against the Email service. If you don't have a good idea what kind of access you want to permit or deny.Fundamentals of Computer Technology What is a network firewall? A firewall is a system or group of systems that enforces an access control policy between two networks. What can a firewall protect against? Some firewalls permit only Email traffic through them. but in principle. In a case where a company's policies dictate how data must be protected. like any other society. the firewall can be thought of as a pair of mechanisms: one which exists to block traffic. firewalls are configured to protect against unauthenticated interactive logins from the "outside" world. All Rights Reserved C3: Protected . or you simply permit someone or some product to configure a firewall based on what they or it think it should do. Some firewalls place a greater emphasis on blocking traffic. Several of these systems have become important parts of the Internet service structure (e. Firewalls provide an important logging and auditing function. Many traditional-style corporations and data centers have computing security policies and practices that must be adhered to. and the other which exists to permit traffic. tearing their mailboxes off. This. since it is the embodiment of the corporate policy. A firewall provides not only real security it often plays an important role as a security blanket for management. whitehouse. Usually. then they are making policy for your organization as a whole. more than anything. the firewall can act as an effective "phone tap" and tracing tool. The firewall can protect you against any type of network-borne attack if you unplug it. gatekeeper. and others have sensitive or proprietary data they must protect.uu. Frequently. Lastly. helps prevent vandals from logging into machines on your network. Firewalls are also important since they can provide a single "choke point" where security and audit can be imposed. More elaborate firewalls block traffic from the outside to the inside. how many attempts there were to break into it. bugfixes. is not justifying the expense or effort. a firewall's purpose is to keep the jerks out of your network while still letting you get your job done.com) and have reflected well on their organizational sponsors. but convincing management that it's safe to do so. is plagued with the kind of jerks who enjoy the electronic equivalent of writing on other people's walls with spray paint. and block services that are known to be problems.g. but permit users on the inside to communicate freely with the outside.

a site with top secret or classified data doesn't need a firewall at all: they shouldn't be hooking up to the internet in the first place. he's just as likely to export it through a telephone. What about viruses? Firewalls can't protect very well against things like viruses. Page 148 ©Copyright 2007. For example. or the systems with the really secret data should be isolated from the rest of the corporate network. Cognizant Technology Solutions. Another thing a firewall can't really protect you against is traitors or idiots inside your network. let's consider the two main types of firewalls. Trying to block viruses at the firewall will only protect against viruses from the Internet .Fundamentals of Computer Technology What can't a firewall protect against? Firewalls can't protect against attacks that don't go through the firewall. or floppy disk. Blanketing your network with virus scanning software will protect against viruses that come in via floppy disks. software running on a gateway system. but there are a lot of organizations out there buying expensive firewalls and neglecting the numerous other back-doors into their network.consciousness on the part of your users. and reflect the level of security in the entire network." The firewall can be hardware in the form of a router or a computer. and Internet. Unfortunately for those concerned. modems. While an industrial spy might export information through your firewall. For a firewall to work. In general. Floppy disks are a far more likely means for information to leak from your organization than a firewall! Firewalls also cannot protect you against stupidity. With that in mind. It's silly to build a 6-foot thick steel door when you live in a wooden house. Many corporations that connect to the Internet are very concerned about proprietary data leaking out of the company through that route. make sure that every vulnerable desktop has virus scanning software that is run when the machine is rebooted. Rather than trying to screen viruses out at the firewall. a firewall cannot replace security. and too many different architectures and viruses to try to search for them all. All Rights Reserved C3: Protected . a magnetic tape can just as effectively be used to export data. There are too many ways of encoding binary files for transfer over networks. it must be a part of a consistent overall organizational security architecture. and each specific implementation likewise has good and bad points. Users who reveal sensitive information over the telephone are good targets for social engineering.and the vast majority of viruses are caught via floppy disks. a freely-available PostScript viewer. Firewall policies must be realistic. Firewall technology First. FAX machine. or between other sets of networks. Each type of implementation has inherent pros and cons. In other words. a definition "A component or set of components that restricts access between a protected network and the internet. an attacker may be able to break into your network by completely bypassing your firewall. a firewall cannot protect against a data-driven attack -. if he can find a "helpful" employee inside who can be fooled into giving access to a modem pool. or some combination. Organizations that are deeply concerned about viruses should implement organization-wide virus control measures. Many organizations that are terrified (at a management level) of Internet connections have no coherent policy about how dial-in access via modems should be protected. This form of attack as occurred in the past against various versions of Sendmail and GhostScript.attacks in which something is mailed or copied to an internal host where it is then executed. strengths and weakness.

or communities of interest to a corporate intranet over a shared infrastructure using dedicated connections. dial. quality of service (QoS). All Rights Reserved C3: Protected . Access VPNs enable users to access corporate resources whenever. or the Internet. and reliability. Intranet VPN—Links corporate headquarters. Access VPNs encompass analog. telecommuters. Businesses enjoy the same policies as a private network. Digital Subscriber Line (DSL). This figure provides a logical topology view of a VPN. Every vendor that provides a VPN service performs it in a method that is best supported by its Fig 7. or ATM backbone. manageability. manageability. and cable technologies to securely connect mobile users. Cognizant Technology Solutions.12: VPN Network Page 149 ©Copyright 2007. There are three types of VPNs. partners. and reliability. including security.Fundamentals of Computer Technology VPN Virtual Private Network (VPN) is defined as customer connectivity deployed on a shared infrastructure with the same policies as a private network. including security. ISDN. The shared infrastructure can leverage a service provider IP. QoS. which align with how businesses and organizations use VPNs: Access VPN—Provides remote access to a corporate intranet or extranet over a shared infrastructure with the same policies as a private network. and however they require. wherever. Currently there are no standards outlining the software and hardware components of a VPN. mobile IP. and branch offices over a shared infrastructure using dedicated connections. Frame Relay. or branch offices. remote offices. suppliers. Businesses enjoy the same policies as a private network. Extranet VPN—Links customers.

and control the performance (for example. report. Page 150 ©Copyright 2007. All Rights Reserved C3: Protected . Cognizant Technology Solutions. utilization. Configuration management: Configuration management allows a network manager to track which devices are on the managed network and the hardware and software configurations of these devices. analyze. and control user and device access to network resources. Basic VPN Requirements: User Authentication Address Management Data Encryption Key management for servers and client Protocols involved o PPTP (Point-to-Point Tunneling Protocol) o L2TP (Layer Two Tunneling Protocol) o IPSEC (IP Security Tunnel Mode) Network Management The International Organization for Standards (ISO) has created a network management model that is useful for placing the above anecdotal scenarios in a more structured framework. These components include individual devices (for example links. We can think of fault management as the immediate handling of transient network failures (for example. log. host. The following sections of this chapter discuss the Cisco Systems implementation of VPN services. Five areas of network management are defined: Performance management: The goal of performance management is to quantify. As with performance management. or router hardware or software outages. Every vendor that provides a VPN service performs it in a method that is best supported by its own hardware platforms and software applications. Security Management: The goal of security management is to control access to network resources according to some well-defined policy. Accountant Management: Accounting management allows the network manager to specify. link. measure. The line between fault management and performance management is rather blurred. and hosts) as well as end-to-end abstractions such as a path through the network. routers. and throughput) of different network components. and the allocation of resource-access privileges all fall under accounting management. detect. Simple Network Management Protocol (SNMP) plays a central role. Usage quotas.Fundamentals of Computer Technology Currently there are no standards outlining the software and hardware components of a VPN. usage-based charging. Fault Management: The goal of fault management is to log. The key distribution centers and certification authorities. the SNMP protocol plays a central role in fault management. and respond to fault conditions in the network.

All Rights Reserved C3: Protected . Cognizant Technology Solutions.Fundamentals of Computer Technology Summary: The most important topics of internetworking and Internet management are: o o o How internetworking devices work? Necessity for a firewall. antivirus schemes Various Network management schemes Page 151 ©Copyright 2007.

” Pipelining is the effective way of organizing parallel activity in a computer System It is a technique of decomposing a sequential process into sub operations. T in seconds is given by T = (N x S) / R o where N = No. you will be able to: Understand pipelining and parallelism concepts Know Client-Server Concepts Understand Multiprocessor Organization Pipelining The Performance of a computer depends on The way in which Compiler translates programs into machine language Choice of machine language instructions The design of hardware Concept of Parallelism Cache Memory concept Measure of performance . with each sub process being executed in a special dedicated segment that works concurrently with all other segments Any operation that can be decomposed into a sequence of sub operations of about the same complexity can be implemented by a pipeline processor This technique is efficient for those applications that need to repeat the same task many times with different sets of data Page 152 ©Copyright 2007. All Rights Reserved C3: Protected . Cognizant Technology Solutions. of Machine language instructions o S = Average number of basic steps per instruction o R = Clock rate in Cycles / second Improvement in the performance by PIPELINING techniques RISC and CISC processors What is Pipelining? “Increasing concurrency by dividing a computation into a number of steps and allowing a number of tasks to be in various stages of execution at the same time.Fundamentals of Computer Technology Session 8: Advanced Computing Concepts – A Survey Learning Objective After completing this module.Processor clock cycle Execution Time.

2.Fundamentals of Computer Technology Example 8. R4 ← Ci R5 ← R3 + R4 Ai R1 R2 Bi Ci Multiplier R3 R4 Adder R5 Fig 8.. All Rights Reserved C3: Protected .1: Arithmetic Pipeline Scheme – An Example Example 8. Ai * Bi + Ci for i = 1.3.) Clock Pulse Number 1 2 3 4 5 6 7 8 9 A1 A2 A3 A4 A5 A6 A7 ------Segment1 R1 B1 B2 B3 B4 B5 B6 B7 ------R2 R3 ---A1* B1 A2* B2 A3* B3 A4 B4 A5* B5 A6* B6 ------C1 C2 C3 C4 C5 C6 -Segment2 R4 Segment3 R5 ------A1*B1+C1 A2*B2 +C2 A3*B3 +C3 A4*B4 +C4 A5*B5 +C5 A6*B6 +C6 A7*B7 +C7 Page 153 ©Copyright 2007.1 (Contd...7 R1 through R5 are registers that receive new data with every clock pulse The sub operations performed are: R1 ← Ai.1 We want to perform the combined multiply and add operations with a stream of numbers. Cognizant Technology Solutions. R2 ← Bi R3 ← R1*R2.

Today's most powerful supercomputers are all MP systems such as Earth Simulator. The idea is based on the fact that the process of solving a problem usually can be divided into smaller tasks. the rate at which instructions are executed is almost four times that of sequential operation Pipelining does not speed up the time required for the execution of an instruction Pipelining results in more throughput (Number of Instructions per second) Effect of operation that takes more than 1 clock cycle Stalling of pipeline operation Possible reasons for Stalling of Pipeline operation o o o o o Some Arithmetic operations Cache miss Page fault Some logic operations Divide operations Why can’t the pipeline operate at its maximum theoretical speed? Different segments may take different times to complete their suboperation. The clock cycle must be chosen to equal the time delay of the segment with maximum propagation time. application-specific integrated circuit (ASIC) and field-programmable gate array (FPGA) design. ASCI White.Fundamentals of Computer Technology There are 2 areas of computer design where the pipeline organization is applicable: o o An arithmetic pipeline divides an arithmetic operation into suboperations for execution in the pipeline segments An instruction pipeline operates on a stream of instructions by overlapping the fetch. Cognizant Technology Solutions. It signifies the presence of many independent arithmetic units or entire microprocessors. Blue Gene. This causes all other segments to waste time while waiting for the next clock The time delay for a pipeline circuit is usually greater than the nonpipeline equivalent circuit Parallelism Parallelism is the simultaneous execution of the same task (split up and specially adapted) on multiple processors in order to obtain results faster. that run in parallel. All Rights Reserved C3: Protected . which may be carried out simultaneously with some coordination. reconfigurable computing. ASCI Purple. ASCI Red. decode and execute phases of the instruction cycle With a four-stage pipeline. Task A logically discrete section of computational work. Massive parallelism (MP) is a term used in computer architecture. Page 154 ©Copyright 2007. ASCI Thor's Hammer.

Flynn’s Classification Computers can be classified with respect to their parallel categories are relevant: processing capability. single data stream – SISD A serial (non-parallel) computer Single instruction: only one instruction stream is being acted on by the CPU during any one clock cycle Single data: only one data stream is being used as input during any one clock cycle Deterministic execution This is the oldest and until recently. so that all such tasks can be performed simultaneously with correct results.Fundamentals of Computer Technology Parallel Tasks Tasks whose computations are independent of each other. the most prevalent form of computer Examples: most PCs.2: SISD Process Single Instruction. Parallelizable Problem A problem that can be divided into parallel tasks. Cognizant Technology Solutions. the following 4 Single instruction. single CPU workstations and mainframes Fig 8. Serial Execution Execution of a program sequentially. This may require changes in the code and/or the underlying algorithm. one statement at a time. Multiple Data (SIMD): A type of parallel computer Single instruction: All processing units execute the same instruction at any given clock cycle Multiple data: Each processing unit can operate on a different data element Page 155 ©Copyright 2007. All Rights Reserved C3: Protected .

One is the experimental Carnegie-Mellon C. Some conceivable uses might be: o o Multiple frequency filters operating on a single signal stream Multiple cryptography algorithms attempting to crack a single coded message.3: SIMD Process Multiple Instruction. a very high-bandwidth internal network. Cognizant Technology Solutions.Fundamentals of Computer Technology This type of machine typically has an instruction dispatcher. Few actual examples of this class of parallel computer have ever existed. Each processing unit operates on the data independently via independent instruction streams. NEC SX-2. Cray C90. Maspar MP-1. and a very large array of very small-capacity instruction units. Best suited for specialized problems characterized by a high degree of regularity.such as image processing.mmp computer (1971). Synchronous (lockstep) and deterministic execution Two varieties: Processor Arrays and Vector Pipelines Examples: o o Processor Arrays: Connection Machine CM-2. Single Data (MISD): A single data stream is fed into multiple processing units. All Rights Reserved C3: Protected . MP-2 Vector Pipelines: IBM 9000. Page 156 ©Copyright 2007. Hitachi S820 Fig 8. Fujitsu VP.

4: MISD Process Multiple Instruction Multiple Data (MIMD): Currently. deterministic or non-deterministic Examples: most current supercomputers.Fundamentals of Computer Technology Fig 8.including some types of PCs. networked parallel computer "grids" and multi-processor SMP computers . terminal servers. All Rights Reserved C3: Protected . Cognizant Technology Solutions. Multiple Instruction: every processor may be executing a different instruction stream Multiple Data: every processor may be working with a different data stream Execution can be synchronous or asynchronous. Page 157 ©Copyright 2007.5: MIMD Process Client – Server Definition: The data processing interaction in which a program at one site (the client) sends a request to a program at another site (the server) and awaits a response. Specific Types of servers include: application servers. and mail servers. the most common type of parallel computer. Most modern computers fall into this category. file servers. Introduction: Client server is network architecture which separates a client from a server. Each instance of the client software can send requests to a server. Fig 8.

the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. it is a more important idea in a network. these generic architectures are sometimes referred to as "two-tier" architectures. In a network. application servers which process data for the clients and database servers which store data for the application servers. Although the client/server idea can be used by programs within a single computer. the server. which fulfills the request. Some networks will consist of three different kinds of nodes: server. the client.6: Client Server Model Client/server describes the relationship between two computer programs in which one program. makes a service request from another program. makes a service request from another program. Client Server Model Fig 8. Architecture Generic client/server architecture has two types of nodes on the network: clients and servers. As a result. In a network. the client.Fundamentals of Computer Technology Characteristics of a server: Passive (slave) Waits for requests Upon receipt of requests. This is called three-tier architecture. the server. The communications method in computing includes Local procedure calls and Remote procedure calls. Cognizant Technology Solutions. processes them and then serves replies Characteristics of a client: Active (master) Sends requests Waits for and receives server replies Client/server describes the relationship between two computer programs in which one program. which fulfils the request. All Rights Reserved C3: Protected . the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. Page 158 ©Copyright 2007.

For example. The result is returned the same way. a file server is a computer and storage device dedicated to storing files. The client process simply resembles calling a normal procedure in its own code. the client actually calls a procedure sitting in some remote server over the network–hence the name remote procedure call. In Windows NT. The client runtime program knows the address of the remote computer and server application. a stub is included which acts as the representative of remote procedure code. Server Platforms Application Servers Audio/Video Servers Page 159 ©Copyright 2007. It then sends the request across the network . Sometimes referred to as a type of middleware. after the necessary processing. A database server is a computer system that processes database queries. When the program is run.The server also have a runtime program and stub that interface with remote procedure. the server runs on the same machine. All Rights Reserved C3: Protected . the many different types of servers used in the marketplace today: A term often used synonymously with operating system. client-subsystem communication happens in a fashion similar to that in the MACH operating system. hence the mechanism is called as a local procedure call. A print server is a computer that manages one or more printers. application servers occupy a large chunk of computing territory between database servers and the end user. Server A computer or device on a network that manages network resources. The subsystem process. The DLL contains stub functions for the subsystem’s API. Server Types This list. Local Procedure Call: A local procedure call (LPC) is an interprocess communication facility for high-speed message passing. a platform is the underlying hardware or software for a system and is thus the engine that drives the server.Fundamentals of Computer Technology Remote Procedure Call: This is a protocol that one program can use to request the services from other located in other machine in a network without having to understand the network details. and a network server is a computer that manages network traffic. Cognizant Technology Solutions. Audio/Video servers bring multimedia capabilities to Web sites by enabling them to broadcast streaming multimedia content. and the procedure issue the stub receives a request and forwards it to the client runtime in the local computer by the daemons. In the case of RPC. in turn. Usually when a program using RPC are compiled into an executable program. and they often connect the two. The stub function in the DLL waits for the subsystem to return the results and. returns the results to the client DLL. In Windows NT. Any user on the network can store files on the server. Each subsystem contains a client-side DLL that links with the client executable. passes the results to the caller.

Fundamentals of Computer Technology Chat Servers Chat servers enable a large number of users to exchange information in an environment similar to Internet newsgroups that offer real-time discussion capabilities. A fax server is an ideal solution for organizations looking to reduce incoming and outgoing telephone resources but that need to fax actual documents. Proxy servers sit between a client program (typically a Web browser) and an external server (typically another server on the Web) to filter requests. improve performance. A Telnet server enables users to log on to a host computer and perform tasks as if they're working on the remote computer itself. File Transfer Protocol makes it possible to move one or more files securely between computers while providing file security and organization as well as transfer control. All Rights Reserved C3: Protected . whether they discussions open to the public that deliver announcements. better manage be interactive or one-way lists newsletters. List servers offer a way to mailing lists. Internet Relay Chat consists of various separate networks (or "nets") of servers that allow users to connect to each other via an IRC network. regardless of location. mail servers move and store mail over corporate networks (via LANs and WANs) and across the Internet. via the Internet or a corporate intranet and to work together in a virtual atmosphere. One of the oldest of the Internet services. and share connections. News servers act as a distribution and delivery source for the thousands of public news groups currently accessible over the USENET news network. or Fax Servers FTP Servers Groupware Servers IRC Servers List Servers Mail Servers Almost as ubiquitous and crucial as Web servers. An option for those seeking real-time discussion capabilities. Cognizant Technology Solutions. advertising. News Servers Proxy Servers Telnet Servers Page 160 ©Copyright 2007. A groupware server is software designed to enable users to collaborate.

file servers do not need to be high-end but must have enough disk space to incorporate a large amount of data. Database management systems frequently provide database server functionality. Page 161 ©Copyright 2007. file servers do not need to possess great power or super fast computer specifications. but in reality.Fundamentals of Computer Technology Web Servers At its core. Additionally. Clusters are usually deployed to improve performance and/or availability over that provided by a single computer. Database Master servers are central and main locations of data while Database Slave servers are synchronized backups of the master acting as proxies. the user can read or write a file as though it were part of the file system of the user's computer. running on other computers. while typically being much more cost-effective than single computers of comparable speed or availability. Many people mistake file servers for a high-end storage system. that allows different programs. Cognizant Technology Solutions. but not always. A computer program. File Server In telecommunication. as defined by the client-server model. the term file server has the following meanings: A form of disk storage that hosts files within a network. Compute Server A computer cluster is a group of loosely coupled computers that work together closely so that in many respects they can be viewed as though they are a single computer. MySQL) rely exclusively on the client-server model for database access. Database Server A Data Server manages data and is typically one or more of many servers in an environment A database server is a computer program that provides database services to other computer programs or computers. on this type of file server.. and some DBMS's (e.g. This entire exchange is mediated by the browser and server talking to each other using HTTP. the term file server refers specifically to a computer on which a user can map or mount a drive or directory so that the directory appears to be on the machine at which the user is sitting. The components of a cluster are commonly. The term may also refer to a computer dedicated to running such a program. All Rights Reserved C3: Protected . a Web server serves static content to a Web browser by loading a file from a disk and serving it across the network to a user's Web browser. to access the files of that computer In common parlance. connected to each other through fast local area networks.

Introduction: Communications servers are open. Cognizant Technology Solutions. differentiated features. There are three solutions: Symmetric Multi Processors: several identical processors within the same computer Clusters: a group of interconnected computers working together as a unified computing resource Non Uniform Memory Access: a shared-memory multi-processor architecture for which the access time to a memory words depends on the location of the word and on the processor accessing it. communications server vendors and users are all part of an increasingly robust communications server ecosystem. standards-based computing systems that operate as a carriergrade common platform for a wide range of communications applications and allow equipment providers to add value at many levels of the system architecture.Fundamentals of Computer Technology Communication Server Definition: A specialized network server that provides access to resources on the network for users not directly attached to the network or that permits network users to access external resources not directly attached to the network. Standards bodies. Page 162 ©Copyright 2007. flexible. Support for communications servers as a category of server is developing rapidly throughout the communications industry. All Rights Reserved C3: Protected . and communications-focused. carrier-grade. hardware and software manufacturers. communications servers have the following attributes: open. vendor alliance programs. Regardless of their specific. Multiprocessor Organization Introduction: To use multiple processors for parallel execution of programs to improve performances. industry associations.

Cognizant Technology Solutions. None of the above 2. Which of the following is TRUE about Pipelining? a. Throughput remains the same in pipelining c. decode and execute phases of the instruction cycle Flynn’s Classification of Parallel Computers Various types of Servers and their Applications Performance improvement through Multiprocessor Organization Test your Understanding 1. Pipelining doesn’t speed up the rate of execution of instruction b. Which protocol is used for browsing web pages in the web server context? Answer: 1.Fundamentals of Computer Technology Summary Pipelining is an effective way of organizing parallel activity in a computer System There are 2 areas of computer design where the pipeline organization is applicable: o o An arithmetic pipeline divides an arithmetic operation into sub-operations for execution in the pipeline segments An instruction pipeline operates on a stream of instructions by overlapping the fetch. a Page 163 ©Copyright 2007. Stalling cannot happen in a Pipeline d. All Rights Reserved C3: Protected . Is MISD implementation viable? 4. What is parallelism? 3. What is two-tier and three-tier architectures? 5.

All Rights Reserved C3: Protected . Bell Labs. UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. Each file can be protected using read. for example. the first supported release. The most popular varieties of UNIX are Sun Solaris. History of UNIX 1969: Ken Thompson.000. group and others(security). we use Solaris on our servers and workstations. although they share common similarities. multi-tasking system for servers.. multi-user. knowledge of UNIX is required for operations which are not covered by a graphical program.Fundamentals of Computer Technology Session 9: Case Study – UNIX and WINDOWS XP Learning Objectives After completing this chapter. UNIX is highly portable across hardware since it is written in C language. Cognizant Technology Solutions. you will be able to: Understand the internal working of UNIX OS Classify Windows XP What is UNIX? UNIX is an operating system which was first developed in the 1960s. write and execute permissions for the user. 1984: Berkeley releases 4. Installed base 45. and MacOS X. 1983: AT&T announced UNIX System V. and has been under constant development ever since. Dennis Ritchie started working on a multi-user OS on PDP-7. It is a stable. UNIX allows only needed modules to be loaded in memory (modularity). GNU/Linux. CAD/CAM applications best perform in a UNIX system. or when there is no windows interface available. UNIX uses TCP/IP protocol. . in a telnet session. Types of UNIX There are many different versions of UNIX. includes TCP/IP. first public release. 1970: OS named as UNIX 1973: OS rewritten in C 1975: First Version of Berkeley Software Distribution (BSD) 1982: AT&T announced UNIX System III.2BSD. with its varied support for graphic cards. However. with files and directories created within the file structure. Page 164 ©Copyright 2007. Here in the School.It has an inverted tree like file structure. desktops and laptops. X/Open formed. and Fedora Core Linux on the servers and desktop PCs.

Cognizant Technology Solutions. Page 165 ©Copyright 2007. to determine the cause of an interrupt and initiate its processing. Installed base 2. Layered Architecture UNIX is a layered operating system. Most well written user programs are independent of the underlying hardware.Fundamentals of Computer Technology 1984: System V Release 2 introduced. Around 7.000.000 installations.000 installations worldwide. 1989: System V Release 4 ships unifying System V. BSD and Xenix. All Rights Reserved C3: Protected . 1986: 4. making them readily portable to new systems. its varied support for graphic cards. including cpu. The kernel includes the dispatcher to allocate the central processor. 1.1: Layered Architecture of the UNIX System You can have many users logged into a system simultaneously. interacts directly with the hardware and provides the services to the user programs. It provides the most basic interface between the machines itself and the rest of the operating system. referred to in UNIX as the kernel. 50. It's the kernel's job to keep each process and user separate and to regulate access to system hardware. The innermost layer is the hardware that provides the services for the OS. The kernel is responsible for the management of the central processor. 00. disk and other I/O devices. 50. each running many programs. Fig 9. Kernel The kernel of UNIX is the hub of the operating system.3BSD released. memory. 1987: System V Release 3 introduced. 1988: Open Software Foundation formed.2 million installations. 1. The operating system. and some provision for communication among the various system and user tasks currently active in the system. including internet name server.

memory management.Fundamentals of Computer Technology The main functions of the kernel are to provide: A mechanism for the creation and deletion of processes. _open _close _read _write _getch _putch _ioctl open a device or file close a device or file read from a device or file write to a device or file read a character from a terminal write a character to the terminal control/set device parameters Header Files: Header files define how a system call works. or killing a process. Typical system calls are. and the parameters returned by the system call. or execute a file. System calls also provide the interface between a running program and the operating system. memory management. starting or updating accounting records. changing ownership of a file or directory. CPU scheduling. System calls define the programmer interface to operating system. CPU scheduling. The kernel provides control of file system. and other operating system functions through system calls. write. All Rights Reserved C3: Protected . Such services would include accessing a file: open close. and the parameters (variables) required by the call. enabling access to hardware devices. creating. Synchronization tools so that the processes can synchronize their actions. A header file contains a definition of the system call. These system calls request services to be provided by the kernel. the set of systems programs commonly available defines the user interface. changing to a new directory. suspending. Cognizant Technology Solutions. Page 166 ©Copyright 2007. link. UNIX System Calls The UNIX operating system has two separable parts: the kernel and the service programs. and device management for these processes. read. Communication tools so that processes can communicate with each other. The C language allows system calls to be made directly. User programs interact with the kernel through a set of standard system calls. and setting limits on system resources.

Page 167 ©Copyright 2007. Motif. The commands that are not built in to the shell require the kernel to start another process to run them. 9. The command name. UNIX is weak in the end-user interface area. are separated by a blank space. followed by command options (if any or desired) and command arguments (if any or desired). All Rights Reserved C3: Protected . The kernel can run the same shell program (or any other program) simultaneously for many users on a UNIX system." to notify you that it is ready to accept your command. Many basic shell commands are actually subroutines built in to the shell program. etc. Cognizant Technology Solutions.Fundamentals of Computer Technology UNIX User Interface In the last few years. Each of the different user interfaces has some advantages and some disadvantages. and then waits for another command. it takes each command and passes it to the operating system. These windowing interfaces do not change UNIX itself but are built on top of UNIX to provide a more intuitive interface to UNIX. The most dramatic effort has been the addition of windowing interfaces on top of UNIX such as Xwindows. interprets the command. options. Even with all of these efforts. It then displays the results of this operation on your screen. A program is referred to as a process while the kernel is running it. there has been extensive work to improve the user interface to UNIX.2: Shell Command Loop Each shell command consists of a command name. UNIX Shell The shell is your interface to the operating system. Currently intensive development effort is being done on all of these Graphical User Interfaces (GUIs). OpenLook.2. and arguments. This is depicted in Fig. Fig 9. An interpreter operates in a simple loop: It accepts a command. and each running copy of the program as a separate process. It acts as a command interpreter. executes the command. NextStep. The shell displays a "prompt. Suntools.

The username must be unique. Cognizant Technology Solutions. $ is the default prompt of the shell. It provides all the features of the C shell together with EMACS style editing of the command line. Does not have the interactive facilities provided by modern shells such as the C shell and Korn shell. All Rights Reserved C3: Protected . Written by David Korn of bell labs. Provides all the features of the C and TC shells together with a shell programming language similar to that of the original Bourne shell. Korn shell (ksh) o TC Shell (tcsh) o Available in the public domain. assigns a Username and a password. the shell asks the kernel to create a new sub process (called a "child" process) to perform the command.Fundamentals of Computer Technology When you execute a non built-in shell command. The shell waits until the child process finishes before it will accept the next command. It is now provided as the standard shell on UNIX systems. Its programming language is compatible with the Bourne shell (sh). C shell (csh) o Written at the University of California. usually the administrator. The most common ones are described below. The child process exists just long enough to execute the command. To change your password. The system will ask for the old password. Bourne shell (sh) o Original UNIX shell written by Steve Bourne of Bell Labs. Then it will ask for the new password. type the command passwd After you have logged in. Widely used within the academic community. When you're ready to quit. Provides all the interactive features of the C shell (csh) and the Korn shell (ksh). Bourne Again Shell (bash) o Public domain shell written by the Free Software Foundation under their GNU initiative. Ultimately it is intended to be a full implementation of the IEEE POSIX Shell and Tools specification. Berkley. it provides a C like language with which to write shell scripts. You will be asked to confirm your new password. There are several shells in widespread use. Logging in and Logging out Logging in to a UNIX system requires a username and a password. to make sure that you didn't mistype. As it name indicates. The Bourne shell does provide an easy to use language with which you can write shell scripts. Available on all UNIX systems. type the command exit Page 168 ©Copyright 2007. The person who creates the account.

txt o . Cognizant Technology Solutions. directories. The command options. allow to alter the behavior of the command. Page 169 ©Copyright 2007. Example: $ man passwd To get the manual entry on the command – passwd. You can abort the current command by typing Control-C.txt on the screen.Fundamentals of Computer Technology Basic Form of UNIX Commands The basic form of a UNIX command is: commandname [-options] [arguments] The command name is the name of the program to execute. Simple Shell Commands $ pwd o To print the current working directory To display the current system date and time To display only the hour $ date o $ date “+%H” o $ who o To list the logged in users of the system $ ls o To list the names of files and directories To list the names of files and directories in long format $ ls -l o $ ls -R o To recursively list the names of files and directories starting from the current directory $ mkdir Telcom_proj o To create a directory Telcom_proj in the current directory To change the working directory to Telcom_proj To remove the directory Telcom_proj. The arguments are the names of files. The directory should be empty To display the contents of the file abc. Getting Help on Commands $ man command: To get the default manual entry of the command. usually indicated by a dash. The square brackets ([ and ]) signify optional parts of the command that may be omitted. All Rights Reserved C3: Protected $ cd Telcom_proj o $ rmdir Telcom_proj o $ cat abc. or programs that the command needs to access.

Standard Output and Standard Error Input/Output redirection is based on the UNIX standard I/O concept. The standard I/O streams determine where input is read from and output is written to. fhere and fnothere. the tr (translate characters) command is used to transform one string into another. By default. standard error is the terminal. UNIX commands send information to the user via standard output. Redirecting Standard Input When programs require input from the user. By default.txt Standard Input.txt o To copy the contents of the file.txt o To delete the file file1. All Rights Reserved C3: Protected . it is usually entered from the keyboard.Fundamentals of Computer Technology $ cp file1. Standard Input stdin Standard Output stdout Standard Error stderr Example $ rm -i fhere fnothere remove fhere? y rm: fnothere: No such file or directory rm is used to remove two files. standard output is the terminal (i. command < filename This is useful with UNIX commands that do not open files. UNIX commands send error messages to the user via standard error. Cognizant Technology Solutions.txt $ rm file1. For example. The -i option is used for interactive deletion. file2.e. standard output and standard error. it can be read from a file by following the command with a less than sign (<) followed by a filename. standard input is the keyboard. file1. However. Each command uses three I/O streams: standard input. written to the screen).txt file2. By default.txt to file. Page 170 ©Copyright 2007. I/O Stream Abbreviation Description UNIX commands receive information from the user via standard input.

All Rights Reserved C3: Protected . Redirecting Standard Output The output from a command can be saved in a file by following any command with a greater than sign (>) followed by a filename. The output from the cat command is redirected from the terminal to the file. file2. The result is file3 contains the contents of file1 followed by the contents of file2. Page 171 ©Copyright 2007. Piping is done by separating two commands with a pipe character (|). This is useful if a directory listing scrolls off the screen. $ cat file2 >> file3 Appends the contents of file2 to file3. command > filename Example $ cat file1 file2 > file3 Saves the contents of file1 and file2 into a new file named file3. cmd1 | cmd2 Example $ ls | more Sends output from the ls command to the more command. Cognizant Technology Solutions. file3.Fundamentals of Computer Technology Example $ tr "[:lower:]" "[:upper:]" < file1 Will change all characters in file1 from lower case to upper case and print the results to the screen. If file3 already exists then it will be overwritten. Standard input and standard output can be redirected in the same command. Piping Piping directs the standard output of one UNIX command into the standard input of another UNIX command. $ tr "[:lower:]" "[:upper:]" < file1 > file2 Will change all characters in file1 from lower case to upper case and save the results in the file.

uarea. the system displays the PID associated with the background process. etc. When you start a process in the background. Per Process region table. Entries in this table are often called process control blocks and must contain information about process state memory state resource state for each process. Page 172 ©Copyright 2007. pending signals that have not yet been dealt with (eg they arrived while the process was asleep). Process state includes the value of each register program counter stack pointer state of the process (runnning.Fundamentals of Computer Technology UNIX Process Management The Process ID (PID) Every process running on UNIX server has a unique number called the process id abbreviated as PID. and temporary variables of system calls Process table The O/S maintains information about each process in a process table. All processes have a PID. return address. All Rights Reserved C3: Protected . Value of the variables System Level Context : o Static: Process table entry. data and stack (dynamic allocation of variables) Register Level Context : Value of Program Counter (PC). o Dynamic: User Stack which typically contains data such as subroutine parameter. $ longcmd & [1] 310 The PID associated with longcmd is 310. Cognizant Technology Solutions. its parent. runnable. elapsed time. blocked) process ID of itself. Kernel stack which typically contains temporary data such as subroutine parameter. return address. For example. $ ps Will list the status of all processes being executed Process Context Process context includes the following: User Level Context : Program text. Contents of the processors registers. and temporary variables.

etc.Fundamentals of Computer Technology Memory state Pointers to the various memory areas used by the program need to be kept. A and B. All Rights Reserved C3: Protected .3 depicts a simple process implementation scheme. each with its own instructions. In UNIX each process has a file table. the third for standard error. Fig. Cognizant Technology Solutions. stored in main memory. The OS maintains. so that they can be relocated back as needed. The information about these will need to be stored also. data and context. the second entry is for standard output. have a certain user ID. and perhaps some additional information for each of them.3: Process Implementation Scheme Figure 9. The first entry in this (file descriptor zero) is for the processes' standard input. The processor registers then contain data relevant to that particular process. Among them are the base and top addresses of the area in memory reserved to the process: an error condition would be trapped if the program being executed tried to write in a memory word whose address is outside those bounds. also in memory. There are two processes. a list of pointers to the above processes. Resource state The process will generally have files open in particular directory. The content of a ``current process'' location identifies which process is currently being executed. Page 173 ©Copyright 2007. 9. Additional entries are made when the process opens more files.

This init acts as the root of the process tree. The process no longer exists. 4. but it leaves a record containing an exit code. The process is sleeping and resides in main memory. The process is returning from the kernel to user mode. When a process is created. and the swapper has swapped the process to secondary storage to make room for other processes in main memory. but the swapper (process 0) must swap the process into main memory before the kernel can schedule it to execute. That state is the ready to run in memory. one for each terminal line that is connected to it. 7. but the kernel preempts it and does a context switch to schedule another process. The init forks a set of copies of itself. the process exists. the top level init wakes up.Fundamentals of Computer Technology Process States and Transitions When a system boots UNIX. Logging out terminates the login shell.3. 3. init checks that the user is valid. where the process is waiting in line to get its time quantum for the CPU. The user does whatever they want to do. First. it creates a single process called ``init''. The zombie state is the final state of a process. 5. When the scheduler chooses it based on its scheduling algorithm. The process is executing in kernel mode. type the login message and then blocks waiting for terminal input. and ``exec''s a shell. 1. At this point the init for that terminal line has been replaced by the login shell for that user. 2. and eventually logs out. the process gets created with the fork () system call and it enters the bubble diagram at bubble number 8. Then the process enters state 3 or 5 depending on whether there is enough memory or not. 6. All Rights Reserved C3: Protected . The top level init then forks a new init for that terminal line and starts a wait again. The process is ready to run. but it is not ready to run. Each one of these. When the user name and password are typed. Let’s say there is enough memory and it is in state 3. The process executed the exit system call and is in the zombie state. The process is sleeping. 9. The login shell is in fact a direct child of this top level init because it came from exec-ing a child. So when the shell terminates. and if so changes to the user's home directory. 8. the process enters the kernel running state where it finishes its part of the fork () system call. resets the user ID of the process to the user. Cognizant Technology Solutions. it goes through a series of states as depicted in Figure 9. Page 174 ©Copyright 2007. This state is the start state for all process. for another child to terminate. nor is it sleeping. The process is executing in user mode. waiting on any of its children. The following list contains the complete set of process states. The process is newly created and is in a transition state. In the meantime. the init at the top of the process tree has done a wait. The process is ready to run as soon as the kernel schedules it.

After the process finishes in user mode. At that time. and then it exits to stage 9. Stopping processes There are two ways in which processes can stop: voluntarily stop. When the I/O becomes available. All Rights Reserved C3: Protected . then the process gets swapped into the swap space on the hard disk. 9. it makes a system call and it goes back to kernel running again. the scheduler will pick another process to run. where the next most suitable process gets to go on memory to get some CPU time. the interrupt handler awakens the process. If there is a shortage of memory. The dotted line shows their equivalence. But let's say. The preempted state is the same as the ready to run state. That state is the Preempted state. Eventually the process will get back into the user mode again for another time quantum. and the process enters the ready to run stage again to go back to the CPU. asleep in memory. Cognizant Technology Solutions. the process can go into the user mode until its time quantum is up. Let’s also say that system call requires the service of some I/O from the disk.Fundamentals of Computer Technology Fig. Page 175 ©Copyright 2007. or be forced to stop. and the previous process goes back to the end of the line to wait its turn again. but that resource is not available now. Then that process goes to state 4. it goes back to the kernel mode.4: Process State Transition Diagram After that.

quantum for the round-robin scheduling algorithm. System processes doing disk I/O and other important tasks have negative priorities and cannot be interrupted. Old UNIX systems used a 1 sec. although there is a priority scheme. All Rights Reserved C3: Protected . To run a command in the background. There's no preemption of one process by another when running in kernel mode. Cognizant Technology Solutions. append a space and ampersand (&) at the end of the command. Later 4. This is called running the command in the foreground and the process associated with the command is called a foreground process.1 seconds. You can continue to work at the UNIX prompt while the command runs. The subroutine to be called in this case causes the rescheduling and then resubmits a timeout to call itself again 0. the next prompt does not appear until the command is finished running. A process may relinquish the CPU because it's waiting for I/O (including I/O due to page faults) or because its time slice has expired.2BSD did rescheduling every 0. The system call used for this is called sleep (not to be confused with the C library routine with the same name. When a command is executed in the background.1 sec later. Ordinary user processes have positive priorities and thus are less likely to be run than any system process. The reverse is also true (process aging is employed to prevent starvation). and its difficult for a single process to take CPU all time. Processes are given small CPU time slices by an algorithm that reduces to round robin for CPU-bound jobs. the UNIX prompt returns immediately. You can also start a command in the background creating a background process. When the event occurs. It takes an argument that is by convention the address of a kernel data structure related to an event the process wants to occur before it is awakened. in a user program. sleep(3)). the system process that knows about it calls wakeup with the address corresponding to the event. and all processes that had done a sleep on the same address are put in the ready queue. Every process has a scheduling priority associated with it. and priority re-computation every second. Thus there is negative feedback in CPU scheduling. The more CPU time a process accumulates. The priority recomputation is also timed by a subroutine that resubmits a timeout for itself. Page 176 ©Copyright 2007. the lower the numerical priority.Fundamentals of Computer Technology Foreground and Background Processes Normally when you enter a command at the UNIX prompt. although user processes may have precedence over one another. When a process chooses to relinquish the CPU (voluntarily. or because this decision is to be made in the kernel context for a process executing that program) it sleep on an even. which tells the clock interrupt driver to call a certain system routine after a specified interval. the lower (more positive) its priority becomes. The “nice” command may be used to affect this precedence according to its numerical priority argument. The round-robin scheduling is accomplished by the timeout mechanism. the more likely is the process to run. UNIX CPU Scheduling Short term scheduling in UNIX is designed to benefit interactive jobs.

like other advanced operating systems. signalling the kernel to load the next few pages from disk into RAM. Virtual Memory (VM) = Physical RAM + Swap space The UNIX kernel divides the memory into manageable chunks called pages. only the kernel is allowed to switch from the user to the system area. Which process among those actually does run is chosen by the scheduler effectively at random. not all its memory pages are read in from the disk at once. a process waiting for disk I/O to complete will sleep on the address of the buffer corresponding to the data being transferred. Strong memory protection is implemented in the kernel memory management code to keep the users from corrupting the system area. allows you to use all of the physical memory installed in your system as well as area(s) of the disk (called swap space) which have been designated for use by the kernel in case the physical memory is insufficient for the tasks at hand. the swapper process swaps out sleeping processes onto the swap device. Page 177 ©Copyright 2007. data. however.Fundamentals of Computer Technology For example. Memory pages are laid down contiguously across the physical and virtual memory. During the normal execution of a UNIX process. If it is not found in RAM. it has to ensure that user programs do not overwrite/corrupt the kernel data structures (or overwrite/corrupt other users' data structures). the kernel loads into RAM only a few pages at a time. Instead. which is the scheduling priority to be used for this purpose. Cognizant Technology Solutions. The disadvantages of such a scheme are many processes cannot co-exist at the same time in main memory and processes of sizes greater than RAM cannot be executed. the next page is requested. also takes a second argument. It does so by designating part of RAM as kernel or system pages (which hold kernel text and data segments) and user pages (which hold user stacks. Sleep. The transfer between RAM and swap space is the whole process. For example. When the processes move to Ready to Run state. When RAM is not sufficient to hold all processes. it calls wakeup on that buffer. causing all processes waiting for that buffer to be awakened. Demand Paging: When a process starts in UNIX. The System and User Areas When the kernel loads. UNIX Memory Management UNIX. Consequently. Memory Management Schemes: Swapping: Processes requested from different users are allocated space in memory. A common system call when memory protection is violated is SIGSEGV (you see a "Segmentation violation" message on the screen when this happens. A single page of memory is usually 4096 or 8192 bytes (4 or 8KB). a page fault occurs. All Rights Reserved C3: Protected . Mathematically. they are swapped back to RAM. This is called demand paging. Virtual memory is simply the sum of the physical memory (RAM) and the total swap space assigned by the system administrator at the system installation time. When the interrupt routine for the disk driver notes that the transfer is complete. After the CPU digests these. and text segments). both system and user areas are used. it uses RAM to keep itself memory resident. The culprit process is killed and its inmemory portions dumped to a disk file called "core").

executing. user data and all binary executable programs runnable on the machine. the directory entry that is opened points directly to the inode of the data to be provided. Only when one deletes the last remaining directory entry that points to an inode are the data deleted. They exist when more than one directory entry references the same inode./) is referred to as the root of the UNIX (virtual) filesystem. All Rights Reserved C3: Protected . Each line in a directory file contains only the name of the item. and o Page 178 ©Copyright 2007. An ordinary file can be thought of as a one-dimensional array of bytes. Directories: Directories are containers that can hold files. the file system opens the symbolic link file. Special files: Special files represent input/output devices. For example. Many UNIX resources (including hardware) are available via the virtual file system. or a printer. viewing. This is the UNIX interface to the physical file system. and 2048 bytes. There are two types: o Hard links are not really files. and then opens the file that is referenced. The i-list is a complete list of all the storage space available to the file system. It can refer to the hierarchical UNIX directory tree structure or the virtual file system or the physical file system. when a hard link is opened by a user program. ls -l reads the symbolic link file and displays the name of the file being referenced. reads the reference. the directory entry is removed. Soft Link is implemented as a directory file entry containing a pathname. with which a user or administrator may perform various functions: e. Typical block sizes are 512 bytes. or program information. Cognizant Technology Solutions. File management programs operate on the symbolic link file. etc. like a tty (terminal). when a hard link is deleted using rm. depending on the context: Virtual file system or the UNIX directory tree The hierarchical representation of files and directories of files.g. The root of the filesystem and the UNIX directory tree The top level directory under UNIX (denoted by a forward slash . The information in the file is the name of the file being referenced. data. Hence. Files can be divided into the following categories : Ordinary files: Ordinary files can contain text. a disk drive. An ordinary file cannot contain another file. and a numerical reference to the location of the item. Links: A link is a pointer to another file. Under the root directory are a number of directories and files. And. A directory is actually implemented as a file that has one line for each item contained within the directory. The word "file system" under UNIX can mean different things. or directory. 1024 bytes.Fundamentals of Computer Technology UNIX File System The file system usually refers to the entity which contains all the data for the workstation or server: system data. A directory is nothing more than a list of the names and inodes of files. One of the unique things about UNIX as an operating system is that regards everything as a file. and is an index to a table known as the i-list. and other directories. Special files can be either character special files that deal with streams of characters or block special files that operate on larger blocks of data. The reference is called an i-number or inode. When a user program attempts to read a file that is a soft link. editing.

Fundamentals of Computer Technology rm deletes the symbolic link file. All inodes are stored in a contiguous area called inode block in a user inaccessible area of the file system. It then hands over control to the bootstrapping program. When the system is booted. The physical file system may be arranged on one or more actual storage devices. However. Each inode contains the following attributes of a file: o o o o o o o o o File type (regular. The state of the file system Inode Block: Every file has an inode – a 128-byte table. etc. Cognizant Technology Solutions. Fig.) Number of links (the number of aliases the file has) User-id (owner of the file) Group-id of the owner File modes of user. The file’s inode is used as an index into this inode block. 9. this block is simply kept blank.5: Components of a File System Every file system is organized in a sequence of blocks of 1024 bytes and generally has four components namely. leaving untouched the file that is referenced by the link. Soft links are distinguishable from files. All Rights Reserved C3: Protected . the bootstrapping program is read in from the boot block of the root file system. group and others (three permissions) Size of the file (bytes) Date and time of last modification of file data Date and time of last access of file data Date and time of last change of the inode. directory. It contains o o o o o o Size of the file system Length of the file system’s logical block Last time of updating in-memory to disk Number of free data block available and a partial list of immediately allocable free data blocks. device. typically hard disks. Number of inodes available and a partial list of immediately usable inodes. and can span across file systems. This in turn loads the kernel into memory. Super Block: contains global file information about disk usage and availability of data blocks and inodes. For other file system. the system BIOS checks for the existence of the first hard disk and loads the entire segment of the boot block into memory. Physical file system The collection of data represented by the virtual file system. Boot Block: Is the Master Boot Record (MBR) that contains a small boot program and the partition table. Page 179 ©Copyright 2007.

The indirect blocks do not contain data but only the addresses of those direct blocks which couldn’t be a accommodated in the inode.6: Relationship between inode and data blocks Page 180 ©Copyright 2007. meaning that the the data is collected in a buffer until a full block can be transferred. In UNIX all physical devices are accessed via device files. UNIX I/O Subsystem Special files are also known as device files. They are used for unbuffered data transfers to and from a device. 9. Block device files are used to access block device I/O. Block devices do buffered I/O. Every block is identified by an address – a number that refers to the position of the block in the data block area. Character device files are associated with character or raw device access. Cognizant Technology Solutions. type. One transfer can consist of multiple characters. The data blocks commence from the point the Inode blocks terminate. When a file expands. There are two types of device files. the kernel uses the information in it to determine which physical device to access and how to access it.Fundamentals of Computer Technology An array of 15 pointers to the file. Fig. character and block. Device files contain information on location. The kernel reads and writes data using a different block size. The blocks containing data are known as direct block. and this block is often referred to as a logical block. When a device file is opened. The blocks of a file are mostly not contiguous. (addresses where the contents of the file are stored ) o Data Blocks: The smallest block that can be read and written by the disk controller is 512 bytes. as well as two modes of access. Rather than transferring data in blocks the data is transferred character by character. It has to locate a free one from the blocks scattered randomly throughout the disk. they are what programs use to communicate with hardware. This slow down read/write operations and lead to disk fragmentation. All Rights Reserved C3: Protected . The inode keeps track of all direct block addresses (12) and some indirect blocks. It’s often called as a physical block. the kernel may not find the adjacent block free. and access mode for a specific device.

Fundamentals of Computer Technology

Some devices, such as disk partitions, may be accessed in block or character mode. Because each device file corresponds to a single access mode, physical devices that have more than one access mode will have more than one device file.

Device files are found in the /dev directory. Each device is assigned a major and minor device number. The major device number identifies the type of device, i.e. all SCSI devices would have the same number as would all the keyboards. The minor device number identifies a specific device, i.e. the keyboard attached to this workstation.

Device files are created using the mknod command. The form for this command is:

mknod device-name type major minor Where: device-name is the name of the device file type is either "c" for character or "b" for block major is the major device number minor is the minor device number UNIX IPC

Introduction to Inter Process Communication Processes do not run in isolation from each other. Generally they need to communicate with each other.

Examples Any two processes in a pipeline are communicating. One sends a stream of bytes to the other. Access to the lineprinter is controlled by a single process called ``lpd'' (the lineprinter daemon). Each time a user runs ``lpr'' this has to communicate with ``lpd'' and send it the file to print. Your home directories are stored on the machine ``willow''. Each time you access a file the O/S has to make a connection to willow, request the file from a suitable process on willow and accept responses from it.

Files and shared memory suffer from various concurrent processing problems. For example, if one process is putting information into a file, how does the other process know that the first process is done and it can go ahead and read the file or how does a process know when another process has read the message in a file and it is safe to delete it. Pipes and named pipes get away from these problems.

Page 181 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology Shared memory If two processes share the same piece of memory then they can use this to communicate. For example, one may write information in this shared area and the other may read it.

This can be a very fast method of information transfer because RAM can be used. Synchronisation is a major problem - if the first process keeps writing data, how can it ensure that the second one reads it?

Pipe A pipe acts like a channel between two processes. When one process writes into the pipe the other process can read from it. A pipe can usually buffer information so that the writer can place a lot of information in the pipe before the child has to read it. When the pipe becomes full the writer has to suspend.

Pipes can be un-named. This is the norm in UNIX where a process creates a pipe and then forks, so that the two processes share the pipe between them.

If the processes do not come from a common ancestor then they can only share a pipe if they can both name it (otherwise they could not find it). Named pipes usually appear as though they were files in the file system. Streams Pipes carry unstructured data - you put bytes in one end and get the same bytes out the other. Streams are designed to carry record information - you put records in at one end and get the same records out the other. Each record must contain a field saying how large it is.

Message Queues A message queue is like a pipe, and is used to transfer messages between processes in a UNIX system. Unlike a pipe, it retains message boundaries and hence is a much more reliable way for many processes to use the same IPC. This is often the case if a server process is receiving service requests from many different processes. Remember that a named pipe is used for a stream of bytes, so there are no boundaries.

Semaphores A semaphore provides a synchronizing mechanism for processes that are accessing the same resource. No data is passed with a semaphore-it simply coordinates access to shared resources.

Sockets Sockets are more like ports that you can send data to. A process will be ``listening'' at a port and will accept data sent to it.

Page 182 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

Fundamentals of Computer Technology Signals Signals are a fairly crude method if IPC. A process may send a signal to another such as ``wake up'' or ``die''. The other process can respond to these signals in various ways. Network Support in UNIX One of the biggest reasons for using UNIX is networking capability. With other operating systems, additional software must be purchased for networking. With UNIX, networking capability is simply part of the operating system. UNIX is ideal for such things as world wide e-mail and connecting to the Internet. In 1984, the University of California at Berkeley released version 4.2BSD which included a complete implementation of the TCP/IP networking protocols. Systems based on this and later BSD releases provided a multi-vendor networking capability based on Ethernet networking. The networking support included, remote login, file transfer, electronic mail, and other important features. As UNIX was ported onto more and more different types of computer hardware the UNIX networking allowed many different types of systems to share and mutually use data. Networks consisting of many different systems could be used as a large distributed system. When SUN Microsystems added NFS (Network File System), this ability to share and mutually use data was significantly enhanced.

UNIX was founded on what could be called a "small is good" philosophy. The idea is that each program is designed to do one job well. Because UNIX was developed by different people with different needs it has grown to an operating system that is both flexible and easy to adapt for specific needs.

UNIX was written in a machine independent language. So UNIX and UNIX-like operating systems can run on a variety of hardware. These systems are available from many different sources, some of them at no cost. Because of this diversity and the ability to utilize the same "user-interface" on many different systems, UNIX is said to be an open system.

A socket is an endpoint of communication between processes. It is a software entity that provides the basic building block for interprocess communications.

SCO TCP/IP supports sockets in the Internet and UNIX domains. A socket has a type and one or more associated processes. Three types of sockets are available to the programmer: stream socket datagram socket raw socket

The TCP/IP protocol and UNIX forms the basis for the Internet.

Page 183 ©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved C3: Protected

It provides virtual memory. The use of kernel objects to provide basic services. Cognizant Technology Solutions. It also supports a security model stronger than those of previous Microsoft operating systems. and/or POSIX. including both 32 bit and 64 bit processors. Windows 95. Windows XP supports multiples operating environments and symmetric multiprocessing. integrated caching. portable operating system. and support for client – server computing. All Rights Reserved C3: Protected . and includes internationalization Fig 9. Windows 2000. It can run programs compiled for MSDOS.Fundamentals of Computer Technology Windows XP Introduction: Microsoft designed Windows XP to be an extensible. and NUMA computers.7: Windows XP Architecture Page 184 ©Copyright 2007. Win 16. and preemptive scheduling.

0 Design Principles Extensibility o It is a layered architecture. reflecting the popularity of Windows 3. which runs in protected mode. processor affinity. Cognizant Technology Solutions. All Rights Reserved C3: Protected . XP uses hardware protection for virtual memory. Applications that follow the IEEE 1003. including a priority. provides the basic system services. and accounting information Page 185 ©Copyright 2007.1 (POSIX) standard can be complied to run on XP without changing the source code The subsystems can communicate with one another via high-performance message passing. several server subsystems operate in user mode. Executive.Fundamentals of Computer Technology History In 1988. execution is never preempted There are four main responsibilities: o thread scheduling o interrupt and exception handling o low-level processor synchronization o recovery after a power failure Kernel — Process and Threads Threads are the unit of execution scheduled by the kernel’s dispatcher Each thread has its own state. On top of the executive. Preemption of low priority threads enables the system to respond quickly to external events and also designed for symmetrical multiprocessing. and software protection mechanisms for operating system resources. Microsoft decided to develop a “new technology” (NT) portable operating system that supported both the OS/2 and POSIX APIs. Originally. Reliability o Compatibility o Performance o International supports different locales via the national language support (NLS) API System Components — Kernel Foundation for the executive and the subsystems Never paged out of memory. Portability o Windows XP can be moved from on hardware architecture to another with relatively few changes (a) Written in C and C++ (b) Processor-dependent code is isolated in a dynamic link library (DLL) called the “hardware abstraction layer” (HAL). NT was supposed to use the OS/2 API as its native environment but during development NT was changed to use the Win32 API.

Fundamentals of Computer Technology Kernel — Scheduling The dispatcher uses a 32-level priority scheme to determine the order of thread execution. Cognizant Technology Solutions. parse and security Executive — Virtual Memory Manager The design of the VM manager supports virtual to physical mapping. and virtual address aliasing The VM manager in XP uses a page-based management scheme with a page size of 4 KB The XP VM manager uses a two step process to allocate memory o o The first step reserves a portion of the process’s address space The second step commits the allocation by assigning space in the 2000 paging file Page 186 ©Copyright 2007. delete. but XP does not guarantee that a real-time thread will start to execute within any particular time limit is called soft realtime Executive — Object Manager XP uses objects for all its services and entities. close. a paging mechanism. All Rights Reserved C3: Protected . when a thread terminates. or when an application changes Real-time threads are given preferential access to the CPU. open. transparent cache coherence on multiprocessor systems. query name. Those priorities are divided into two classes o o The real-time class contains threads with priorities ranging from 16 to 31 The variable class contains threads having priorities from 0 to 15 Trends to give very good response times to interactive threads that are using the mouse and windows Enables I/O-bound threads to keep the I/O devices busy Complete-bound threads soak up the spare CPU cycles in the background Characteristics of XP’s priority strategy o o o Scheduling can occur when a thread enters the ready or wait state. namely create. the object manger supervises the use of all the objects o o o Generates an object handle Checks security Keeps track of which processes are using each object Objects are manipulated by a standard set of methods.

and manages buffers for I/O requests Works with VM Manager to provide memory-mapped file I/O Controls the XP cache manager. 2. it is used to request services from the various XP subsystems. Cognizant Technology Solutions. All Rights Reserved C3: Protected . In particular. 3. When a LPC channel is created. and using threads and processes. port's message queue is used as intermediate storage.Fundamentals of Computer Technology Executive — Process Manager Provides services for creating. Executive — Local Procedure Call (LPC) Facility The LPC passes requests and results between client and server processes within a single machine. which handles caching for the entire I/O system Supports both synchronous and asynchronous operations. Executive — I/O Manager The I/O manager is responsible for o o o o file systems cache management device drivers network drivers Keeps track of which installable file systems are loaded. one of three types of message passing techniques must be specified. the security reference monitor checks the process’s security token and the object’s access control list to see whether the process has the necessary rights Page 187 ©Copyright 2007. Executive — Security Reference Monitor The object-oriented nature of XP enables the use of a uniform mechanism to perform runtime access validation and audit checks for every entity in the system Whenever a process opens a handle to an object. and the messages are copied from one process to the other. 1. Called quick LPC was used by graphical display portions of the Win32 subsystem. suitable for small messages. up to 256 bytes. Issues such as parent/child relationships or process hierarchies are left to the particular environmental subsystem that owns the process. avoids copying large messages by pointing to a shared memory section object created for the channel. deleting.

Page 188 ©Copyright 2007. it also has facilities for network management. such as information about the volume. used when XP wants to share resources with these networks. To describe networking in XP. NetBEUI (NetBIOS Extended User Interface): default protocol for Windows 95 peer networking and Windows for Workgroups. or span across several disks All metadata. All Rights Reserved C3: Protected . The server message block (SMB) protocol is used to send I/O requests over the network. an entire disk. It has four message types: Session control File Printer Message The network basic Input/Output system (NetBIOS) is a hardware abstraction interface for networks. we refer to two of the internal networking interfaces: NDIS (Network Device Interface Specification) — Separates network adapters from the transport protocols so that either can be changed without affecting the other TDI (Transport Driver Interface) — Enables any session layer component to use any available transport mechanism XP implements transport protocols as drivers that can be loaded and unloaded from the system dynamically. the amount of internal fragmentation is reduced File System — Security Security of an NTFS volume is derived from the XP object model Each file object has a security descriptor attribute stored in this MFT record This attribute contains the access token of the owner of the file. and an access control list that states the access privileges that are granted to each user that has access to the file Networking XP supports both peer-to-peer and client/server networking. Cognizant Technology Solutions. is stored in a regular file NTFS uses clusters as the underlying unit of disk allocation o o A cluster is a number of disk sectors that is a power of two Because the cluster size is smaller than for the 16-bit FAT file system.Fundamentals of Computer Technology File System The fundamental structure of the XP file system (NTFS) is a volume o o o Created by the XP disk administrator utility Based on a logical disk partition May occupy a portions of a disk.

Direct access and sequential access are supported through system calls and library routines. Page 189 ©Copyright 2007. What is the difference between process and thread ? 4. so many threads can be there in a program. Main memory: Only large storage media that the CPU can access directly. Hard real-time systems: Required to complete a critical task within a guaranteed amount of time. 4. and process CPU time? 2. Process is some job or task which is running in background. Secondary storage: Extension of main memory that provides large nonvolatile storage capacity. Processes can communicate with pipes or. Files are supported by the kernel as unstructured sequences of bytes. Processes can easily create new processes with the fork system call. The data blocks are found by pointers in the inode. Difference between Primary storage and secondary storage? Answers: 1. sockets. was distributed in source form. Networking support is one of the most important features. Cognizant Technology Solutions. Directory entries point to inodes.Fundamentals of Computer Technology Summary The early advantages of UNIX were that this system was written "in a high-level language. Different types of Real-Time Scheduling? 5. Test Your Understanding 1. All Rights Reserved C3: Protected . Soft real-time computing: Requires that critical processes receive priority over less fortunate ones. 5. What is the relation between process system time. Processes are represented by two structures: the process structure and the user structure. process waiting time. while a thread is a single line of execution in a programs . more generally. What is the difference between UNIX and windows? 3. UNIX is a multiprogrammed system. The socket concept provides the programming mechanism to access other processes. while windows is single user multi tasking 3. UNIX is multi user multi tasking. Process system time (turn around time) = process cpu time + process waiting time 2.

eps.net/ www.gov/mpi/ For information on the World`s fastest supercomputers : http://www. Larry L.hw.wikipedia. Morris Mano.answers. “Operating Systems: Internals and Design Principles” Prentice Hall.uk/David. Forouzan Carl Hamacher.rollyo.microsoft.thefreedictionary.html en.ac.java. Design Principles and Applications” John P Hayes.Patterson and Bruce S.com/explore.th/Publish/ComputerOrganization&Architecture/com.”Computer Organization” McGrawHill International Edition.cs.W.wikipedia.dev.htm http://www.com/explore. Page 190 ©Copyright 2007.html?rollterm=j simple. “Survey of Operating Systems” Computer Networks – A Systems Approach.htm http://users.Walker/CM0323/ http://www.ac. Behrouz A.sei.cf.com/compute+server https://computeserver.org www.kmitl. “ Computer Architecture and Organization “ Jane Holcombe Charles Holcombe.html?rollterm=j www.Fundamentals of Computer Technology References Websites http://www.Davie William Stallings.ece. All Rights Reserved C3: Protected . 2001 M.ac.mspx computing-dictionary. Zvonko Vranesic. “Computer Architecture and Organization.anl.org/wiki/Client-server www.mcs. Safwat Zaky .org/wiki/Wikipedia:Privacy_policy www.it. 2002.com/windowsserver2003/technologies/storage/default.rollyo.top500.com/explore.rollyo.cmu.uk/Modules/B35dq1/slides/Performance/sld001.edu/str/descriptions/clientserver_body. Cognizant Technology Solutions. “Computer System Architecture” “Data Communications and Networking”.html?rollterm=j – Books B Govindarajalu.com/topic/firebird-database-server www.

Cognizant Technology Solutions.Fundamentals of Computer Technology STUDENT NOTES: Page 191 ©Copyright 2007. All Rights Reserved C3: Protected .

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->