CH/S7CS/Sept., 2002 OPERATING SYSTEM (Ch. 30 C. S. French, Ch. 22, 23 Ray Bradley) The operating system is a major part of system software that controls the interface between the user and (via the applications programs and other software) the hardware. The operating system role is to i. hide the complexities of the hardware from the user; ii. manage the hardware resources in order to provide for an orderly and controlled allocation of the processors, memories and I/O devices among the various programs competing for them. An operating system is a suite of programs that takes over the operation of the computer to the extent of being able to allow a number of programs to be run on the computer without human intervention by an operator, i.e. allow multi-programming. USERS O. S. 2 O. S. 1 HARDWARE APPLICATION SOFTWARES When analyzed it can be seen that in a computer system composed of many units, only a small part is ‘in action’ performing a specific task at one point in time. What is required is a ‘super controller’ or ‘supervisor’ to ensure that the vast facilities are used to optimum advantage. Thus one of the role of operating system is resource management. The primary resources it manages are: i. CPU ii. Memory iii. I/O Devices and Storage Devices iv. Program and Data Basic Organisation of an O. S. (p. 371 C. S. French) Part of the operating system remains in main storage permanently during the running of the computer. This part is called the executive (or kernel or supervisor ). It controls the running of all other program and insulate the other modules or layers of the OS from directly interfacing with the hardware. The remainders of the operating system programs are stored in the secondary storage ( preferably direct-access storage device, e.g. disk ). Booting (p.473 Ray Bradley) In more modern machines it is likely that a program called a loader ( even part of O. S.) would be used to transfer the executive into main memory from secondary storage. These programs are stored in The processes of gradually building up the capability of the computer system by loading in loaders and other parts of the operating system are known as bootstrapping. OPERATING SYSTEM ROM permanently. page 1 CH/S7CS/Sept., 2002 ** Multiprogramming (p.485 - 489 Bradley) It is the technique of having more than one job in the computer’s main memory at any one time. When a program is being executed the CPU may be idle from time to time (e.g. I/O operation taking place). Therefore, during the time when the CPU is idled, it could easily be doing operations for other jobs. (a) (b) Processor is active Processor is idle Processor is idle Process is idle Process is idle Other jobs could be run here! Processor is active Processor is active Figure 1 An operating system organises the system such that the CPU is able to do multi-programming. The processes involve both memory management and management of CPU time (process scheduling). Non-multi-tasking operating system running 3 jobs (a) Job 1 Job2 Job3 CPU activity CPU and peripheral activity is less efficently scheduled. Peripheral activity 0% 33% 67% 100% Time (b) Job 1 Key Job 2 Waiting Job 3 CPU active Peripheral CPU activity All-three jobs done in 67% of time taken by the operating system shown here. Peripheral activity Figure 2 Features of an Operating System i. process scheduling ii. memory management iii. user interface iv. logging and accounting v. file management vi. error detection and correction vii. I/O control systems viii. loading programs and subroutines ix. utilities OPERATING SYSTEM page 2 CH/S7CS/Sept., 2002 Process Scheduling (p.486-489 Ray Bradley) A process is defined as an instance of a program in execution. A process can be in one of the three states (not the program state stated in the paragraph above): Running, Runnable and Blocked. i. Running. The program is currently being executed. ii. Runnable. The program is ready for execution but is waiting to be selected by the scheduler. iii. Blocked. The program is not ready resume execution for some reason, e.g. waiting for I/O operation. However, it is seldom the case that there is just one program assigned to a given processor for execution - multiprogramming. Job priority Processes from different jobs may have different level of priority to be scheduled. One factor affecting the job priority is the relative proportion of I/O operation and processor time i. A job requiring a large amount of I/O operation time will be given a high priority because such a program will allow other programs more opportunity to use processor time (peripheral bound or I/O bound). ii. A job requiring a large amount of processor time will be given a low priority because of given high priority it would prevent I/O programs from obtaining the small amount of processor time they used (processor bound or CPU bound). The second factor is the urgency. E.g. A program must respond to peripheral since data can be lost if some devices such as magnetic tape units are not serviced in time. ** Use of Interrupts in Operating System Interrupts are used to handle the application programs that run under the control of operating system. Sample steps: i. An application program requests an I/O operation (a utility in O.S.) by issuing a software interrupt. ii. The operating system suspends the execution of that program. iii. The operating system performs the necessary steps for the request operation. iv. Then the request operation is completed. v. The operating system transfers control back to the application program. When an I/O operation is in progress, the program that registers it cannot continue execution. OPERATING SYSTEM page 3 CH/S7CS/Sept., 2002 Process Scheduling Two types of scheduling i. Job Scheduling. The operating system works out a ‘priority index’ for each job based on such factors as processor time or I/O operation time required by the job, resources available on-line and the deadline by which the job must be completed. ii. Processor Scheduling. a. The operating system is entered frequently to decide what is the next process to be done. It works out the hardware resources currently demanded by each job and checks what resources are available. b. It then gives processor time to the most appropriate job according to a scheduling strategy such as: ‘process the highest priority job that can use available resources’. c. The job given processor time will run until it ends or an interrupt occurs, e.g. from I/O device, or an interrupt is requested by the job, e.g. request for I/O. The principle for scheduling It may include: i. make sure no resource is heavily under utilized ii. make sure that the maximum number of interactive users get a reasonable response iii. make sure that no one job always gets pushed to the back of the queue iv. get the maximum number of jobs processed in the minimum amount of time v. make sure that the system does not overload itself to such an extent that the system cannot cope. Time slicing and context switching Operating system usually uses a technique called time slicing to enable several programs to be executed in parallel. With this technique, each program runs for a short period called time slice, then another program runs for its time slice, so on. The scheduler, operating system scheduling routines, saves all information relating to the program that was just interrupted. Then information saved, which is called the context, includes the general register contents, the processor status word (content of status register), and so on. Such changing from one program state to another is called context switching. High level and low level scheduling High level scheduling. It determines which job shall be allowed to enter the queue for resource. Priority may be assigned by the user. Low level scheduling. It determines which job will be allocated CPU time when it next becomes available and actually assigns or dispatches the CPU to the process. (The low-level scheduler is also called dispatcher, a part of operating system.) OPERATING SYSTEM page 4 CH/S7CS/Sept., 2002 Interrupt handling with Several Devices Highest Lowest Priority Priority Main Program DEVICE 1 DEVICE 2 DEVICE 3 KEY : Receiving processor time : Waiting for processor time Device 1 interrupts main program 3 requests interrupt but is of lower Device priority than Device 1 so waits 1 service completed so Device 3 Device receive service 2 requests interrupt and is higher Device priority than device 3 so gets service Back to Device 3 again Device 1 interrupts again 1 service finishes so Device 3 finally Device finishes service Back to main program Device 2 interrupts main program 2 service completed so back to main Device program Figure 3 Scheduling Strategy i. Highest priority first. ii. Round robin. a. Under such strategy, processes are dispatched on a first in first out (FIFO) basis, with each process in turn being given a limited amount of CPU time, i.e. time slice. b. If it does not complete before its time expires, the dispatcher gives the CPU to the next process. c. This method of scheduling helps to guarantee a reasonable response time to interactive users. ** A mixed approach. Some users, who have a high priority for their jobs, may have more than one consecutive time slices each time their turn comes round. iii. Shortest job first. iv. Shortest remaining time first. a. In these two scheduling methods, the process with the smallest estimated running time or run-time-to-completion is run next. b. Advantage. Reducing the number of waiting jobs, and the number of small jobs waiting behind large jobs. OPERATING SYSTEM page 5 CH/S7CS/Sept., 2002 c. Disadvantage. Requiring knowledge of how long the job will take, so the user has to estimate the job time. Frequently pushing long jobs to the back of the queue. Multiple-queue design (p.487 - 488 Ray Bradley) A queue is usually developed to put tasks waiting for CPU attention. If one of the tasks is halted because of an I/O request, this request may not have been completed before the task gets to the beginning of the queue again. Therefore, it is efficient to implement more than one queue – one for those tasks which are waiting for attention, and another for tasks which are waiting for I/O to be completed. Multiple queues are established for most operating system designs. One advantage of a multiplequeue design is that multiple levels of priorities can easily be assigned. High-priority tasks can be routed to one queue, while low-priority tasks can be routed to another. (a) (b) Yes Yes All jobs are placed in this queue Queue management system places and releases jobs in the queue based on events within the system Has the job timed out? No Has the job timed out? No Processing by the CPU High-priority queue Processing by the CPU Low-priority queue Exit system Yes Has the job Finished No Possible other queues Exit system Yes Has the job finished? No Figure 4 Deadlock Deadlock occurs when two processes each has the resource with the other needs in order to execute. Since both processes do not have all the resources they need to execute, they are in a permanent state of suspension. Thus the scheduler must be responsible for detecting deadlock and removing it. Memory Management (p.490-493 Ray Bradley) Partitions The operating system may organize main storage into blocks of convenient size called partition. It can then allocate storage space by partitions rather than by piece meal allocation by individual locations. OPERATING SYSTEM page 6 CH/S7CS/Sept., 2002 In order to place jobs in whatever partition of main storage is available, the programs must be relocatable. Their absolute address is set by the executive. (Dynamic allocation of main storage) Fixed and variable partitioning A typical memory map showing five fixed partitions and the operating system is shown in fig 6(a) and a map showing five variable partitions is shown in fig 6(b). Jobs may have to wait for partition of appropriate size These boundaries are fixed Operating system (a) Different size jobs fit in, however, ‘holes’ produced These boundaries are variable Operating system Wasted storage space (b) Figure 5 Fixed partition. i. Appropriate-sized fixed partitions could be set up in memory, and the jobs loaded into an appropriate partition when one becomes available. ii. Advantage. simple. iii. Disadvantage. The algorithms for allocating users’ program to the partitions are relatively a. Long queues can be built up at the same time that much valuable memory remains unused, because many programs don’t happen to fit into a particular size partition. b. Inefficient use of memory spaces, a 20k program may ‘occupy’ a 500k partition. c. The finite number of fixed partitions is an arbitrary limit on the number of tasks that the system can handle. Variable partition. i. When a task is loaded it is allocated an appropriate amount of memory. ii. This is called dynamic memory partitioning. iii. The major disadvantage is that it tends to leave lots of gaps in the store, which have to be cleaned up every so often. This compacting process is very tedious and time consuming. OPERATING SYSTEM page 7 CH/S7CS/Sept., 2002 Tasking and Multi-tasking Multi-tasking. Multi-programming of user program, i.e. there can be a number of interactive user programs being multi-programmed together with the operating system and probably some background tasks too. True multi-tasking is preemptive which means that if a process is interrupted it will not necessarily be ressumed immediately after the interrupt has been serviced because other process may have a higher priority. (Non-preemptive multi-tasking is sometimes called pseudo-multi-tasking.) On minicomputer or mainframes, jobs may be broken down into stages called tasks which may be treated as separate programs (tasking). Segmenting A job may be divided into convenient storage units called segments. (A segment may well correspond to a task.) These segments may be organized so that only those segments currently requiring processing are held in main storage. When segments of different programs are multi-programmed, the method is called interleaving. Overlaying i. While segmenting in the multi-programming environment, only those segments currently requiring processing are held in main storage. The rest are held on direct-access secondary storage. ii. As each new segment is brought into main store, it is said to overlay the segment it replaces. Virtual memory Not all the process needs to be stored in memory even when it is runnable, so only the section of the program containing the instructions currently being executed needs to be copied into memory. Segmenting and dynamic allocation of main storage leads to the following: The segments of the program will be brought into main storage from special files on directaccess storage and dynamically allocated a block of main storage (a partition). Such a storage arrangement is known as virtual memory since main memory can be regarded as larger than its real size. Paging and Segmentation There are two different approaches to partitioning. In the first, segmentation, the partition is called a segment and its size is fairly large, e.g. 64 KB. In the second, paging, the partition is called a page frame and its size is relatively small, e.g. 1KB. In paging, a translator splits an object program into fixed size pages of the same dimension as main memory page frames. In order to keep track of which actual storage location any given item of data is in at any particular moment, the operating system has to maintain, for each running process, a ‘map’ showing which blocks of virtual storage are currently in real memory and where they are. In segmentation, the programmer or the operating system (or a special utility program) divides the program up into a number of segments, which are logically related item, e.g. code segment, data segement. They may be loaded into non-contiguous locations in memory. Different segments may have different access rights attached to them. OPERATING SYSTEM page 8 CH/S7CS/Sept., 2002 In both paged and segmented it is not necessary to allocate free memory contiguously, i.e. consecutive pages or segments to a process. Swap files and Swapping In the virtual storage arrangement, the segments of the program will be brought into main storage. The special files on direct access storage used to hold the programs, or segments of programs, not currently in physical memory are called swap file and page file. When a program or program segment, is transferred between main storage and such a file it is said to be swapped or paged in or out of memory. Virtual storage techniques can have their disadvantages. E.g. A situation can arise where pages of a program are continually being loaded into memory and then saved on the disk. In worse case conditions, the processor may be spending more time saving and loading blocks than actually performing any useful processing. This unfortunate state of affairs is known as thrashing. User Interface This is usually via the console keyboard (terminal). Operator activities (INPUT) such as: i. Load jobs of other software. ii. Call in routines for tracing results. iii. Terminate a job, e.g. printing rem.: The operators can use the command language for the above activities. e.g. COPY and DIR in MSDOS System messages (OUTPUT) such as: i. Reporting the completed run of a job. ii. Reporting details of job usage. iii. Reporting program suspension caused by error condition. iv. Requests for operator action. Direct Manipulation (User Interface) There are programs that provide a general-purpose means of instruction the computer carry out operational tasks. e.g. COPY in MS-DOS. The program is called a command interpreter because of the way in which it works. A user sitting at terminal using the command interpreter will be able to type in simple standard instructions, which the command interpreter will decipher and carry out straight away. A prompt may be displayed. Its purpose is to inform the user that the interpreter is ready to accept a command. OPERATING SYSTEM page 9 CH/S7CS/Sept., 2002 Job Control Language (JCL) i. This is a special command language that is used to identity jobs and states their requirements to the operating system. ii. It has control structure just like any other programming language for sequence, selection and iteration. iii. It is particular important in batch processing, where the user must specify a whole series program to be run. (e.g. batch files in DOS) Logging and Accounting The operating system produces a log of process that have been processed so that the computer knows the state of affairs at any point. The program, which performs this logging of the various events, is called a monitor. These records are often stored on a backing medium such as magnetic tape or disks, called the journal. File Management ** Refer to the notes of Backing Storage in the chapter of peripherals. The operating system provides the following functions on file management: i. preventing illegal access or amendments to user or system files. ii. “dumping” the contents of files from time to time in case of future loss. iii. keeping track of file description and location and maintaining the directory file structure. Directory file structure (p.548 - 549 Ray Bradley) Key: DIRECTORY FILES Root directory Resource ART General admin. Compilers Pascal Figure 6 OPERATING SYSTEM Publisher Letts Visual Basic Simon & Schuster O Level Chap. 16 Text Business Standley Thornes Catalyst Magazine A Level JSP 1 page 10 CH/S7CS/Sept., 2002 Program files may themselves be organized on disk in what is called a directory, i.e. a hierarchical tree structure as shown in fig 6. The top directory is usually called the root directory. Those on the second level down are called sub-directories. Each sub-directory may contain further sub-directories. In such way many users can be accommodated on a network of computers all with access to only one main disk system. Each person can have access only to his or her own directory by using a system of passwords. Error Detection and Correction One of the typical functions for the operating system to perform is the of a job after logical errors have been made when programs are being executed. The operating system should be able to handle errors that occur as part of the normal operating activities. Examples. division by zero, a program not having sufficient data, the wrong disk being used, etc. suspension I/O Control systems The operating system consists of a set of programs for controlling the input from and output to the various devices. These programs form part of the executive and are entered via the executive when an interrupt occurs. Several jobs may request the same peripheral devices, such as output media. If more than one output device is available for that medium; it is the job of the operating system to allocate one device to some programs, and another device for other programs. If subsequently the queue for one device is longer than another then are made. reallocation of queues Device Driver The input/output manager of an OS provides an interface between other modules of the operating system and I/O devices, e.g. file explorer. It provides a means by which files and devices can be treated in a uniform manner and manipulated by a set of high-level commands, e.g. readln in Pascal. At the device end, the I/O system must supply the device-specific control signals to each particular type of device, possibly many times in the course of execution of a single high-level command. It does by using sofware called a device driver . Each different type of device will need a corresponding device driver. The I/O system will maintain a buffer and application programs or user interface. into which data is transferred between devices Off-lining and Spooling These are methods getting around the I/O bottleneck, many processes queue up waiting for I/O. OPERATING SYSTEM page 11 CH/S7CS/Sept., 2002 Off-lining. A job that output data, to a printer for example, places the output data onto backing store instead, and is therefore able to complete processing quickly. Later, either i. the tape or disk is physically moved to a separate processor, which outputs the data onto a printer, or ii. the tape or disk drive is reassigned to another front-end communications processor, which outputs the data to a line printer. Spooling (Simultaneous Peripheral Operating On Line). i. It can be refer to pseudo off-lining using disk (direct access storage). ii. It is a technique used to speed up communication between devices that operate at different speeds. iii. E.g. Output to printer may be spooled (written) to disk, which is a high speed device. When the printer becomes free, the output will be printed. iv. This technique enables several users who are using a system to share the same printer simultaneously without getting their output muddled up. v. The program that transfers data from the disk to the output device is called despooling program. JOB OR PROGRAM DATA OFF-LINING OFF-LINING PROCESSING JOB OR PROGRAM DATA SPOOLING DE-SPOOLING Figure 7 Polling (I/O Control) It is the technique for allowing one unit to check the status of another; the first unit checks whether the second is in a certain status, and if it is not, it carries on with what it was doing. It takes large amounts of processing time and an interrupt system is preferably to polling because the request is handled as soon as it occurs. OPERATING SYSTEM page 12 CH/S7CS/Sept., 2002 Loading programs and subroutines The following transfers are handled by operating system: i. Loading system software into main store as required. ii. Swapping applications programs or parts of the programs between main storage and directaccess storage as part of multi-programming activity. iii. Bringing into main store and linking together the applications or the systems subroutines to be used in conjunction with particular jobs. Utilities (optional) Utilities, also called service programs, are system programs that provide a useful service to the user of the computer by providing facilities for performing common tasks of a routine nature. Common types of utility programs are: i. Tracing and Debugging Tracing involves dumping internal storage after obeying specific instructions so that the cycle of operations can be traced and errors located. Debugging is the term given to the process of locating and eliminating errors from a program. ii. File and Directories commands Most OS contains commands or applications to handle various file and directory operations, like copying, moving, deleting and renaming files or directories, formatting disks, etc. iii. Object Program Libraries (p. 194 Heathcote) The object program after compilation may use library routines provided by OS. An object program is a collection of routines stored in such a way that any routine can be selectively library is a collection of routines stored in such a way that any routine can be selectively extracted for use in another object module. Object program libraries can be classified by: iv. a. system. a collection of built-in language-defined routines, e.g. in Pascal writeln and readln. b. public. a collection of generally useful routines which are not standard to the language but likely to be required by many programmers, e.g. graphics routines; c. private. a collection of routines written and stored in library form for a programmer’s own use. Loader and Linker (p. 88 RayBradley, p. 194 Heathcote) A loader is a program that takes the object codes (i.e. the machine codes produced by the assembler) and loads it into the computer’s main memory in the correct place. The function of the linker is to link all the modules, including the libraries, together by putting the appropriate machine addresses into all external call and return addresses before executing the program. *** Other examples of utility programs are loader, linker and public libraries. OPERATING SYSTEM page 13 CH/S7CS/Sept., 2002 Modes of Operation Methods of Operation (p.433 C. S. French) Multiprocessing. If two or more processors are present in a computer system and are sharing some or all the same memory, two or more processes may be executed at the same instant. There are three common types of multi-processing: Pipelining (single instruction stream single data stream, SISD), Vector (array) processing (SIMD) and Multiple processor architecture (MIMD) Multi-programming. More than one program in the main storage is being processed apparently at the same time. Multi-tasking. i. It can be regarded as the multi-programming of user program. ii. In larger mainframe, to prevent multiple copies of the same application programs or compilers etc. being loaded into the machine when requested by several differnet users, the same program or application can be shared between the different tasks being under taken by each user. iii. Multi-tasking on micros means the same thing as multiprogramming. Batch Processing i. The job (program and data) is not processed until fully input. ii. The jobs are entered and stored on a disk in a batch queue and then run one or more at a time. Remote job entry. It refers to batch processing where jobs are entered at a terminal remote from the computer and transmitted into the computer. Interactive computing. The computer and terminal user can communicate directly with each other. Conversational mode. This is interactive computer operation where the response to the user a message is immediate. Multi-access. The computer allows interactive facilities to more than one user at a time, i.e. the system allows two or more users to communicate with the computer at any one time. Time sharing. Processor time is divided into small units called time slices in turn between users to provide time sharing . Real-time system. A real-time system is capable of processing data so quickly that the results are available to influence the activity currently taking place. and shared Client-Server Processing i. Most network OS operate on a client-server system. ii. In such a system, application programs reside on a network server connected to the LAN. iii. The clients are each loaded with an OS, which not only allows work to carried out at the client computer, but also can access files and application resident on the server. iv. The downloading processing is often transparent to the user. OPERATING SYSTEM page 14 CH/S7CS/Sept., 2002 Distributed Processing i. It is one in which system resources, e.g. processors, disks storage and printer, exist in separate nodes of a network with transparent access to these resource by users begin possible. ii. The file server and printer server networks are examples of distributed computer system. Criteria on choice of operating system (p.372 C. S. French) i. The hardware provision and basic design of the computer. ii. The applications intended for the computer. iii. The method of communication with the computer, e.g. many or few peripherals. iv. The method of operating the computer. Network An interconnected set of two or more computers is called a computer network. Basic Advantages of using networks i. The sharing of resources (e.g. computers and staff) and information. ii. The provision of local facilities without the loss of central control. iii. The even distribution of work, processing loads, etc. iv. Improved communication facilities. Distributed processing system If the computers in the network operate together as a single unit which to the user appears as a single computer, though physically dispersed, the complete system is described as distributed system. Each processor tends to have its own “local” peripherals as in fig 12. The advantages of distributed processing: i. Reduction in costs and delays in transmitting and processing data. ii. Reduced load on the “host” iii. Better local control and service, e.g. computer laboratory in school. OPERATING SYSTEM page 15 CH/S7CS/Sept., 2002 Mainframe computer at Head office (called the “Host” processor Disks VDUs Printer Minicomputer systems located at regional offices Figure 8 Types of Networks Local Area Network (LAN) (p. 26 - 30 Ray Bradley) i. A collection of computers and peripherals connected together by cables, and generally confined to one building or site. ii. The simplest LAN would probably consist of a few computers sharing resources obtained from a common Winchester disk system (i.e. harddisk on PC). iii. In such a system, each computer connected to the network is often referred to as a workstation , and the Winchester disk system is often referred to as a file server . iv. Some networks may allow many of the networks to be interconnected by making use bridges. v. The microcomputer workstations can often work totally independently of the network by using their own resources. vi. To make life easy for the network users, computer manufacturers have developed sophisticated network operating system . vii. To make use of the network the user would have to server. viii. Why makes use of LANs? OPERATING SYSTEM log-on to the hard disk system or file page 16 CH/S7CS/Sept., 2002 a. The networked computers can make more efficient use of common resources such as application software. b. It gives you the powerful facilities of communication between different computers. e.g. electronic mail system and bulletin board. c. A network of machines will usually be cheaper to operate than the equivalent number of machines each having the same facilities. (i.e. printers, disks, software, etc.) WANs or LHNs (p. 26 Ray Bradley) i. These terms mean Haul Network Wide Area Network . and Long ii. A collection of computers spread over a wide area geographical area, possibly spanning several continents. iii. Communication may be via microwave or satellite link, or by ordinary telephone lines. iv. They are organized in the same way as a LAN v. Many different types of powerful computer (or network of computers) are interconnected by means of special microwave land-based and satellite links. vi. As lots of different computers are talking to one another, then a communications protocol (i.e. set of rules, revise the notes on data communication) must be established. vii. Unlike the centralized control of the resources in a LAN, a LHN is more likely to have completely distributed control, i.e. the control lies with the computer at individual nodes. . Network Topology - the ways in which the networks are organized. (p. 30 - 36 Ray Bradley) main resource Fig. (a) Star-network topology gives the Highest speed and security. Star Network (fig. 9(a)) i. The central resources for the network would be located at the center of the star (server). ii. Each workstation would be connected to the central computer or file server by means of its own unique link. iii. Advantages. a. If one cable fails, the others are not affected. b. Performance is consistent even when the network is being heavily used. OPERATING SYSTEM page 17 CH/S7CS/Sept., 2002 iv. c. Variable transmission rates are possible between the file server and each workstation. d. The passing of messages from one workstation to another or from the file server to a workstation is more secure since each station has its own cable to the server. e. It is easy to add new stations without disrupting the network. Disadvantages. a. v. It is costly to install because of the length of cable required. A polling system is commonly used; the file server polls each station in turn to see if it has a signal to send. main resource Fig9(b) Ring-network based on a ‘continuous’ loop main resource Fig. 9(c) Bus-network is versatile and cheap – but less secure. Bus Network (fig. 9(b)) i. In a bus network, all the devices share a single cable. ii. It is also called multi-drop network. iii. One or more of the stations on the network acts as the file server and controls the access to the hard disks , which are used for all the common resources and the users’ file. OPERATING SYSTEM page 18 CH/S7CS/Sept., 2002 iv. Thus, when two computers want to use the line at the same time, there has to be some method of deciding who gets the line first. v. One of the examples is the Ethernet, commonly used for the interconnection of IBM PC, or any other machine. vi. Advantages. vii. a. It is easy and inexpensive to install as it requires the least amount of cable. b. It is easy to add more stations without disrupting the network. Disadvantages. a. The whole network goes down if the main cable fails at any point. b. Cable failure is difficult to isolate. c. Network performance degrades under a heavy load. Ring Network (fig. 9 (c)) i. It is one in which a loop of wire connects all workstations together. ii. The typical ring network. iii. iv. v. a. One station on the ring is the originator of a message, which gets sent to the next station along the line. b. If the message is intended for these stations, it is received; otherwise the signal is boost by a repeater and sent to the next stations. c. The situation continues until the correct station receives the message. d. A special station on the network called the monitor would provide power for the repeaters. A token-ring system. a. When no data is being transmitted an electronic token (The token is simply a special packet of data.) is sent around the network. b. If a machine wants to send a message then the token is grabbed and the message is sent. c. In this way, NO clashes can occur and only short time delay is made. Advantages. a. There is no dependence on a central file server. b. Transmission of messages around the ring is relatively simple, with messages travelling in one direction only. c. Very high transmission rates are possible. Disadvantages. a. If one node in the ring breaks down, transmission between any of the devices in the ring is disrupted. OPERATING SYSTEM page 19 CH/S7CS/Sept., 2002 Message passing techniques in LHNs Circuit switching. i. This is the normal method used on telephone networks. ii. Steps iii. a. When the computer places a call, the switching equipment at nodes in the telephone system seeks and establishes an unbroken path all the way from the sending computer to the receiving computer. b. This link is maintained until the transmissions are completed. c. The sender and receiver then disconnect thus freeing the circuit. Disadvantages: a. long set-up time b. monopoly of bandwidth c. need for sender and receiver to synchronize Message switching. i. The interface message processors (IMPs) used in these networks are special purpose communication computers. ii. Most computers or terminals would be connected to these IMPs. iii. IMPs may communicate directly with one another if connected by cables or indirectly via other IMPs. iv. An IMP may receive, store and forward messages received from one IMP and intended for another. v. Advantages: No need to establish a path before transmission. vi. For long distance transmission, packets of information are transmitted. vii. Disadvantages: Long message packets can demand large amounts of storage space on IMPs which are storing and forwarding messages in there entirety. Long message can monopolize a particular link. Packet switching i. Similar to message switching, packet switching also use IMPs to store and forward packet of message. ii. In particular, packets in this case have a fixed upper size limit which enable them to be held in an IMP main storage instead of requiring disk space as often happens with message switching. iii. The duration of each packet’s transmission is also limited which ensures more balanced access to communication channels. iv. Advantages: a. More efficient use of lines is possible. b. Cost depends only on the number of packets sent not on distance, so all data is transmitted at local call rates. c. It is less likely to be affected by network failure because of the multiple routes available to transmit data packets. OPERATING SYSTEM page 20 CH/S7CS/Sept., 2002 d. Security is better; data is less likely to be intercepted because the packets may be sent along different routes or be interleaved with other unrelated packets Security on Networks Prevention of access to buildings i. Many security systems ranging from code locks via magnetic stripe cards to a combination of both of these systems are put at the entrances to buildings housing computers which have access to the network. Other examples are face prints, retina scans, palm prints and voice recognition. ii. Whatever system used is usually linked to the main computer system so that access to buildings may be monitored by the security system. Passwords to log on to the system. a. To log on to the system each person would be allocated a special password. b. There may be many categories of user, ranging from ordinary employees who have to make use of the system for their day-to-day work through to users who have complete control over what can be done with any information contained in the files that are accessed over the network. The location of specific workstations. i. In the most sensitive installations there would probably be closed circuit security cameras constantly monitored by security personnel. ii. Passwords would also be changed at frequent intervals. Protection of transmitted information i. Problem : It is now possible to get sensitive electronic equipment that can monitor the electromagnetic fields that are radiated from systems carrying computer data. ii. Solution : Making use of light instead of electrical signals (optical fiber) OPERATING SYSTEM page 21