Sie sind auf Seite 1von 41

raj

1. INTRODUCTION OF OPERATING SYSTEM Q - What is an Operatin s!ste"# Operating system is a system software that is extremely important to activate and coordinate the activities of various hardware resources like the processor, input output devices etc. It also controls the movement of information in the computer system. It is the first program who loaded into the computer memory when we boot our computer system. It provides a standard to its application software so that application software can talk to operating system or each other easily. The main functions of an operating system are... i! It assigns a processor to different tasks being performed by the computer system. ii! It allocates the main memory and other storage areas to the system programs as well as user programs and data. iii! It carries out the input-output management and co-ordinates different input-output devices while one or more program is being executed. iv!It manages file on various storage devices and their transfer from one to another devices. It also allows modification through text editor or any other program. v! It establishes and enforces the job priority. vi!It automatically transfer control from one program to another as per control signal supply by user. vii! It establishes and maintains data security and integrity. viii! It also produces error messages and other debugging codes. ix! It maintains log of users in multi-user operating system. x! It facilitates easy communications between the computer system and the computer operator. Sin $e-%ser Operatin S!ste" Operating system, which allows only one user to work on a computer at a time, is known as single user operating system. "xample included #$-%O$, &indows 'x etc. M%$ti%ser Operatin S!ste" ( #ultiuser operating system allows a number of users to work together on a single computer. )*I+ is a multiuser operation system. It is not that all users will bump on a computer at the same time. "ach user will be provided with a terminal and all such terminals will be connected to the single computer. #ultiuser operating system running on a computer will manage the work of all users, without letting them know that they all are actually working on a single computer. Sin $e - tas&in Operatin S!ste" Operating system which can execute a single job at a time is known as $ingle- tasking operating system. ,or example, #$-%O$ is a single tasking operating system because you can open and run only one application in %O$, at one time. M%$titas&in Operatin S!ste" #ultitasking operating system allows the user to perform more than one job at the same time on a computer. #ost of today-s operating systems such as &indows 'x, O$./, )*I+, 0I*)+ etc. support multitasking. ,or example, when you open #$-&ord and Internet "xplorer at the same time, the &indows Operati'ng system is doing multitasking. The operating system is able to keep track of where yo are in each of these applications and switch from one to another without losing track. Rea$- ti"e Operatin S!ste" 1eal - time Operating $ystems work towards providing immediate processing and also responding to user-s commands in a very short time. $uch an operating system is more

raj

commonly used in chemical industry for process control and scientific processing like airplane control and space vehicle control operations. $uccess of a real time system does not depend only on the correctness of the result, but also on the timeliness of the result. ( correct answer obtained after the expiration of time limit is as bad as a wrong answer. $ome examples of real time operating systems are 34-1T and 5T- works. Net'(r& Operatin S!ste" )NOS* *etwork Operating $ystem *O$! is an operating system specifically designed to support interconnection of several computers. *O$ provide support for multiuser operations as well as administrative, security and network management functions. $ome examples of *O$s are *ovell-s *etware, #icrosoft-s &indows *T, (rtisoft-s 0(* tactic etc. ( network operating system has to acknowledge and respond to re6uests from many workstations, managing network access, resource allocation and sharing, data protection as well as error control. It provides for printer, file system, database and application sharing. Distri+%te, Operatin s!ste" ( %istributed Operating $ystem hides the existence of multiple computers interconnected by a network! from the user. That is, the user remains unaware of the fact that many computers and being used to process the data. These computers may be located at many places around the globe. %istributed Operating $ystem provides single- system image to its users. "ach computer in a distributed computing system processes a part of the global distributed operating system. (ll these computers work in close coordination with each other. 4rocesses and system resources are managed globally, and controlled from specific locations. )ser views the complete system as a 7virtual uni-processor7 and not as a collection of machines. The distributed operation system works towards generating this illusion. %egree of autonomy of individual computers in an environment that uses network operation system is very high whereas the degree of autonomy of individual computers in an environment that uses distributed operation system is considerably low. -(' is it C("p%$s(r! t( .%n/ti(n a /("p%ter s!ste"# Operating system works like a coordinator and mediator between users and computer hardware as well as software. It is the main system software that controls all the hardware and software of the computer. It manages the memory, devices, processors etc. (s soon as computer system boots, the control automatically transferred into hand of Operating $ystem. &ithout an O$, the computer is just like a 89uddhu 9aksa:, who can;t do anything. Operatin S!ste" Pr(/essin Meth(,s 5arious types of O$ processing methods are< a* Seria$ Pr(/essin +* 0at/h pr(/essin /* M%$tipr( ra""in Seria$ Pr(/essin In the serial processing, programs are executed one by one, in the order in which they are supplied to the computer. That is, the different computer jobs are executed one after the other. 0at/h pr(/essin In batch processing systems, a number of jobs are put together and executed as a group. #any users. M%$tipr( ra""in In a 9atch #ultiprogramming system, a series of jobs was loaded into the memory at the same time, if sufficient memory space were available. &hile one job was held up waiting for an I.O transfer, another job was started. ( job was selected from those ready to run!, on the basis of an

raj

operator assigned priority number. It was found advantageous to =mix; jobs which differed in the balance of processor to I.O activity. $ome systems only handled two jobs at a time, which were referred to as the foreground and the background jobs. The foreground job had the higher priority and was allowed to run if it was able. The background job could only run if the foreground was awaiting an I.O transfer or was otherwise inactive. 9ackground running is inherently more suited to jobs re6uiring little processor time, but with relatively more I.O activity. ( specific example of such a job is referred to as spooling. Sp(($in This acronym stands for $imultaneous 4eripheral Operations On-0ine. "ssentially, this techni6ue =absorbs; surplus processor time by performing I.O transfers for other jobs. Input and output data were routed via disk files, so that these jobs were only re6uired to communicate with disk systems with disk systems which are, of course, much faster. $pooling was one of the earliest applications of multiprogramming. >obs are read in via a card reader and copied into a disk file. The operating system reads this file as if it were the card reader. 4rintable output generated by the running programs is written to another disk file, while a printing program constantly prints the data in this file if any!. (nother benefit of spooling is that access to the slow peripherals is restricted to the one program, namely the spool print program. This facilitates the sharing of devices such as printers between several running programs, avoiding the need for these programs to =compete; for possession of the printer. #emory #anagement, 4rocess #anagement, %evice #anagement, ,ile #anagement OPERATING SYSTEM SOFTWARE - Operating $ystem is a set of programs that is extremely important to activate and ?o-Ordinate the activities of various hardware resources like the processor and Input.Output devices. In other words, Operating $ystem controls the movement of information on in the ?omputer. O$ is the first program loaded into the computer-s memory after the computer is switched on. The operating system is an important component of the computer system, because it sets the standards for application programs that run in it. (ll programs must be written to 7talk to7 Operating $ystem. The main functions of an O$ are< a! It assigns a processor to different tasks being performed by the computer system. b! It allocates the main memory and other storage areas to the system programs as well as user programs and data. c! It carries out the input.output management and coordinates and assigns different input and output devices while one or more programs are being executed. d! It manages files on various storages devices and the transfer of these files from one storage device to another. It also allows all files to be easily changed and modified through the use of text editors or other file manipulation software packages. e! It establishes and enforces the job priority. That is, it determines and maintains the order in which jobs are to be executed in the computer system. f! It automatically transits from job to job as directed by special control statements. g! It is able to interpret commands and instructions. h! It co-ordinates and assigns compilers, assemblers, utility programs, and other software packages to various users working on the computer system. i! It establishes data security and integrity. That is, it keeps different programs and data in such a manner that they do not interfere with each other. #oreover, it also protects data from being destroyed by and other user. j! It also produces traces, error messages, and other debugging and error detecting codes. k! It maintains internal time clock and log of system usage for all users. l! It facilitates easy communication between the computer system and the computer operator human!.

raj

1.DISTRI0UTED OPERATING SYSTEM2 A3GORIT-M ( distributed computer system is a collection of autonomous computer systems capable of communication and cooperation via their hardware and software interconnection. %istributed computer systems are generally characteriAed by the absence of shared memory, by unpredictable internodes communication delays, and by practically no global system state observable by component machines. ( distributed operating system governs the operation of a distributed computer system and provides a virtual-machine system abstraction to its users. ?omputer system environments and operating systems usually support intersite communication and supply protocols for bulk data exchanges. ( network operating system may provide remote operations and remote file access, but the user is almost invariably re6uired to be aware that the resource being operated on is remote. ( distributed operating system provides a virtual-machine abstraction of the system and offers a unified interface for resource access and manipulation regardless of its location. *etwork and distributed operating systems have a common hardware baseB the differences between them lie almost exclusively in software. Rati(na$ F(r Distri+%te, S!ste" Wh! Distri+%te, The evolution of computer communication technology let to the implementation of a major computer network called (14(*"T in the late sixties. It was funded by the %efense (dvance 4rojects (gency %(14(! of the ).$. %epartment of %efense provided a large scale operational experience and stimulated a lot of early research on computer networks. "ver since, researchers and practitioners alike have liberated at realiAing the promise of distributed processing. It major potential benefits include< 1esource sharing and load balancing ?ommunication and information sharing Incremental growth 1eliability, availability, fault tolerance 4erformance Resource sharing is one of the major potential advantages of distributed systems. Temporary surpluses and shortages of resources such as processing power, storage capacity, and information from databases may be balanced to improve cost-effectiveness and performance of a distributed system. On a greater scale, a distributed system effectively merges a number of previously autonomous user populations, such as several different time-sharing systems and.or 0(*s, into a larger union. $imilar savings have been realiAed in other industries, such as load sharing in power utility systems. ( large common distribution system makes it possible to pool the power and meet the demand wherever it occurs. C(""%ni/ati(n an, in.(r"ati(n sharin are forms of resources sharing. In our classification they are presented as a separated category in order to emphasiAe their special importance. 4ersonnel computers, which were initially heralded as providing the ultimate freedom and self-sufficiently, are increasingly abandoning isolation and being connected via networks in order to enable their users to communicate and share information. %istributed systems generally serve much larger, possibility geographically dispersed, user communicates and thus represent an attractive opportunity for communication and information sharing. "lectronic mail has a number of appealing characteristics, such as fast delivery and the possibility of instant reply, as well as store-and- forward capability that allows interested parties to converse at their convenience.

raj

%ue to the economy of scale, the point of cost effectiveness for connecting to information databases, such as large depositories of technical abstracts and indexed references, is more easily reached in a distributed system than in a time sharing system. 9ulletin boards and electronic forums are a relatively novel form of teleconferencing and topical information exchange. )ser benefits include the possibility of focusing only on the specific areas of interest and the ability to offer or solicit peer opinions on any given topic therein. Incremental growth may be accomplished in a distributed system by gradually augmenting the e6uipment as the needs of applications and user re6uirements change. Reliability, availability and fault tolerance are 6uite different issues, but there common thread is that they have significant potential advantages in distributed system over the centraliAed environment. Increased reliability comes from duplication of e6uipment and the possibility of storing replicated data at different locations. Performance improvements come mostly from the potential for parallel operation when multiple nodes cooperate on solving a single problem. 1esponse time, a measure of performance, may be improved in a distributed system by virtue of the ability to place fre6uently used data closed to there users. Other potential advantages of distributed systems include reduced costs, greater capacity than a single processor can deliver, and better ability to parallel real world organiAational structure due to local control of local data. #ajor drawbacks of distributed processing are< 1educed ability to pool memory and processor resources among distinct nodes Increased dependence on network performance and reliability $ecurity weaknesses #ore complex system administration and maintenance What Is Distri+%te, %istribution basically spans three dimensions< 3ardware ?ontrol %ata $ystem resources generally fall into one of the two categories 2! physical resources, such as processors and devices, and /! logical resources, such as files and processes. %istributed algorithm and processing often involve multiple processes that execute on different nodes. ?ontrol includes resource management and coordination of activities that takes place on individual nodes. Centralization control re6uires delegation of an arbiter node that manages a set of system resources. The central arbiter has complete information about the state of resources under its jurisdiction and of pending re6uests for their use. The single-point failure problem may be alleviated by implementing algorithm for election of the successor node, at the cost of added complexity, logging of outstanding re6uests, and potentially long transition delays. Distribution of data may be partitioning, replication, or both. In some applications judicious partitioning of data can contribute to performance and availability by placing fre6uently used items close to their points of processing. C("p%ter Net'(r&s (utonomous machines that execute application programs and constitute the computational resource of a distributed system are usually called hosts. They are connected for purposes of communication by means of a communication network or sub network. %epending on the physical distance spanned by their communication sub-networks, computer networks are usually classified as

raj

&ide-area networks &(*s! 0ocal area networks 0(*s! Wi,e Area Net'(r&s2(s indicated the communication subnet itself consists of a number of communication processors connected by physical communication lines. %edicated communication processors act as switching elements between two or more communication lines. (fter the original (14(*"T implementation, the communication processors are often called interface message processors, or I#4s for short. ( host processor wishing to communicate with another host typically presents its re6uest to the designated I#4. )sually each host is availed the services of a specific I#4, although a single I#4 may serve several hosts. The I#4-to-I#4 communication channel may be of one of the two board types< 4oint to point 9roadcast 4oint-to-point links are dedicated physical lines used to connect a specific pair of I#4s. The actual number and topology of these links are determined by taking into consideration factors such as cost, communication delays, and reliability. ?ommon topologies of physical circuits that connected I#4s are< $tar 4artially connected ,ully connected 1ing 3ierarchical or tree-structured network The star has a fixed, two-hop host-to-host communication delay but suffers from the single point of failure. ,ully connected systems are fast and reliable but expensive since the number of links grows as the s6uare of the number of hosts. 4artially connected and mesh networks have direct links between some but not all nodes. $ingle-link ring networks are low in cost but have variable and potentially long delays, especially when a host wants to communicate with its immediate neighbor in the direction opposite the ring flow. 1ings are generally sensitive to link failures, especially in native implementations, where each node must act as an active repeater for all traffic. 3ierarchical connections may be suitable for certain types of organiAations and systems, such as process control, where communication naturally flows in a hierarchical manner. This configuration is poor in systems with fre6uent peer-to-peer interactions, since they must be routed up and down the hierarchy. 3(/a$ Area Net'(r&s2(s indicated earlier, local area networks 0(*s! are characteriAed by high bandwidth, low-delay communication links. They often rely on a relatively high-speed common access communication medium to carry the massage traffic. 0(* communication speeds range from the order of several #bps to the order of a Ebps with special cabling or optical fibers. The 0(* communication medium itself is passive in the sense that it provides none of the processing power, routing, or storage functions found in the store and forward communication subnets. In 0(*s, communication functions and processing are provided by the nodes host machines!, either directly or by their integral dedicated communication processors. The network topology is usually a bus or a ring. ( star topology may be found in specialpurpose systems and in some early designs. In ring-based systems, messages circulate around the ring. They are then recogniAed and copied by their addresses. %epending on the acknowledgement scheme in use, either the

raj

destination or the source node may be charged with removing the consumed massage from the ring. (nother common topology in local-area networks is the bus. In a typical bus technology, a commonly accessible passive conduit carries the message traffic. (ll nodes tap the bus, listen to all the traffic, and extract the massage addressed to them. Taps themselves are usually passive and do not physically break the bus. (s a result, bus-oriented 0(*s are reliable and able to sustain communication between healthy parties in the presence of multiple node failures. ( token-bus is a 0(* that attempts to combine the benefits of bus topology with the bounded massage delays characteristic of rings. ( token bus is a bus-based 0(* whose nodes from a logical ring in order to use tokens for access control. ( token bus is used in #(4 #anufacturing (utomation 4rotocol! 0(*. A$ (rith" .(r Distri+%te, Pr(/essin In a distributed system, cooperating processing may reside on different nodes. 0ike their single-site counterparts, distributed cooperating processes rely on inter process synchroniAation and communication mechanisms to collectively and coherently accomplish a common mission. These complexities are largely due to he differences between distributed and centraliAed systems which include< (bsence of shared, commonly accessible memory Internodes communication delays that can exceed internodes communication delays by orders of magnitude Elobal system states is not observable by component machines due to communication delays, component failures, and absence of shared memory ( much richer set of failure modes and the desire to continue at least degraded operation in the presence of partial failures In certain respects, a centraliAed system may be viewed as a special case of a distributed system in which inter component propagation communication! delays are practically negligible. (s a result, algorithms and mechanism devised for the distributed case generally function correctly when applied to the centraliAed uniprocessor case, but the converse is not necessarily true. 3a"p(rt4s A$ (rith"2(ssuming the presence of the pipelining property and eventual delivery of all messages, the solution re6uires time-stamping of all message, and it also assumes that each process maintains a re6uest 6ueue, initially empty, that contains re6uest message ordered by the relation . The algorithm is defined by the following five rules. 2. Initiator< i! &hen process 4i desires to ac6uire exclusive ownership of the resources, it sends the time-stamped message re6uest Ti, i!, where Ti G ?i, to every other process and records the re6uest in its own 6ueue. /. Other processes< j,jHi! &hen process 4j receives the re6uest Ti, i! message, it places the re6uest on its own 6ueue and sends a time-stamped reply Tj, j! to process 4i. @. 4rocess 4i is allowed to access the resource when the following two conditions are satisfied< a! 4i;s re6uest message is at the front of the 6ueue, and b! 4i has received a message from every other process with a time stamp later than Ti, i!. /. 4rocess 4i releases the resource by removing the re6uest from its own 6ueue and by sending a time-stamped release message to every other process. @. )pon receipt of 4i;s release message, process 4j removes 4i;s re6uest from its re6uest 6ueue. Ri/art an, A ra'a$a4s A$ (rith"2-

raj

1icart and (grawala;s 2'J2! algorithm is a more efficient version of 0amport;s algorithm. It is based on identical communication assumptions and on the total ordering of events as provided by the relatin. 2. Initiator< i! &hen process 4i re6uests the resource, it sends the time-stamped message re6uest Ti, i!, where Ti G ?i , to every other process and records the re6uest in its own 6ueue. /. Other processes< j,j H i! &hen process 4j receives the re6uest message , it acts as follows< a! If 4j is not currently re6uesting the resources, it returns a time-stamped reply. b! If 4j is currently re6uesting the resources, and the stamp of its re6uest Tj , j! precedes Ti , i!, process pi;s re6uest is retainedB otherwise, a time-stamped reply message is returned. /. 4rocess 4i is allowed to access the resources when the following two conditions are satisfied< a! 4i;s re6uest message is at the front of the 6ueue. b! 4i has received a message from every other process with a time stamp later than Ti , i!. @. &hen process 4i releases the resource, it sends a reply message for each pending re6uest message. Distri+%te, C(n/%rren/! C(ntr($ an, Dea,$(/&s2In a distributed system, a single transaction can span files residing at several different sites. 1esource ac6uisition by concurrent transactions originating at different sites can lead to deadlocks. *ecessary conditions for a deadlock are the same in centraliAed and in distributed systems. They are< 2! mutual exclusion, /! hold-and-wait, @! no preemption, and C! circular waiting. Techni6ues for dealing with deadlocks include deadlock prevention, deadlock avoidance, and deadlock detection and recovery. %eadlocks can be prevented by ordering and honoring re6uests according to their time stamps. In principle, the familiar centraliAed algorithms for deadlock avoidance can be applied in distributed system with centraliAed control. In addition to re6uiring proclaiming of resources, such approaches tend to be slowing, susceptible to a single-node failure, and prone to congestion. $everal decentraliAed algorithms for concurrency control that avoid deadlocks have been devised for use in distributed systems. In this session we describe two such protocols, called wait-die and wound-wait due to 1osencrantA et al. 2'IJ!. 9oth protocols are essentially database concurrency control algorithms that avoid deadlocks. "ach transaction is time-stamped at its creation by the originating site. "ach site maintains a lock 6ueue for each of its publicity available resources. 0ock 6ueues are ordered according to the time stamps of participating transactions. ( transaction at the head of a 6ueue owns the resources. In case of conflicts, a node where lock re6uests collide applies locally one of two rules< &ait-die< If the re6uestor is older, than the transaction that owns the desired lock-the re6uestor-waits. Otherwise, the re6uestor dies. &ound-wait< If the re6uestor is older than the owner of the lock, the re6uestor wounds the owner. Otherwise, the re6uestor waits. %ying means that the affected process or transaction is aborted. ,or transactions, aborting implies the undoing of all partial effects and the releasing of all locks ac6uired by the transaction thus far. The aborted transaction is usually restarted at a later time. &ounding means that an older transaction instructs the younger, conflicting one to die-that is, to abort, undo its partial effects, and release the locks.

raj

'

In the wait-die scheme, an older transaction is permitted to wait. This is safe because circular waiting chains cannot be formed, since a younger transaction never waits for an older one. In the wound-wait scheme, an older transaction does not wait for younger ones. (fter wounding, the transaction has to wait for the wound to take effect and for the younger transaction to die and release the lock. In a wait-die system, a transactions that dies and is restarted may again cause a conflict with the same transaction and be forced to die again. On the positive side, wait-die systems have the desirable property that a transaction is guaranteed not to restart ones it has accessed all its re6uired database entities for the first time. This property is not enjoyed by wound-wait systems. C(pin With Fai$%res One of the major potential benefits of distributed processing is resilience to failures and increased system availability. #ere distribution of hardware and data does not automatically yield an inherently more reliable system. In fact, due to its dependence on multiple nodes and communication links, a distributed system may be less reliable than a single-site centraliAed system. The promise of distributed systems can only be realiAed when the proper hardware foundation is augmented with fault mechanisms and data redundancy provided and managed by the systems software. Fai$%res in Distri+%te, S!ste"s2?ommon failures in distributed systems include< ?ommunication-link failures *ode failures 0ost messages In order to function properly, the rest of the system must 2! detect failuresB /! determine the cause, such as identifying the type of failure and the failed componentB @! reconfigure the system so that it can continue to operateB and C! recover when the failed component is repaired. ( node engaged in a handshaking protocol of some kind usually experiences a failure as the lack of expected response from its partner within a prescribed time limit. The use of time-outs is a common techni6ue for detecting missing responses or acknowledgements. Too long time-out results on sloe detection of missing messages. On the other hand, too short a time-out may trigger false alarms by declaring as missing messages that are just delayed. Eiven the possibility of lost messages, it is common to go through a few retries before declaring a failure to communicate. (fter a predetermined number of retries fails to be acknowledged within the time-out limit, it is reasonable to conclude that a failure has occurred. In general, in a distributed system there is no direct way for a node to determine the cause of the failure, such as a link or a node, on the basis of the missing response alone. Thus some system component must engage in detection of the type of failure so that the appropriate action may be taken. ,ailure of a node can result in simple stoppage, called fail-stop, or in erratic malfunctioning behaviors. The latter is much more difficult to deal with, as the malfunctioning node may continue to exchange messages but may violate the protocol and thus confuse other nodes, withhold answers intermittently, or disseminate corrupt or forged messages. 1econfiguration in the case of link failures consists of choosing and alternate path and updating the corresponding routing information by all affected nodes. 1ecovery from link failures consists of relatively simple updating of the routing information. *ode recovery is more complex since it re6uires updating of state

raj

2N

information and possibly replaying of missed messages by some of the active nodes, in addition to updating of system topological maps. MEMORY MANAGEMENT The memory is divided into two parts<2! ?ontiguous part< - ?ontiguous part for operating system program also called monitor. $econd section< - $econd section is for user program. SING3E PROCESS MONITOR In single process monitor operating system only keep the track of the first last location available for allocation of user programs. In order to provide a contiguous area of free storage for user program operating system is loaded at one extreme end, either at the bottom or at the top. This important factor affecting only interrupts vector case. $ince the interrupt vector is often in low memory, operating system program is kept in low memory (new program Kuser programL is loaded only when the operating system passes a control to it. (fter receiving a control it starts running until its completion or termination due to I.O or some error. &hen this program is completed or terminated. The operating system may load another program for execution. This type of memory management scheme was commonly use in single process operating system such as op.m. Two important issues such as protection and sharing of code must be addressed while design any memory management scheme sharing of code and data in a single process environment does not make mush sense because only one process resides in memory at a time. 4rotection is also hardly supported by a single process monitor because only one process is memory Mresident at a time. 3owever, protection of operating system program from user code is must otherwise it may crash. Operating system code usually resides in low memory area. ( register also called fence register is set to the highest address occupied by operating system code. ( memory address generated by user program to access certain memory location is first compared with fence register content. If the address generated is below the fence, it will be trapped and denied permission. $ince modification of fence register is considered as a privileged operation there fore, only operating system is allowed to make any changed to it. Partiti(ne, "e"(r! a$$(/ati(n stati/ 2 $tatic partitioning implies that the division of memory into no. of portions and its siAe is made. In the banging and remain fixed there after. The basic approach here is to divide memory into several fixed siAe partitions where each partition will accommodate only one program for execution. The no. of programs residing in memory will be bound by the number of partitions. &here a program terminates, that partition is free for another program waiting in a 6ueue. In the fig. #emory is partitioned into F regions. The first region is revered for o.s and 42, 4/ and 4@ is reserved for program and two partitions are free and available for allocation. &herever a new process is ready to be loaded into memory and if no portion is free, swapping of processes between main memory and secondary is alone. $wapping helps in cup utiliAation by replacing suspend able process but residing into main memory with ready to execute processes from secondary storages. &hen the scheduler admits a new process for which no part ion is free, a memory manager is invoked to make a partition free to accommodate the process. 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 huger priority process. &hen the higher priority the higher process is terminated, the lower priority process can be swapped back and continued. $wapping re6uires secondary storage. %evice such as fast disk to store the suspended processes from main memory .one problem with swapping process is that it takes lengthy time to

raj

22

access process from secondary storage device. ,or example, to get an idea of total swap time, assume that user program is 2NNk words and secondary storage device is access time Jm sec. (nd a transfer rate of /DNNNNword.sec. Then a transfer of 2NNk words to or from memory tasks<GJmsecO 2NNk words./DNNNN words sec! GJ m sec O 2NNNNN words./DNNNN words.sec GJO/.Dsec JO/P2NNN.D GJOCNN GCNJm sec approximately! $ince we must both swap in and swap out the total swap time is about CNJOCNJGJ2F m sec. This is a very long time for computer. $tatic partition methods take more time to execute any task if any partition is not free. (nd main memory problem with fixed siAe partition is the wastage of memory by programs that are smaller than their partitions. D!na"i/ partiti(ns<-Q The siAe and the no. of portions are decided during the run time by the operating system. %ynamic partitions also called variable partition! which creates partitions dynamically to meet the re6uirements of each re6uesting process, when a process terminates or becomes swapped out the memory manager can return the vacated space to the pool of free memory are areas from which partition allocation are made. In dynamic partition neither the siAe nor no. of dynamically allocated partition need be limited at any other time. (ssume that we have a 2NN to main memory CNk is occupied by o.s program there are JCjobs waiting for memory allocation in a job were. (nd siAe of job 2 is

2Nk job is @Nk job is Jk and job is 2Fk. (pplying fifes scheduling policy. 4rocess a, process b, process c can be allocated in memory. 4rocess d cannot be accommodated because. Only RFN- @NO2DO2N!S G2Dk memory rest. $how in fig. 0et us assume process after some time process a is terminated, releasing 2Nk memory space. This is shown in below fig. (fter that the process next This is 0et us assume after some time process d is terminated the control is retuned again the process 6ueue and next process process e! is swapped this is shown in below fig.

control is returned to d process 6ueue and process is swapped.. shown in fig.

raj

2/

&ith dynamic portion the main problem is fragmentation. Its solution is combine the allfree space after that the control is returned to the process 6ueue and then next process is swapped. One advantage with variable portion is that memory is generously better then fixed siAe partitions, since portion are created according to the siAe of process. Pa in < - paging is a memory management techni6ue that permits a programs memory to be non-contiguous into physical memory thus allowing a program to be allocated physical memory wherever it is possible. &hen programmer wants to transfer data from one memory to another, he might write for example< more 12 /NNN. 9asically the physical memory is conceptually divided into a no. of fixed siAe slots called page forms. The virtual address space of a process is also split into fixed siAe blocks of the same siAe called pages. %ifferent page forms allocated to a single process need not occupy contiguous area of physical memory. Se "entati(n< - segmentation is a memory management scheme which supports programmer;s view of memory. 4rogrammers never think of their programs as linear array of words. 1ather, they think of their program as a collection of logically entities such as subroutines or procedures, function global or logical data areas, stack etc. $egments are formed at program translation time by grouping together logically related entities. ,ormation of these segments ray from one compiler to another. ( 4ascal compiler might create separate segments for 2! code of each procedure /! Elobal data @! local data or variable C! stack In segmented systems, components belonging to a single segment reside in on contiguous area but different segments belonging to the same process occupy non contiguous are of physical memory because each segment is individually relocated. 5irtual memory management policies<the collection of only the part of a program of certain policies into the virtual memory management scheme. 2! (llocation policy< - how much real memory to allocate to each active process. ii! 1eplacement swap-out! policy< - if there is no. $pace for a new page in physical memory, which page is to be selected for swapping out to secondary memory in order to mark room for a new page.

5.FI3E MANAGEMENT 0ogically related data items on the secondary storage are usually organiAation into named collection called files. )ser can rely on a single, uniform set of file-manipulation system services for both file and I.O device management. Thus sometimes referred to as deviceindependent I/O. The common responsibility of the file management system includes the following<- #apping of access re6uest from logical to physical file address space. Transmission of the file element between main and secondary storage .

raj

2@

#anagement of the secondary storage, such as keeping track of the status allocation, and deletion of space. $upport for protection and sharing of file and the recovery and possible restoration of file after system crash.

,ile of a computer installation can be stored on a number of physical devices, such as disk drive, magnetic tapes, or semiconductor memory. C(""an, 6 $an %a e %se4s 7ie' (. .i$e s!ste" (ccording to the method of invocated of the service, users of file may be broadly divided into two categories< I. ?ommand Mlanguage user II. $ystem programmers The formal category includes user who invoke file management service by means of the operating system command language. In most system, such user can 0I$T content of a file directory ?O4T file between volumes or devices ?1"(T", %"0"T", and 1"*(#" file. ,ile creation may be done by invoking the text editor, which in turn Mtime ?1"(T"U,I0" service to pass on the user;s re6uest to the file Mmanagement system. ,ile directory in computer in computer system usually belong to one of two categories< single level or hierarchical. ( single level directory, often called a flag directory, contens all file in the system or on a given volume .these problem can be alleviated by using hierarchical directories. In a hierarchical directory system, user can group the related file into subdirectories. (ll system file are then cataloged in a hierarchy of directories whose structure is similar to that of a rooted tree. (ccess to files in a hierarchical system in principle re6uires user to indicate all directories that must be searched in order to locate a given entry. $uch a specification is often called an access path or a path name. E,it rep(rt

raj

2C

1oot

>ones

$mith

*ew work

kmos

(s perceived by users , advantage of hierarchical directory include < ,acilitated uni6ue naming of files $upport for select for select for selective sharing and protection ?onvenient directory manipulation. Dis& /(ntr($$er an, ,ri7er Disk are electromechanical device, they are capable of carrying out only rather primitive command. ?ontroller is usually capable of handling several drives with similar characteristics. ( few control lines are needed to select the drive designate to participate in a given operation .these are indicate as %1I5" $"0"?T line in shown in the figure.

raj

2D

,is&

%rive select 3ead select %irection in.out ! $tep 1ead &rite %ata out %ata in 1eset faultclear TrackNN Index ready ,aulty 5olume miscellaneous

/(ntr($$er 8,ri7e sin $e The primary functions of a basic disk controller are to<2! ?onvert higher level command, such as seek or read a sector ,into se6uence of properly timed drive Mspecific command . /! 4rovide serial to parral conversion and single condition necessary to convert from byte or word format, re6uired for %#( communication with main memory. Into the analog bit serial stream expected and produced by disk drives. @! 4erform error checking and control ( typical disk driver basically allows reading and writing of disk sector specified by means of the three component physical disk addresses of the form< <Cylinder number, head number, sector number> $ome implementation re6uires 1"(% and &1IT" re6uest to be preceded by head position $""V command. $ome disk drive and controller are capable of transferring multiple sector or even track, in response to a single command. (n advantage of this mode of operation is that head are positioned once, so that the overhead of average access time may be amortiAed over many sectors.

raj

2F

OPER !I"# $%$!E&'$ (IE) O* *I+E & " #E&E"! The file system must support the user;s abstraction at the outer layer and convert it into the command understood by the disk driver at the inner layer. ,rom the range of service provided to user and the description of disk organiAation ,it follows that the basic function of the file system include<2. Veeping track of all file in the system. /. control sharing and enforcing of file protection @. #anagement of disk spaceB allocation and deallocation. C. #apping of logical file addresses to physical disk addresses. The file system keeps track of file by means of directory. ,ile protection re6uires separation of distinct files. %ynamic changes in both number and siAe of file necessitate fre6uent allocation and deallocation of disk space. The file system usually keeps track of unused disk space by means of a pool of free blocks. &hile the detail may vary the following three level of device abstraction and disk storage addressing are commonly identification in implementations of the file management system< 2. ile relative logical addressing< - at the highest level of abstraction, the storage system is viewed as a collection of namedfilemost application and file related system calls use this form of addressing. /. !olume relative logical addressing<- many disk driver provide an abstraction of disk as a linear array of sectors. $mall computer system interface scsi! device provide this form of disk abstraction directly by means of hardware controller integrated in the drive themselves. @. drive relative physical addressing<- this level user the three component physical addresses of the form Wcylinder ,head ,sectorQ. DI$, C C-E$ "D ."I/ 0.**ER C C-E %isk access time, and conse6uently the speed of many operations of the file system that depend on it, may be caching certain disk blocks in memory. This is similar to a memory cache. In )*I+, cached disks blocks are managed more recently by software vendors for personal computers, where it was initially implemented as an add or utility. ( disk cache operates by maintaining a pool of recently used disk blocks is main memory. The re6uest result in a cache hit , and it is satisfied from memory. If the re6uested disk block is not in the cache, a disk-cache miss occurs, and the re6uest is satisfied by accessing the disk. %isk caching may be applied to both reads and writes. $ome disk caches retain only blocks that are read, and direct all writes to the disk. This approach is known as write-through caching" It is generally less efficient than read.write caching. 9ut not necessarily by a wide margin, since a large majority of disk accesses are generally believe to be reads. The buffer caches are a pool of blocks used to store a collection of recently used disk blocks. The siAe of the buffer cache is typically determined during system configuration. &hen a running process re6uest a disk block, the operating system translate the re6esr into the device and block number and applied the hash function to those in order to search the buffer cache. The ensuring hash search may yield one of the following finding<2. The target block is on the free list. /. The target block is in the buffer cache but is not free. @. The target block is not in the buffer cache. (dvantage of disk caching include< Improved effective disk access time by satisfying re6uests for the cache block from memory.

raj

2I

Improve response time to application for cached block on read and optionally, on delayed writes where the i.o re6uestor is not forced to wait for the completion of a disk write. #educe server and networking loading with client disk caching in distributed system.

Implement of the 9erkley variety of )*I+ claim elimination of JDX of disk accesses. The primary disadvantage of disk caching is the potential corruption of the file system due to loss of power or to system crashes if delayed write are allowed. 4oorly implemented or parameteriAed disk caching systems were also found to under perform nonrated under certain condition. ( E"*"1(0IY(TIO* O, ,I0" $"15I?"$ %evice independent I.O provides both an ease of use and flexibility not attainable by most other approach. %evice independent is essentially a form of delayed binding of user programs to i.o device. )ser programs are coded and prepared using an abstract of device, such as files, logical I.O port, or logical unit number. #uch different type of I.O devices it is customary to regard all devices as files in the sense of having a name and allowing bytes to be read from or written into them. ( major division between byte-serial and block-structure devices is usually made. $ome systems refer to these as unstructured and structured I.O respectively. The formal class includes device capable only of byte-serial transfer, such as printers and terminals. (lthough creations and deletions are customary for file, devices are usually regarded as permanent object created at system startup time. %epending on the type of device exclusive or share access may be granted to re6uestor. This uniformity of treatment allows user to handle both file and device by means of a single set of system calls. (dvantage of device independence is that it facility the portability of object code between system with different hardware configuration. %evice specification can be changed without reprogramming. $ome system uses an interposes communication mechanism call pipe. &hich is similar to messages but ncan be programmed using the standard set of file and I.O services. ( pipe is a virtual communication channel that can be used to connect two processes wishing to exchange a stem of data. The two processes communication via a pipe can be written into at one end and read from at the other. Implicit synchroniAation between the processes communicating via a pipe. The differences are that the pipe facility does not re6uire explicit synchroniAation between communicating it is handled at the system call level in exactly the same way as file and device independent i.o. ( pipe can be created or accessed if it already exists, by means of an O4"* call. ( writer process normally produces streams of data that it writes into the pipe. ( reader process consume data

)*I+ O4"1(TI*E $T$T"# Intr(,%/ti(n< - )*I+ is popular multi-user time-sharing operating system primarily intended for program development and document preparation environments. It is written in a high level language, ?. 5ersions of )*I+ are available for personal computers, micro-processor based systems, mini-and super minicomputers, and large mainframes and super computers. The first version of )*I+ was written by Ven Thompson, later joined by %ennis 1itchie, at 9ell 0abs in the late sixties. It was a single-user system for the 4%4-I computer written in assembly language. (fter a major rewriting in ? and porting to the 4%4-22 family of computers, )*I+ was made available to users outside of (TZT. )*I+ is now commercially available from (TZT, together with numerous variants of the system provided by the other vendors. $everal specified versions of )*I+, such as the 4rogrammer;s &orkbench, )*I+.4&9, and &riter;s &orkbench, )*I+.&&9, are also available.

raj

2J

$ome of the major features of )*I+ are< 4ortability #ulti-user operation %evice independence Tools and tool-building utilities 3ierarchical file system Si$ent .eat%re (. UNI9 are<i! #ulti-user capability in this system the same computer resources like hard-disk, memory, printer, floppy disk drive ,%%!, optical disk are accessible to many user. There are lots of terminal connected to a main computer called 8-(st /("p%ter: (r :Ser7er;. (ll the terminals are called 8C$ients:. (ll terminals are connected to main computer whose resources are available by all users. $o users at any of the terminal can use not only the computer but also any peripheral that may be attached safe for instance printer. One can easily how economical such as setup is then having as many computers as then are users and also how much more convenient when some data is to be shared by all. (t the heart of )*I+ installation is the host machine is known as 8C(ns($e8Ser7er:. The numbers of terminal that can be connected to the host machine dependent on the numbers of ports that are present in its controller card. ,or example part controller cards in host machine can support for terminal. There are several types of terminals<a! %umb terminals< ?onsists of keyboard and 5%) 5isual display unit! with no memory. It can never act independent machine. b! Terminal emulation< 3aving its on microprocessor memory and disk drive. 9y attaching this 4? to the host through capable and running software from this 4?. &e can emulate it to work as if it is a dump terminal. It can not be any processing own its. Its transmit its processing job to the host. The job software makes the 4? work like dump terminal is called terminal emulation. "x< 5T"1#, +T(00I?. c! %ial in terminal< It is connected through telephone line with host using modem called %ial in terminal. i! #ultitasking capabilities< It is capable of carry of more than one job at the same time it allows due to type in a program in its editor. &hile it;s simultaneously execute some other command you might have given easily, say to surd and copy a use file. ii! ?ommunication< )*I+ has extended provision for communicating with fellow user. The communication may be within the network of a single main computer or between two or more such computer networks. The user can be easily exchange mail, data, programs which such as networks. iii! $ecurity< )sing allows sharing of data but not indiscriminately. )*I+ has three inherent positions for processing data. The first is providing accessing password and login name to individual user in security that not anybody can come and have accesses to your work. (t the file level there are read, write, and execute permission to each file which decide who excess a particular file. 0astly there is file inscription this utility encodes yours file into an unreadable format even it some one succeed in opening it your secrete is safe. If you want to see the instants of incrusted file than you have to descript it.

raj

2'

4ortability< One of the main reasons for the universal popularity of )*I+ is that it can be parted to almost any computer system to minimum changed. Startin 'ith UNI9< - &hen we log into a )*I+ computer, the files we first see are located in our home directory. &e can always return to our home directory by using the command Q cd [. To print the name of our working directory we use Q pwd command. To see the list of our files at our hard disk we use Q ls command. Fi$e In UNI9 S!ste" )*I+ treats every thing as files. "ven a directory is treated as a file that contains entries for several other files. (ll devices, such as I.O devices, storage devices etc are all treated as file. There are three types of )*I+ files<i! Or,inar! Fi$es< - these files include the plain documents, program source code, program data, executable binary files and computer programs. "ach ordinary file has a filename, its siAe in bites, access permissions and an uni6ue number called inode number. (n inode is a data structure that contains information about a file such as file type, number of links a file has, file siAe, time when the file was last modified and the location of the file on the disk. ii! Spe/ia$ De7i/e Fi$es< - These files include physical devices on the system, such as hard disks, floppy disks, terminals, printers, system memory etc. iii! Dire/t(r! Fi$es< - These files are the files that contain the names and inode numbers of ordinary and.or directory files within it. Or ani<ati(n (. UNI9 Fi$es2 - The )*I+ file system is organiAed as hierarchy that starts with the root directory. The root is represented by a forward slash .!. )nder the root directory are several directories and the home directories shown in figure below<

d!

2. 8

+in< This

directory contains executable program files binary files!. /. 8,e7< - This directory contains the special device files. @. 8et/< - This directory contains all the system-wide configuration information as text files. C. 8$i+< - This directory contains the library files. 0ibrary files contains the reusable functions and routines for the programmer to use. D. 8t"p2 - This directory contains all the temporary files, which will eventually be deleted from the system. F. 8"nt2 - This is the directory where the storage devices other than hard disks floppy disks and disks! are mounted. This directory contains the sub-directories 8floppy: and 8cdrom:. &hen these devices are mounted, this directory shows the contents of the floppy disk and ?%-1O# respectively. I. 8%sr2 - This directory contains the home directories of the users, source text for the online manual pages, games and other directories. There is one home directory for each user. UNI9 /(""an, She$$ S-E33< - $hell is the integral pat of )*I+ system. It is responsible for accepting commands for the user, interpreting them and then passing on to Vernel for processing. Thus it is the command processor of the )*I+ operating system. $hell acts as an user interface. The three major type of $hell are<a! 9ourne $hell< - It is developed by $teve 9ourne. It is most popular shell properly that;s why it is bounded with every )*I+ system. b! Vorn $hell< - It is developed by %avid E. Vorn. It has many more capabilities and is more powerful and efficient than 9ourne $hell.

raj

/N

c! ? $hell< - This shell is a bit with those who are seriously into )*I+ programming. It was created by 9ill >oy. It has two advantages over the 9ourne shell. ,irstly it allows aliasing of commands that is you can decide what name you want to call a command by. This proves very useful when lengthy commands which are used time and again are removed by you. )*I+ users invoke commands by interacting with a command language interpreter called the She$$. In addition to interpreting user re6uests and invoking the corresponding system services, the shell is also a programming language suitable for construction of elaborate command files, called she$$ s/ripts. The shell is written as a user process, as opposed to being built into the kernel. &hen a user logs in, the system invokes a copy of the shell to handle interactions with the related user. (lthough the shell is the standard system interface, it is possible to invoke any each particular user. This allows dedicated interfaces developed for users of specialiAed applications, such as clerical workers using text processing facilities, to coexist with the shell and thus provide 6uite different views and working environment for different users of the same system. Feat%res (. She$$< - $ome important features and benefits of shell are<a! ?ommunication between user and )*I+ system takes place through the shell. b! $hell allows background processing of time-consuming and non-interactive tasks. c! ( fre6uently used se6uence of commands can be stored in a file called =$hell script;. The name of the file can then be used to execute the se6uence of commands, automatically. d! $hell includes features which allow it to act as a programming language. e! ( user can select a group file for processing with a single command. f! Input of one command can be taken from the output of another command or output of one command can be diverted to the input of file or printer, using the input output redirection operators Q,W, QQ!. 4ipes \! can be used to connect simple commands in order to perform complex functions. Pipes )C(nne/tin C(""an,s*< -The pipe \! operator is used to indicate to the shell to take input from another command or give output to another command. ,or this one method is to first list all the files using ls command and then manually count the number. (nother method is to save the output of ls into a file using W! and then count the number of lines in the file using wc-l command. This method, though it works, re6uires an intermediate file. The third and the best method is to connect the two commands, so that one can take input from the other. This is can be done using the pipe \! operator as follows< ] ls sales \ wc -l 3ere the output of ls has been passed directly to the input of wc. That is, ls is said to be piped to wc. She$$ Pr( ra""in < - It is also called $hell script. &hen to use $hell script.program<i! ?ustomiAing your work environment. ,or example M "very time you login it you want to see the current date, a welcome message and the list of users who have logged on. ii! (utomating your daily task. ,or example M Tou may went to back up all of your programs at an end of the day. iii! (utomatic repetitive task. ,or example M The repetitive task of compiling =?; program, linking it which some libraries and executing the executable coexist. iv! 4reforming same operation on any files. ,or example M Tou may want to replace a string my printf in all the =c; program present in the directory. R%$es .(r /reatin she$$ pr( ra"< i! Open a new file with uni6ue name and related too. ii! &rite the se6uence of instruction using set of )*I+ commands.

raj

/2

iii! (fter writing the instruction save the file and exit to the prompt shell. R%n She$$ pr( ra"< - &rite he file name and run like< .sh Wfile nameQ 5i simple ] .sh simple ?ommands<i! read<purpose< - To accept value from standard device keyword!. $yntax< read var2 var/^^^^. "xample< read a b ii! echo<4urpose< - To display the contents on console. $yntax< echo 8string: The S!ste" =erne$

input

The Vernel is at the core of )*I+ system. This is loaded into the main memory as soon as the system starts up. It manages memory, files and peripherals devices. It also maintains date and time, launches applications and allocates system resources. The different functions performed by the kernel are< a! #anaging memory, namely allocating and deallocating memory area including address space to each process. b! $cheduling, enabling each user to work efficiently. c! OrganiAing data transfer between I.O devices and memory. d! (ccepting instructions from the shell and carrying them out. e! "nforcing security measures. Vernel provides the basic full-time software connection to the hardware. The structure of kernel is shown in the figure. The kernel handles memory management, input and output re6uests, process scheduling etc. To help it with its work, the kernel also executes daemon programs which stay alive as long as the machine is switched on and help perform tasks such as printing or serving web documents. The kernel, thus controls and provides access to memory, processor, input.output devices, disk files and provides special services to user programs. The basic )*I+ kernel can be broken into four main subsystems< a! process #anagement b! #emory #anagement c! I.O #anagement d! ,ile #anagement >I - EDITOR E,it(r< It is a program that provides facility to read.write.modify.manipulation of data.document.text etc. is known as "ditor. "x- "%IT in %O$, 5I-"%ITO1 )*I+! etc.

raj

//

There are two types of editor< 2! %ocument editor and /! *on-document editor it doesn;t allow any formatting like in %O$! UNI9 EDITOR< There are three editor available in )*I+ i.e. "%, "+ and 5I. The "%-editor is the original program editor that has been a part of )*I+ since very beginning. It is basically line editor which means "% assigns line no. to lines of the files. It is just like "%IT of %O$. "very time if we done something we must tell it to the "%-editor which function ate it line by line. (n improved version of "% is called "+-editor. It is using friendlier and also understood all the command of the "%-editor. ?ompare to "% and "+ both types of editor a new editor is now introduced which is fastest editor of world, known as 5I-editor. >I-EDITOR< It is a full screen editor allows the user to view and edit the entire document at the same time. Thus creating and editing of file become easier and that is the reason it become an intent heat with the programs. )nder this editor all the commands are under control of finger trips. %isadvantage of 5I-editor< i! The user is always kept guessing. There are no self explanatory error messages. If any thing goes round, only speakers keep to inform that something gets wrong. ii! There are not any online help in 5I-editor. iii! There are three modes in which editor works. )nder each mode same keys pressed to create different effect. 3ence each mode should be memoriAed. iv! 5I-editor is functionally case-sensitive editor. #ode of operation< i! ?ommand #ode< - In this mode all the keys press by the user are interpreted to be editor command. "xample< - Of hit =h; the cursor is move one position to left. In command mode the keys are hit are not display on he screen.

raj

/@

Insert mode< - This mode permits insertion of new editing or existing text or replacement existing text. "ach of these operations can be performed only after changing over from the command mode to insertion mode using appropriate command. The insertion mode is also known as Input text mode. iii! "x- ?ommand mode< - This mode permits us to give command at the command line. The button line of the 5I-screen is called the command line. 5I-)ser the command line to display message and commands. (ll command enter in the "+-command mode are display in command line. This mode is show cause the command given in this mode is comfortable for the commands of "+-editor. P%rp(se2 To create file.edit files.modify files. S!nta?2 5I Wfile nameQ 2! ?ommand for positioning the cursor< C(""an, F%n/ti(n h #oves the cursor one character to the left. 9ackspace #oves the cursor one character to the left. K #oves the cursor one character to the right. $pacebar #oves the cursor one character to the right. ] #oves the cursor to end of current line. N #oves the cursor to the beginning of current line. /! 4ositioning by line< C(""an, F%n/ti(n > #oves the cursor down the line from the current position in the same column. V #oves the cursor up one line from its present position in the same column. O #oves the cursor down to the beginning of the next line. #oves the cursor up to the end of the current line. @! 4ositioning the cursor by word< C(""an, F%n/ti(n & #oves the cursor to the right, to the first character of the next line. 9 #oves the cursor back to the first character of the previous word. e #oves the cursor to the end of the current word. C! 4ositioning in the window< C(""an, F%n/ti(n 3 #oves the cursor to the first line on the screen. home! # #oves the cursor to the middle line to the screen. 0 #oves the cursor to the last line on the screen. D! 4ositioning in the file< i! $crolling< C(""an, F%n/ti(n _Of $crolls the screen forward a full screen.window. _Ob $crolls the screen backward a full screen.window. ii! 4ositioning in the numbered line< C(""an, F%n/ti(n E #oves the cursor to the beginning of the last line in the file. nE #oves the cursor to the beginning of the nth line in the file. F! ?ommand for inserting text< C(""an, F%n/ti(n

ii!

raj

/C

a i ( I o O

Inter text input mode and appends text after the cursor. Inter text input mode and insert text at the cursor position. Inters text input mode and append text at the end of current line. Inter text input mode and insert text at the beginning of current line. Inter text input mode by opening a new line and below the current line. Inter text input mode by opening a new line immediately above the current line. 1 Inter text input mode and overwrites from current cursor position. I! ?ommand mode for deleting text< C(""an, F%n/ti(n x %eletes the character at the current cursor position. + %eletes the character to the left of the cursor. dw %eletes the word from the cursor to the next space. dd %eletes the current line. nx,ndw,ndd %elete n character, n word, n line respectively. dN %eletes the current line from the cursor to the beginning of the line. ] %eletes the current line form the cursor to the end of the line. J! ?ommand for writing in 5I-"ditor< C(""an, F%n/ti(n AA &rites the buffer to the files and 6uit 5I.R$ave and exitS <wd &rite the buffer to the file and 6uit 5I. <wWfilenameQ &rite the buffer to the file new file! and 6uit 5I. <6 &rite the buffer to the file new file! and 6uit 5I. <w`WfilenameQ Overwrites the existing file new file! and 6uit 5I. <6` auit 5I whether or not changes mode to the buffer where written to the file. C("pi$in a @C4 Pr( ra" )//* ? is the programming language that is most fre6uently associated with )*I+. In fact, bulk of the operating system and applications are written in ? only. The development of a ? program involves the following steps< a! &rite the code in a text file, using an editor b! ?ompile the program c! "xecute the program d! %ebug the program #any )*I+ tools are involved in the above process. The following is a simple =?; program that prints the message 8( $imple 4rogram:< b includeWstdio.hQ #ain ! R 4rintf 8( $imple ? 4rogram:!B 1eturn NB S 0et us nam the file as mess.c. This program can be compiled and executed as follows< ] cc mess.c ] a.out The output is shown in the figure<The program is compiled with the cc command, which creates a file a.out, if the programming code is correct. >ust typing a.out will run the program. To get your program into a file other than a.out, you can do either of the following two things<

raj

/D

a! rename a.out into any other filename you want. b! )se Mo option with the cc command. ,or example, the following command runs the ? compiler and places the executable code in a file called output< A // 6( (%tp%t "ess./ *ow to run this program, you have to just give the filename output, as follows A (%tp%t

] ] vi mess.c ] cc mess.c ] ..a .out ] $imple ? 4rogram ] ] cc Mo output mess.c ] ..output ] $imple ? 4rogram ] ] cc Mc main.c ] cc Mc rect.c ] cc Mc circle.c tri.c ] ] cc Mo output main.o rect.o circle.o tri.o ] ..output

This program calculates the area of the following shapes 2< /< @< 1ectangle ?ircle Triangle

$elect your choice<

Case st%,! &indows belongs to the category of software called a E)I Eraphical )ser Interface!. The user interface determines how you interact with your computer. The hardware part of the interface consists of your screen monitor, the keyboard and the mouse. The software part of the interface determines what things look like on the screen and how you give commands to your therefore was 6uite cumbersome. &ith the advent o &indows environment many of every day computer tasks - such as running programs, opening files, choosing commands etc. are done using a graphical approach that is very intuitive to new users o computers. ,urther, &indows programs use the same command structure and graphical items on the screen, so if have mastered one &indows program, learning others becomes very easy. (t the primary stage &indows was developed as a Operating "nvironmentB a add on %O$ when it had version @.2 or @.22. 9ut later it developed as a Operating $ystem. &indows-'D, 'J or later versions of &indows is self Operating $ystem.

raj

/F

&hen we switch on our 4?, &indows 'D or 'J-s logo appears on the screen and after some time it become ready to accept our instruction. &indows 'J offers three views and you can work in any of these three views. These are< 1. C$assi/ >ie' - This is default view in which to select an icon or file, you have to click the object once and to run a program or open a file you have to double-click the icon or filename. 1. We+ St!$e >ie' - This view is looks like a web page. To select an icon or a file you have to position the mouse pointer on the object. To run a program or open a file, you have to click the icon or file name once. 5. C%st(" >ie' - This view gives you the flexibility to control the appearance as per your convenience and the ease of working. WINDOWS TERMINO3OGY Ch((se < "xecutes a command. Se$e/t < $elects an item to activate it so that it can be changed. $electing a command or option turns it on but does not complete it. $elected Text or menu names.items appear in reverse type or a different colour. $elected options show a dot .! or an x!. (lso the selected graphics appear enclosed by a dashed line or enclosed in boxes known as handles. P(int < #ove the mouse so that the arrow pointer is on the desired menu name, command name or graphic object. P(inter < 4ointer is the on-screen symbol controlled by the mouse. The pointer changes shape to indicate the current status and the type of functions and selections available. I-+ea" < &hen the mouse pointer is in a text area that you can edit, the pointer appears as a vertical I-beam. M(%se 0%tt(ns < #icrosoft mouse has two buttons and other makes may have three. ?licking the left button completes an action and clicking the right most button brings up the shortcut menu. $ometimes third button if available! works as double-click of left button. M(%se an, their A/ti(ns The mouse is a very convenient hand-held pointing device which is used to control the position of the on-screen pointer. (s you move the mouse on your desk or mouse pad, the pointer moves on the screen corresponding to the mouse movement. )sing the mouse, you can select menus, commands, text, graphic objects or windows. The #ain actions of mouse are as follows <C$i/& - 4ress and release the left mouse button 6uickly as you point to an item. ?licking is used to reposition the insertion point in text, select a menu, choose a command from a menu, or select an option from a dialog box. D(%+$e-/$i/& - (s you point to the pointed item on the screen, press and release the left mouse button twice 6uickly. 9y double-clicking an icon or file name, you can open an application or window related to that icon or filename. Ri ht /$i/& - 4osition the tip of the mouse pointer in the desired location on a document or toolbar and then click the right mouse button. Dra in - %ragging is moving objects on the monitor-s screen. To do so first position the mouse pointer on the object. *ext, you 74ick up7 the object by pressing and holding down the left mouse button. &hile you are still holding down the mouse button, move the mouse pointer to where you want to 7%rop7 the object, and then release the moue button. E3EMENTS OF WINDOWS SCREEN The opening screen of &indows 'D.'J has following elements< 1. The Des&t(p - The %esktop is your work area while working in &indows. It is called %esktop because &indows uses your whole screen in a way that is similar to the way you use the top of a desk. 1. I/(ns an, their t!pes - (n icon is a graphic object that represents something on our computer screen. It has three types as follows <-

raj

/I

$ystem Icon - $ystem icons are displayed along left edge of the screen. These objects are created automatically by &indows 'J during its installation. (mong them following five are generally shows <&y Computer This icon lets you browse through the resources connected to your computer. &y Documents This icon represents a folder that is used by many programs as a default location for starting the documents. Internet E1plorer This icon starts a &eb 9rowser named Internet "xplorer. "etwor2 "eighborhood This icon shows the names of each server or computer in your own work group. Recycle 0in This icon provides temporary storage for files and folders that you delete. $hortcut Icons - ( shortcut provides easy access to some objects on your system, such as program, a document or a printer etc. The shortcut icon only contains information about the location o the object but not the object itself. Thus deleting a shortcut does not delete the program from the hard disk for that shortcut. These are the icons with small arrows in the lower left corner. Program, *older and Document Icons - These are non-system icon without arrows and represent the actual objects they describe. Thus if you delete such an icon you are deleting the object itself, from the hard disk. 5. The Tas&+ar - It situated at the bottom of the screen and it has generally following four parts <$tart 0uttons It is located at the left end of the taskbar. It invokes $tart menu, the Eateway of &indows. !oolbars Toolbars represent a set of related icons for easy mouse access. !as2 0uttons Task buttons are displayed in the ?entre portion of the Taskbar. ( button (ppears for each program you have started or each document you have Opened. "otification rea - The right corner of the Taskbar has the notification area in which &indows provides information about the status of your system including ?lock. T!pes (. Win,('s There are three types of &indows <1. App$i/ati(n Win,(' 2 It contains executing &indows programs, and are siAed, moved, opened and closed on the desktop. 1. D(/%"ent Win,('2 an application window generates %ocument windows. ( document window cannot be siAed or moved outside the confines of its parent application window. 5. F($,er Win,('s 2 Opening #y computer, or any of the folder you move to the desktop produces a folder window. E$e"ents (. a Win,(' 0(r,ers - The four edges that define the perimeter of a window are called borders. 9orders also provide a way to change the siAe of the window. Tit$e 0ar - This bar shows the name of the open application, sometimes with open document name. It has generally three more buttons at the right side of it, i.e. a* Mini"i<e 0%tt(n - &hen we click on it, the application become minimiAe, i.e. a button appears in the taskbar and the screen become blank, or another window appears in front.

raj

/J

+* Ma?i"i<e 0%tt(n - (fter clicking on it the window spreads full of the screen. (fter maximiAing the window, the maximiAe button converts into 1estore button. &hen we click on it, the window comes back to its original siAe. /* C$(se 0%tt(n - If we click on it, the window, either application or document, will be close. C(ntr($ 0(? - It is a small icon located on the left side of the Title 9ar. &hen we click on it, ?ontrol #enu appears with so many options. S/r($$ 0arsB S/r($$ 0(?es an, S/r($$ 0%tt(ns - If a window is not long enough to display its contents completely, vertical scroll bar appears along the right edge. If the window is not wide enough, a horiAontal scroll bars appears along the bottom of the window. $croll 9ars have some rectangular boxes called $croll 9ox. $iAe of $croll box is become proportional of the siAe of the whole file and displayed content on the screen. $croll buttons appear along the top and bottom edges of the vertical scroll bar and along the left and right edges of the horiAontal scroll bar. The Men% 0ar - The row of words just below the Title bar constitute the #enu bar. "ach word in the #enu bar represents a menu, which opens up when you click it. Eenerally it comes with an application window, not with a document window. T(($+ar - It consists generally below of the #enu bar. ( toolbar has so many small buttons who represents a command. W(r& Area - This is working area of the application. %epend upon the program it may be a drawing area, a typing area etc. START &hen we click on this button we get following options <Sh%t D('n This option is used to turn off the computer smoothly. &hile we work in &indows-'x or later, &indows automatically opens so many temporary files in background. If it will mot turn off through this option, then it is possible that some error may be appear in 3arddisk. 3ere we get three options generally - Sh%t D('n to turn off the computer, Restart to warm boot and Restart in MS-DOS "(,e to start the system in %O$ mode, so we can work further in %O$ environment. R%n This option is used to run any program by simply typing its command line. &e can also search 4rogram through 9rowse button. -e$p This option provides help about &indows. Fin, This option is used to find any file or folder among different disks on our computer or on network. &e can search any file or folder by its name, text containing by it, its siAe etc. Settin s This options is used to configure the hardware of the computer system, taskbar etc. The C(ntr($ Pane$ - $elect it from $tart-Q$ettings-Q?ontrol 4anel. This option is used to configure the system. 3ere we get lot of icons. ,rom them someone are <A//essi+i$it! Opti(ns - The (ccessibility 4roperties dialog box lets you configure &indows keyboard, sound, display, and mouse and other options for people with disabilities. This icon appears only if you installed (ccessibility options when you installed &indows. A,, Ne' -ar,'are - This &iAard configures &indows when you add new hardware to your computer system.

raj

/'

A,,8Re"(7e Pr( ra"s - This 4rogram-s dialog box helps us to install new programs or uninstall programs, which was already installed and no longer use. Date C Ti"e - This option provides two tabs - ,irst one is %ate Z Time and second is Time Yone. %ate Z Time option is used to change the current date and time, and Time Aone is used to select the place from world map from where user work. Disp$a! - The display 4roperties dialog box controls the appearance, resolution, screen saver and other settings for your display monitor. 2. 0a/& r(%n, - )sed to set the wallpaper and patterns. /. S/reensa7er - )sed to set the screen saver. $creen saver is a memory resident program who automatically becomes active if we will not touch the keyboard or mouse for some time. &e can also change this time from here. @. Appearan/e - This option is used to set the color of active title, inactive title, menu, window etc. C. Settin - This option is used to configure the hardware of the system. D. E..e/ts - This option is used to apply extra effects on icons, menus etc. F. We+ - This option is used to set the %esktop settings, i.e. whether the desktop will be shown as web page or normal. F(nts - &hen we click on it, a window will appear in which we can see name of all the fonts installed in our computer. &e can see detail of any font by simply doubleclicking on it. To install more fonts ?hoose (dd *ew ,onts options from ,ile #enu. Then give the path for fonts name. &indows will automatically install it. Ga"e C(ntr($$ers - This dialog box lets you install games. Internet - This dialog box contains settings for your web browser and Internet connection. =e!+(ar, - This dialog box contains settings that control your keyboard and the cursor. M(%se - This dialog box lets you define the buttons on your mouse. It lets you choose how fast you need to double click, what your mouse pointer looks like onscreen, and whether moving the mouse leaves a trial. M%$ti"e,ia - This dialog box contains settings for the audio, video, #I%I, and audio ?% settings of your computer. Net'(r& - The network dialog box contains settings, you use when configuring a local area network. It also contains settings for connecting to the Internet. Pass'(r,s - This dialog box lets you set a password for using &indows on your computer, user profiles if more than one person will use the computer, and other security settings.

raj

@N

P('er Mana e"ent - This dialog box contains controls to be set when &indows 'J automatically turns off your monitor, hard disks, and other computer components to save electricity. Printer - This icon is used to open the 4rinter window from where we can (dd, 1emove or configure the printer. Re i(na$ Settin s - It lets you tell &indows 'J the time Aone, currency, number format, and date format you prefer to use. S(%n,s - It lets you assign a sound to each &indows event, or events in other programs. ,or example, you can set your computer to play a fanfare when your email program receives new messages. S!ste" - It lets you use the %evice manager to change advanced settings for each hardware component of your computer. Tou can also optimiAe the performance of your computer. Te$eph(n! - The %ialing 4roperties dialog box contains settings that control how &indows 'J dials the phone using your modem. Users - The "nable #ulti-user $ettings &iAard helps you set up user names and passwords so your computer can be used by more than one person. "ach person-s user name can store that person-s desktop settings. Printer- this option is used to open the 4rinter window from where we can (dd, 1emove or configure the printer. Tas&+ar C Start"en% - This option is used to set the taskbar options, i.e. autohide, show clock, small icons in windows and also items which will be included or excluded in $tart #enu or its $ub-menus. F($,er Opti(ns - This options is used to set the options about folders, i.e. which types of filenames should be shown in different folder window or in explorer. A/ti7e Des&t(p - This option is used to set the %esktop settings, i.e. whether the desktop will be shown as web page or normal. D(/%"ents Pr( ra"s This option contains last used document-s list, so user can open it again 6uickly from here. This is the gateway to start any program in windows. There is lot of group or application icons can access through this option.

Win,('s A//ess(ries< &e can choose $tart -Q 4rograms -Q (ccessories to work on elements of accessories. 1. Entertain"ent2 &e can choose (ccessories-QIntertainmentcto entertain ourselves. ,rom the #ultimedia we can hear song by ?% 4layer or see movies through #edia 4layer. The coming screen will show same button to do it as its physical device, i.e. ?% player or a 5?% player.

raj

@2

1. 5.

Ga"es2 &hen we slide our mouse at (ccessories-QEames then we get four games, i.e. $olitaire, #ine- sweeper, 3eart and ,ree-cell. S!ste" T(($s2 There are two types of system tools a* S/an,is& - )sed to check and repair the error of the disks. +* Dis& De.ra "enter - This option is used to defrag the disk. %efrag reorganiAes the files on a disk to optimiAe disk performance. %ue to it the speed of the programs increase. /* 0a/&%p - This option is used to take backup of selected file to destination drive. &e can also restore files trough 1"$TO1" tab. ,* Dis& C$ean%p - Through this utility we can instruct &indows to automatically clears not re6uired files from our 3arddisk, i.e. files of 1ecycle 9in, Temp %irectory-s file, temporary internet files etc. e* Chara/ter Map2 This program allows us to see the ($?II chart of a selected font. This is very useful while we will work on a font, other than "nglish or a $ymbol font. .* C("pressi(n A ent - This utility recompresses your files on disk. * Dri7e C(n7erter )FAT 51* - ?onverts the ,(T! file (llocation table of our 3arddisk to @/ bit, it is 2F bit and thus releases extra disk space. h* Dri7e Spa/e5 - ?ompresses and creates a new drive resident on existing drive. i* Maintenan/e Wi<ar, - 1uns certain set of programs to keep our computer running in optimum condition. It runs generally $candisk, defrag and ?ompression program. D* S/he,%$e, Tas&s - (llows scheduling of tasks at predetermined times, i.e. when the &indows should run scandisk, defrag etc. automatically - weekly, monthly or any other schedule. &* S!ste" In.(r"ati(n - %isplays information about what is loaded and configured on your system.

E.

Ca$/%$at(r 2 &hen we click on it, a calculator will be open where we can do any type of sum. The Stan,ar, Ca$/%$at(r can be used to add, subtract, multiply, divide, take s6uare root, calculate percentage etc. The S/ienti.i/ Ca$/%$at(r is considerably larger, more powerful and it has many functions related to engineering, science etc. that can be used depending on our needs. O (ddition $ubtraction P #ultiplication . %ivision FCa$en,ar2 This option shows the calendar of a month or a particular day. &e can also change the month or year to see their calendar through choosing the %ate option from $how #enu. )ser can also write their appointment within it when they are in %ay 5iew 5iew-%ay!. &e can also set alarm through the option (larm-$et. Car,.i$e2 Tou can use &indows ?ardfile to organiAe and manage information, such as names, addresses, and phone numbers. A,,in M(re Car,s ?ardfile adds new cards in the correct alphabetic order and scrolls to display the new card at the front. To add a new card to a file 2 ,rom the ?ard menu, choose (dd. / Type the text you want to appear on the index line. @ ?hoose the OV button.

G.

raj

@/

C In the information area type text. To %elete the card select ?ard-%elete and to make a little changes in a card choose ?ard%uplicate option. &e can also (uto%ial if our system is connected with phone with modem through ?ard-(uto%ial. H. I"a in 2 $canners, %igital ?ameras, ?lip (rt ?%s and the Internet give computer users access to countless images, &hich you can print, insert into your documents. The impact of a picture can be improved by the addition of a few words, some highlighting and drawing lines. Imaging for &indows is a tool for this. N(tepa,2 This program allows us to simply type anything in the text mode as in "dit. ,ile - *ew, Open, $ave, $ave as, 4age $etup, and print and "xit. "dit - )ndo, ?ut, ?opy, 4aste, %elete, $elect (ll, Time.%ate, &ord &rap. $earch - ,ind, ,ind *ext ,@! ( very useful feature of *otepad is that it can automatically place a timeand-date stamp in a document as and when it is opened. To do so move the insertion points to the left margin of the first line in the *otepad and in capital letter type 7.0OE7. $ave the file and reopen the file and type the re6uired notes. $ave and close it again and once again reopen it. &e can see that how many times we reopen this file, we get automatic time and date at the bottom of the earlier notes. W(r,pa,2 This is a $imple editor used to create, edit or print a document. It is more powerful than *otepad and support format of &ord F.N, &rite as well as Text format. ,ile - *ew, Open, $ave, $ave as, 4age $etup, 4rint, 4rint 4review "dit - )ndo, ?ut, ?opy, 4aste, 4aste $pecial, ?lear, $elect (ll, ,ind, ,ind *ext, 1eplace, 0inks, Object 4roperties, and Object. 5iew - Toolbar, ,ormat 9ar, 1uler, $tatus 9ar, Options-$hows options to ?onfigure the &ordpad i.e. options about measurement system and name of items appear during different mode. Insert - %ate and Time, Object ,ormat - ,ont, 9ullet $tyle, 4aragraph, and Tab. Tou can move in &ord4ad document using the mouse or the keyboard. $ome of them are following< &ith ?ursor Vey - #ove one line up, down or one ?haracter left or right. &ith ?T10 O ?ursor Vey - #ove beg. Of paragraph, end of paragraph, one word left or right. &ith 4gdn.4gup - %own one windowful.)p one windowful &ith ?T10 O 4gdn.4gup - To the "nd.9eginning of the last.first line the current window. &ith 3ome."nd - ,irst.0ast character in the current line. &ith ?T10 O 3ome."nd - 9eginning."nd of the document. &ith #ouse - ?lick and %rag in the direction want to select. ?lick in left margin- $elect a single line %ouble click in 0eft margin - $elect a paragraph Triple ?lick in left margin or ?T10O click in left margin - $elect whole document. 1K. Paint2 This is a simple %rawing program, used to create, save, modify and print a graphics image. This program is useful for creating pictures, icons etc. &hen we select this program from (ccessories, than an (pplication &indow come. The 4aint screen can be divided into three parts< -

I.

J.

raj

@@

a! T(($+(?2 - It contains symbols representing drawing actions the cursor can perform. b! Pa$ette< - It contains a grid showing the various colors you can select and use. c! Dra'in Area< - This is the workspace where you create your 4aint drawings. T(($+(?2 There are following types of tools at the toolbox< a! ,reeform $elect b! $elect c! "raser d! ,ill with color e! 4ick ?olour f! #agnifier g! 4encil h! 9rush i! (ir 9rush j! Text k! 0ine l! ?urve m! 1ectangle n! 4olygon o! "llipse p! 1ounded 1ectangle C(""an,s (. Men%s -2 Fi$e - *ew, Open, $ave, $ave (s, 4rint 4review, 4age $etup, 4rint, $et as &allpaper Tiled!, $et as &allpaper ?entre!. E,it - )ndo, 1epeat, ?ut, ?opy, 4aste, ?lear $election, $elect (ll, ?opy To, 4aste ,rom. >ie' - Toolbox, ?olor 9ox, $tatus 9ar, Yoom, 5iew 9itmap, Text Toolbar. I"a e - ,lip.1otate, $tretch.$kew, Invert ?olours, (ttributes, ?lear Image, %raw Opa6ue Q. (ns. What is /$ip+(ar, an, h(' is it %se.%$ in WINDOWS +ase, app$i/ati(ns# The clipboard is a built in utility program that aids the process off copying information between different documents of the source application or between documents of different application. )sing clipboard, user can make a portion of text or graphics in one application window and then use it in another application window. The clipboard works with both text and graphics in &indows programs and only with text in the case of %O$ based programs. ?lipboard is a temporary main memory area on which we can 8?lip: the data re6uired to be transferred. To transfer information to the clipboard you cut or copy the information from the active window. &hen the information needs to be placed in an application you can past, link on embeds the information. The information transferred to the clipboard stays in the clipboard till it is deleted, replaced or the user exits from &indows. The cut, copy and paste approach is used while transferring information to another document using the clipboard. C%ttin M Involves removing the information form its source location and putting it on the clipboard. &hen the information is cut, it is deleted from its source windows. C(p!in M&hen the information is copied, the original is left intact and a duplicate copy of the original is placed on the clipboard. Pastin M Is the process o pasting whatever is on the clipboard into the destination document. &indows based application is generally written in coordination with other &indows based application. This is very different from the way of %O$ based applications work where each application has its different file formats and file conversions that ware re6uired to transfer data form one application to another. &ith windows coming in integrated documents can be prepared where say graphics are taken from paintbrush document, charts from "xcel documents and text from &ord document. It is here that clipboard comes in to play. The information from one application is first transferred to the clipboard and thus forms the clipboard to the destination document. Di..erentiate +et'een CUI an, GUI# 3ist the a,7anta es (. %sin GUI. The ?)I is an acronym for ?haracter )sing Interface or ?haracter )ser Interface. It is a type of display format used with most of the %O$ based application packages that enables a user to choose commands and see list of files and other option by pointing to

Q. (ns.

raj

@C

drop down menus using mouse or keyboard keys. The familiar example is the ?)I used with ,ox4ro package for %O$. E)I pronounced 8gooey:! is an acronym for Eraphical )ser Interface. It is a type of display format that enables the user to choose commands start programs, and see list of files and other options by pointing to pictorial representations icons! and lists of menu items on the screen. ?hoices can generally be activate either with the keyboard or with a mouse. E)I offers an environment of what you see what you get. ,or application developers, E)I offers an environment that takes care of the direct interaction with the computer. This frees the developer to concentrate on the application without getting bogged down in the details of screen display or mouse and keyboard input. (s the interface changes to support new input an output devices, such as a large-screen monitor or an optical storage device, the applications can also, without modification, use those devices. Q. -(' ,( !(% /han e the settin s (. the "(%se in WINDOWS# Is it p(ssi+$e t( s'ap the ri ht an, $e.t +%tt(ns (. the "(%se# (ns. To customiAe the mouse settings do the following< 2. ?lick $tart /. $elect $ettings @. Open ?ontrol 4anel by double clicking its icons. C. ,rom the ?ontrol 4anel double click the mouse icon. The mouse property box that appears offers the following customiAation features. a! 0%tt(n M This changes the function of the left and the right button. b! P(inters M ?reates a shadow of the mouse pointer;s movement on the screen. c! M(ti(ns M The speed at which the mouse pointer moves relative physical to the movement of the mouse. d! Genera$ M $elect the type of mouse used. Q. What is a /("p(%n, ,(/%"ent an, e?p$ain h(' it /an +e /reate,. (ns. ( compound document is a single document made up of parts created in more than oneapplication packages. ,or example, a report may contain a table created in "xcel, and a 0ogo created in a ?lipart package. &hile finaliAing the report in &ord for &indows, you can import table and the 0ogo from the different packages using ?lipboard facility available in &indows 'J. Tou can crate compound documents using the "dit menu-s 4aste $pecial option in the application package in which you are assembling the document. In the application from which you wish to link data, you select the data and place it on the clipboard using the standard ?ut or ?opy commands. &hen the data to be linked is on the clipboard, use the paste $pecial option from the "dit menu to insert the information at the insertion point and create the link. In the 4aste $pecial dialog box click on the 4aste 0ink option button and then click on OV to create the link. (fter the link has been created, the information will be updated into the receiving document whenever it is changed in the originating document. (s a result, you can build compound documents that assemble data from a variety of resource applications and stay continuously updated. In a compound document you do not have to manually move data form one application;s M the applications can now handle that for you. Q%es. What ,(es (ne "ean +! Cas/a,in WINDOWS an, Ti$in Win,('s# (ns. &indows offers two ways of arraigning the widows are open. These are< a! Cas/a,in M This causes all the open windows to be seiAed and staggered in such a way that the tittle bars and edge or corner of every window is visible. b! Ti$in M Tile causes all the windows to be siAed and lined up like tiles on a bathroom wall. Q%es. What is s/reen sa7er an, e?p$ain its %ti$it!#

raj

@D

(ns.

Q.

Q.

(ns. $creen saver when set O* will blank the monitor screen or display a moving image or pattern if the mouse or the keyboard is not used for a predetermined period of time. The use of screen saver is< a! $creen saver prevents damage to the screen by displaying a changing pattern. b! It also prevents the other viewers, from seeing what is on the screen when the user is not working. a. "xplain what do you understand by the term True Type of fonts. True type of font gets their name from the fact that their appearance on the screen is the same as the printer prints them. 4rior to the introduction true type fonts computer users needed separate screen fonts for display on the monitor and printer font, i.e. printing on the printer. This is because printers and monitors have very different resolution. &ith the introduction of True Type fonts, however, a single font outline fulfills both the roles. The True Type outline scales to any resolutions Mscreen resolution, dot matrix resolution, laser printer, or high 6uality type setting resolutions. True Type fonts therefore offer two major advantages over the other fonts. a! These fonts are scalable, so only one picture of each character is needed instead of an image for each character in each siAe. b! These fonts are independent, so only one version of the font must reside in the &indows. E?p$ain the ter" 0ITMAP. (ns. ( bitmap is the representation of an image by an array of bits. In a bitmap characters or images are generated by writing the bit pattern to be displayed into the associated storage, each bit of which is mapped to a pixel on the display surface. In general, a bitmap image is a data structure that describes a bit image being held in memory, such as its location in memory and its siAe. 0it- "appe, .(nt It is a set of characters in a particular siAe and style, in which each character is described as a uni6ue bit map pattern of dots!. 0it-"appe, raphi/s These are the graphics that are stored and held as collections of bits in memory locations corresponding to pixel on the screen. 9it- mapped graphics are typical of paint programs, which treat images as collections of dots rather than as shapes. &ithin a computer;s memory, a bit-mapped graphic is represented as an array group! of bits that describe the characteristics of the individual pixels making up the image. 9itmapped graphics displayed in colour re6uire several to #ay bits per pixel, each describing some aspect of the colour of a single spot on the screen What is ,i..eren/e +et'een N(tepa,B W(r,Pa, an, Mi/r(s(.t W(r,# W(r,Pa, It is 1ich Text format editor. %ata of this application can open only in compatible application. Eraphics $upport. 0arge file siAe. *o spelling and grammar check facility. W(r, $upport so many formats. %ata of this application can open only in compatible application. Eraphics $upport. 0arge file siAe. $pelling Z Erammar check facility.

N(tepa, It is a simple text editor. %ata written in it can open anywhere. *o support of Eraphics. $mall file siAe. *o spelling and grammar check facility.

raj

@F

MU3TIPROCESSING SYSTEMS &ultiprocessing system < ( mode of operation that provides for parallel processing by two or more processors of a multiprocessor. It can be used for speedup and for improving and throughput of computer systems. 4otential benefits of multiprocessing include increased performance and computing power, fault tolerance, flexibility and modular growth. One of the main design challenges of multiprocessor systems is to minimiAe interprocessor interactions and to provide an efficient mechanism for carrying them out when necessary. dvantages of &ultiprocessors < The main advantages of multiprocessors are < - 2!. 4erformance and computing powerB /!. ,ault toleranceB @!. ,lexibilityB C!. #odular growthB D!. ,unctional specialiAation Z F!. ?ost.performance. 2!. 4erformance and computing power< $ignificant speedup of an application may be possible by devoting multiple processors to it. 4roblems with higher or more fre6uent interprocessor interactions can be solved more 6uickly than in a distributed system because the interprocessor communication bandwidth is higher. /!. ,ault tolerance< The inherent redundancy in multiprocessors can be employed to increase availability and to eliminate single points of failure. @!. ,lexibility< ( multiprocessor system can be made to dynamically reconfigure and tailor itself so as to optimiAe different objectives for different application. C!.#odular growth< ( modular system design can be adapted to the needs of a specific installation by adding exactly the type of component most likely to alleviate a major bottleneck. D!. ,unctional specialiAation< It processors can be added to improve performance of particular applications. F!. ?ost.performance< Off-the-shelf microprocessors with a cost performance ratio order of magnitude below that of supercomputers may be structure into multiprocessors that are costeffective for a wide range of applications. &ultiprocessor Classification 2 $everal classification of multiprocessor system are presented here. ,irst of all based on relationship between instructions Z data. This is given by *lynn34566*.In this basis computer system can be characteriAed as $I$%, $I#%, #I$%, Z #I#%. $I$D$ $ingle instruction stream, single data stream. This category encompasses conventional serial computers. $I&D$ $ingle instruction stream, multiple data streams. These are typically vector processors Z array computers. &I$D$ #ultiple instruction stream, single data stream. This is seldom-used organiAation in which multiple instructions operate on a single data stream in parallel. &I&D$ #ultiple instruction stream, multiple data streams. $imultaneous execution of multiple instructions that operate on data streams. nd / based on relationship between processors Z memory, multiprocessors can be classified as Tightly coupled Z 0oosely coupled. !ightly coupled$ #ultiprocessors contain globally shared memory that all processors have access to. +oosely coupled$ Individual processors have private memories, Z there is no shared globally memory.

raj

@I

On the basis of memory architecture Z access delays <- )#( Z *)#(. $ometimes a third category in this basis is called *O1#(. &ultiprocessor Interconnections2 The nature of the multiprocessor interconnections path has a dominant influence on the bandwidth Z saturation point for systems communications. The basic architecture of a representative group of common multiprocessor types are < 2!. 9us-Oriented systemB /!. ?rossbar-connected systemsB @!. 3ypercubesB C!. #ultistage switch-based systems. 1. 0us7Oriented system < One of the simplest ways to construct a multiprocessor is to use a shared bus to connect processors Z memories. ( multitude of processors can communicate with each other Z with the globally shared memory over a shared bus. Two primary points of connection in shared bus systems are the shared bus itself Z the shared memory. 2! cache is associated with the shared memory, Z processors access it over the busB /! cache is associated with each individual processor. The existence of multiple caches creates problems when shared writable data are cached. In this case, cache coherence must be maintain so that multiple physical copies of single logical datum are consistent with each other in the presence of update activity. /. Crossbar7connected systems $ The crossbar itself has no contention. It allows simultaneous access of * processors to * memories, provided that each processor access a different memory. Thus, the cross bar is antithesis of the bus. The cross point switch is the only sorce of delay between a processor and a memory. If processors have no private memories , the resulting system is a )#( multiprocessor.for example successive elements may be placed in successive memory modules. The cross bar re6uires * s6uare crosspoint switch is to fully connect * end points to * other end points, such as processor and memory. The 6uadratic growth of its complexity with the number of components makes cross bar expensive and limits the scalability of the resulting system. /. -ypercubes< 5arious cube type multiprocessor topologies address the scalability Z cost issues by providing interconnections whose complexsity grows logarithmically with the increasing number of nodes. The system topology is a three dimensional hypercube, with a node placed at each vertex. 3ypercube have a number of interesting mathematical properties. 3ypercubes are recursive structures in the sense that higher dimensional hypercubes contain the lower dimensional hypercubes as their proper subsets. 3ypercubes provide a good basis for scalable, since their complexity grows logarithmically with the number of nodes. 3. &ultistage switch7based systems2 4rocessors Z memories in a multiprocessor system can be connected by means of a multistage switch. There are many variations of this approach. ( generaliAed form of this type of interconnection provides links between * inputs Z * outputs. It has mGlog/* stages. "ach stage consists of a set of * links connected to *./ interchange boxes. The switching network can connect any input to any output by making appropriate connections in each of the m stage. #ultistage switching networks provide a form of circuit switching. The switching networks augmented with processing capability in switches is sometimes referred to as a combining network. T!pes (. "%$tipr(/ess(r (peratin s!ste"s2

raj 1.

@J

2.

3.

1.

2.

3.

$eparate supervisors2 In separate supervisors systems, each node contains a separate operating system that manages local processor , memory, Z I.O resources. In its rudimentary form, the approach effectively manages each processor as an independent system. ( common example of separate supervisors is provided by hypercube systems. &aster8slave2 In master.slave approach, one processor is dedicated to executing the operating system. The remaining processors are usually identical Z form a pool of computational processors. The mater processor schedules the work Z controls the activity of slaves. &ith the addition of slave scheduling, a serial uniprocessor O$ can be fairly easily adapted for master.slave multiprocessor operation. $ymmetric9In a symmetric organiAation, all processors are functionally identical. The O$ is also symmetric in the sense that any processor may execute it. In the simplest form of a symmetric organiAation, called floating master, the O$ is more or less a single, large critical section. The O$ is not bound to any specific processorB it floats from one processor to another. The floating master is a natural first step in implementing the O$ for a symmetric multiprocessor. It is relatively easy to port an existing uniprocessor O$, such as )*I+, to a shared memory )#( multiprocessor. &ultiprocessor O$ function and re:uirements2 ( multiprocessor O$ manages the available resources and augments the hardware functionally to form an abstraction that facilitates program execution Z interaction with users. The three basic types of resources that need to be manages are< Processors scheduling is crucial for effective use of multiprocessors. The primary tasks of a multiprocessor scheduler are to< a! (llocate processors among applications in a manner consistent with system design objectives. b! "nsure efficient use of processors allocated to an application. &emory management in multiprocessors is highly dependent on the underlying architecture Z interconnection scheme. #emory in loosely coupled system is usually handled independently, on a per-processor basis. The duality of memory management Z interprocess communication was exploited the designers of the #ach O$. Device management has received little attention in multiprocessor system s to date. This is partly due to early focus on speedup in compute intensive applications that tend to execute for extanded periods of time Z do not generate much i.o after the initial loading. 3owever, as multiprocessors are applied to more balance general purpose applications, one can expect their i.o re6uirement increase in proportional with the realiAed throughput Z speedup. Introduction to parallel programming < $peedup9 The speedup due to parallel execution of a program is limited by three major factors< 2. The ratio of se6uential to parallel sections of the code /. The available speedup for parallel portions @. The setup, synchroniAation, and communication overhead introduced by parallel operation

The serial portion of the program must be executed serially, so speedup is limited to the parallel sections. This relationship was pointed out early on by Eene (mdahl 8s G 2. 2f!Of.k!:. where $ is the speedup sQ2! relative to the standard case that resultd from introduction of a k times faster component kQ2! i.e used a fraction of time f ,Q2!. n e1ample of Parallel programming9 &atri1 &ultiplication 4rogram matrixmulB R parallel matrix multiplicationS ?onst *G B R b of rows S

raj

@'

5ar I < integerB R private, in parent;s spaceS ( <arrayK2.. *,2..*L of integerB Kshared global variablesL b < arrayK2...*,2..*L of integerB c < arrayK2..*,2..*L of integerB done< semapherB RgeneralS process pUI I < integer!B R * such processes executedS var j,k,s < integerB Rprivate local variablesS begin for j <G 2 to * do begin s<GoB for k<G2 to *do s<GsOaKI,kLPbKk,jLB cKI,jL<Gs endB Rfor jS signal done! end< Rprocess 4UIS begin Rparent-intialiAationS done<G- *!B Rneeds * singles to become freeS for I <G 2 to * do initiate pUi i!B wait done!B Se/%rit! Threats an, (a$s The major security threats perceived by users and providers of computer-based systems include<2!. )nauthoriAed disclosure of information. /!. )nauthoriAed alteration or destruction of information. @!. )nauthoriAed use of service. C!. %enial of service to legitimate users. %isclosure of information to unauthoriAed parties can result in breach of privacy and in both tangible and intangible losses to the owner of the information. 1evelation of a credit card number, a proprietary product design, a list of customers, a bid on a contract, or strategic military data can be used by adversaries in numerous ways. %epending on the nature of the nature of the information in 6uestion, the conse6uences of abuse can range from inconvenience to catastrophic losses. PIn principle, the goal of computer security is to guard against and eliminate potential threats. In particular, a secure system should maintain the integrity, availability, and privacy of data. That is, the data maintained by the system should be correct, available, and private. (s far as security is concerned, data integrity usually means< 2!. 4rotection from unauthoriAed modification. /!. 1esistance to penetration. @!. 4rotection from undetected modification of data. P%ata correctness is a more general notion than security, because it often implies additional provisions such as reliability of data entry and freedom from error in manipulation. (s related to security, data availability is usually interpreted in the narrow sense of providing freedom from the denial of service due to external influence. $ecurity is a measure of confidence in how well the stated goals are met. Penetrati(n atte"pts<There are numerous ways and entry points in which penetration of a computer system may be attempted. $ome of the better-known ones are<-2. 3( e,-(n ter"ina$<- The terminal is left unattended by the user. (n intruder can access the system with full access to all data available to the legitimate user whose identity is assumed. /. Pass'(r,s<- passwords used to authenticate users may be obtained by intruders for the purposes of illegal access in a number of ways, including guessing, stealing, trial and error, or knowledge of vendor-supplied passwords used for systems generation and maintenance. @. 0r('sin <-

raj

CN

often, users may be able to uncover information that they are not authoriAed to access simply by browsing through the system files. In many systems there are files with improperly or overly permissively set access controls. C. Tr(p ,((rs<- These are the secret points of entry without access authoriAation. They are sometimes left by software designers, presumably to allow them to access and possibly modify their programs after installation and production use.D. E$e/tr(ni/ ea7es,r(ppin 2- This may be accomplished via passive or active wire-taps or by means of electromagnetic pickup of screen radiation. F. C("p%ter '(r"s2- These programs can invade computers, usually via a network and deny service to legitimate users by using inordinate amounts of processing and communication resources for self-propagation. I. C("p%ter 7ir%ses2- >iruses are pieces of code that infect other programs and often perform harmful acts, such as deletion of files or corruption of the boot block. Se/%rit! p($i/ies an, "e/hanis"s2- security policies specify what is desired in terms of protection and security. $ecurity mechanisms specify how to effect the security policies and enforce them in a given system. Pse/%rit! p($i/ies2- security policies have probably been around since the accumulation of the first valuables that needed guarding. They usually encompass procedures and processes that specify< 2. 3ow information can enter and exit the system. /. who is authoriAed to access what information and under what conditions. @. what are the permissible flows of information within the system. P (dditional limitations, such as restricting database 6ueries about too large or too small sets, can be imposed to reduce the danger of deducing data by statistical interference. P Me/hanis"s<- security measures include control and monitoring of physical access to the computer premises as well as the internal, computer-system security . "xternal or physical security includes the standard techni6ues of fencing, surveillance, authentication, and attendance monitoring. A%thenti/ati(n2- This section discusses one-way authentication of users. P The primary goal of authentication is to allow access to legitimate system users and to deny access to unauthoriAed parties. The two primary measures of authentication effectiveness are 2!. The false acceptance ratio, that is, the percentage of illegitimate users erroneously admitted, and /! the false rejection ratio, that is, the percentage of legitimate users who are denied access due to failure of the authentication mechanism. One-way authentication is usually based on<2. 4ossession of a secret password! /.4ossession of an artifact. @. )ni6ue physiological or behavioral characteristics of the user. P Pr(te/ti(n an, a//ess /(ntr($<- The original motivation for protection mechanisms came with the advent of multiprogramming. The intent was to confine each user;s program to its assigned area of memory and thus prevent programs from trespassing and harming each other. &ith the increased desire for sharing of objects in primary and secondary memory, more complex mechanisms for access control were devised. Pr(te/ti(n in /("p%ter s!ste"s2- protection in primary storage is usually adjunct to address translation. Its objective is to allow concurrent and potentially mutually suspicious resident processes to share the common physical address space, primary memory. &hen the program is loaded, the limit or the bound registers are set to delineate the extent of its legitimate address space. (t run time, each memory reference is prechecked to verify that it is within the bounds. A//ess-"atri? "(,e$ (. pr(te/ti(n2- The use of seemingly 6uite different protection mechanisms for primary and secondary memory can sometimes obscure the basic underlying issues and principles. This section introduces the accessmatrix model of protection, which serves as a useful abstraction for reasoning about protection mechanisms in computer systems. A//ess -ierar/hies2- ( simple form of access hierarchy is provided by the duel, user.supervisor, mode of operation found in many computer systems. In that model, a restricted range of operations is available in the user mode, which is a default for program execution. A//ess $ists2- (ccess lists are one way of recording access rights in a computer system. They are fre6uently used in file systems. In principle, an access list is an exhaustive enumeration of the specific access rights of all entities that are authoriAed access to a

raj

C2

given object. PF(r"a$ "(,e$s (. pr(te/ti(n2- The need for protection arises when subjects share information. Isolation and separation of users facilitates protection. 3owever, the inability to share information denies some of the major benefits of computeriAed information processing. The protection problem is exacerbated in situations when the service needs to retain some of the user;s data, say, for statistical or accounting purposes. This problem is known as the selective-confinement problem. ,ormal models of protection provide an apparatus for precise formulation and for reasoning about the correctness and completeness of the various security policies and mechanisms. In this section we describe four formal models of protection. The first two models, the access-control matrix and take-grant, formaliAe protection systems based on discretionary access control. The primary concern hare is the Trojan-horse type of attack. The two other models, 9ell-0apadula and the lattice model, deal with flow control and mandatory access control. PCr!pt( raph!2- One way to strengthen security in computer systems is to encrypt sensitive records and messages in transit and in storage. The basic model of a cryptography system is illustrated in fig. The original unenciphered text is called the plaintext or the clear text. It can be encrypted using some encryption method parameteriAed by a key. The result is called ciphertext.

9asic model of a cryptographic system The increased confidence in the integrity of systems that use encryption is based on the notion that ciphertext should be very difficult to decipher without knowledge of the key. The art of breaking ciphers is called cryptanalysis. It is probably as old as cryptography itself. W(r"s an, 7ir%ses<- The significant increase in the number of installed computers and the global extent of computer communications have contributed to the proliferation of computer warms and computer viruses. C("p%ter '(r"s2- ( computer worm is a program capable of reproducing and spreading itself to other computers, usually by means of a computer network. The name worm was coined as an analogy to a tapeworm, a parasitic creature that lives in the intestines of infected humans and other vertebrates. Two major safeguards against computer worms are<- 2. making penetration of each machine difficult. /. 3indering worm spreading. C("p%ter 7ir%ses2- ( computer viruses is code that attaches itself to other programs in order to alter their behavior, often in a harmful way. ( computer virus, like its biological counterpart, cannot operate on its own and must enter a 8host: program in order to be activated. The existence of a computer virus typically encompasses four stages< 2. %ormancy. /. 4ropagation. @. Triggering. C. %amage.

Das könnte Ihnen auch gefallen