Вы находитесь на странице: 1из 35

Seminar On:

Time Sharing And Distributed System

Under guidance of S.B. Kulkarni By : Jayalaxmi.R.Ha


Time Sharing. Distributed

Time-sharing systems: To use computer system resources

efficiently, multiprogramming was introduced. The idea is to hold several jobs in memory at a time, and only assign a resource to a job that needs it on the condition that the resource is available. Multiprogramming brought the idea of time sharing: resources could be shared between different jobs, with each job being allocated a portion of time to use a resource. Time sharing is hidden from the user each user has the impression that the whole system is serving them exclusively.

Features of Time Sharing:

In a time sharing system, multiple users simultaneously access the system through terminals, with the operating system interleaving the execution of each user program in a short burst of computation. Time sharing, or multitasking, is a logical extension of multiprogramming. Multiple jobs are executed by switching the CPU between them. The CPU time is shared by different processes, so it is called as Time sharing Systems. Time slice is defined by the OS, for sharing CPU

The time sharing system provides the direct access to a large number of users where CPU time is divided among all the users on scheduled basis. The OS allocates a set of time to each user. When this time is expired, it passes control to the next user on the system. The time allowed is extremely small and the users are given the impression that they each have their own CPU and they are the sole owner of the CPU. This short period of time during that a user gets attention of the CPU; is known as a time slice or a quantum. The concept of time sharing system is shown in figure.

In figure the user 5 is active but user , user !, user ", and user # are in waiting state whereas user $ is in ready status. %s soon as the time slice of user 5 is completed, the control moves on to the next ready user i.e. user $. In this state user !, user ", user #, and user 5 are in waiting state and user is in ready state. The process continues in the same way and so on. The time&shared systems are more complex than the multi& programming systems. In time&shared systems multiple processes are managed simultaneously which re'uires an ade'uate management of main memory so that the processes can be swapped in or swapped out within a short time.


It refers to allocation of computer resources in time dependent fashion to several user simultaneously. It provides a large number of users with direct access to computer for solving their problems. In time sharing system the ./0 time is divided along all user and a fixed time is allowed to each user. The programming speed of the system allows the ./0 to switch from one user to another user at a very fast speed giving an illusion to each user that only his program is running.


In this system only one program can be in control of the ./0 at a given instance so all the programs will fall in one of the following stages.

Stages of Time Sharing:


Users program has got control on the CPU. Only one program can be active at given instruction of time.


Users program is ready to execute but it is waiting for its turn to get the CPU time.


User has made no requirement for execution of his program and is waiting for completion of same input/output operations.


A distributed system is a collection of autonomous computers linked by a computer network that appear to the users of the system as a single computer.

Features of Distributed System: 1july2


Distributed system is collection of loosely coupled processors interconnected by a communications networ4 /rocessors variously called nodes, computers, machines, hosts (Site is location of the processor5. 6eterogeneity. 7penness. -ecurity. -calability. 8ailure 6andling. .oncurrency. Transparency.


)ariety and differences in *etwor4s .omputer hardware 7perating systems /rogramming languages Implementations by different developers



Openness is concerned with extensions and improvements of distributed systems. Detailed interfaces of components need to be published. New components have to be integrated with existing components. Differences in data representation of interface types on different processors (of different vendors) have to be resolved.


In a distributed system, clients send requests to access data managed by servers, resources in the networks:
Doctors requesting records from hospitals 0sers purchase products through electronic commerce

Security is required for:

Concealing the contents of messages: security and privacy Identifying a remote user or other agent correctly (authentication)



%daptation of distributed systems to

accommodate respond

more users

faster 9this is the hard one5

0sually done by adding more and:or faster processors. .omponents should not need to be changed when scale of a system increases.

(esign components to be scalable;

Failure Handling (Fault Tolerance)

6ardware, software and networ4s fail; (istributed systems must maintain availability even at low levels of hardware:software:networ4 reliability. 8ault tolerance is achieved by
recovery redundancy


.omponents in distributed systems are executed in concurrent processes. .omponents access and update shared resources 9e.g. variables, databases, device drivers5. Integrity of the system may be violated if concurrent updates are not coordinated.

updates analysis



(istributed systems should be perceived by users and application programmers as a whole rather than as a collection of cooperating components.


Types of Distributed Operating Systems

Network Operating Systems Distributed Operating Systems

Network-Operating Systems

Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by:
Remote Remote

logging into the appropriate remote machine Desktop (Microsoft Windows)


data from remote machines to local machines, via the File Transfer Protocol (FTP) mechanism

Distributed-Operating Systems

Users not aware of multiplicity of machines

Access to remote resources similar to access to local resources

Data Migration transfer data by transferring entire file, or transferring only those portions of the file necessary for the immediate task Computation Migration transfer the computation, rather than the data, across the system

Distributed-Operating Systems (Cont.)

Process Migration execute an entire process, or parts of it, at different sites


balancing distribute processes across network to even the workload speedup sub processes can run concurrently on different sites preference process execution may require specialized processor preference required software may be available at only a particular site access run process remotely, rather than transfer all data locally

Computation Hardware Software Data

Network Structure

Local-Area Network (LAN) designed to cover small geographical area.

Multi Speed

access bus, ring, or star network 10 100 megabits/second is fast and cheap

Broadcast Nodes:

usually workstations and/or personal computers a few (usually one or two) mainframes

Depiction of typical LAN

Network Types (Cont.)

Wide-Area Network (WAN) links geographically separated sites

Point-to-point Speed

connections over long-haul lines (often leased from a phone company) 1.544 45 megabits/second usually requires multiple messages

Broadcast Nodes:

usually a high percentage of mainframes

Communication Processors in a WideArea Network


Failure detection Reconfiguration

Failure Detection

Detecting hardware failure is difficult To detect a link failure, a handshaking protocol can be used Assume Site A and Site B have established a link

At fixed intervals, each site will exchange an I-amup message indicating that they are up and running

If Site A does not receive a message within the fixed interval, it assumes either (a) the other site is not up or (b) the message was lost Site A can now send an Are-you-up? message to Site B

If Site A does not ultimately receive a reply from Site B, it concludes some type of failure has occurred Types of failures: - Site B is down

- The direct link between A and B is down - The alternate link from A to B is down - The message has been lost

However, Site A cannot determine exactly why the failure has occurred


When Site A determines a failure has occurred, it must reconfigure the system:

1. If the link from A to B has failed, this must be broadcast to every site in the system 2. If a site has failed, every other site must also be notified indicating that the services offered by the failed site are no longer available

When the link or the site becomes available again, this information must again be broadcast

Advantages and Disadvantages:

Economic. Speed. Inherent

distribution. Growth.

Reliability. Incremental

Software. Network. Security.

Economics: a collection of microprocessors offer a better price:performance than mainframes. <ow price:performance ratio: cost effective way to increase computing power. Speed: a distributed system may have more total computing power than a mainframe. ,x. =,=== ./0 chips, each running at 5= MI/-. *ot possible to build 5==,=== MI/- single processor since it would re'uire =.==! n sec instruction cycle. ,nhanced performance through load distributing. Inherent distribution: -ome applications are inherently distributed. ,x. a supermar4et chain. Reliability: If one machine crashes, the system as a whole can still survive. 6igher availability and improved reliability. Incremental gro th: .omputing power can be added in small increments. Modular expandability

Reasons for distributed systems



sharing and printing files at remote sites processing information in a distributed database using remote speciali?ed hardware devices speedup @ load sharing$



@ detect and recover from site failure, function transfer, reintegrate failed site. @ message passing.


Previous year Questions:

Explain the features of Distributed system and real time system[12m] Discuss time sharing and distributed system[10m] Write a short notes on Distributed OS[5m]