time sharing
TRANSCRIPT
Seminar On:
Time Sharing And Distributed System
Under guidance of S.B. Kulkarni
By : Jayalaxmi.R.Hanni IAR Mtech Mech Dept
Contents:
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 time between processes.
Examples: Multics, Unix, etc.
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 1, user 2, user 3, and user 4 are in waiting state whereas user 6 is in ready status.
As soon as the time slice of user 5 is completed, the control moves on to the next ready user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in waiting state and user 1 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 requires an adequate management of main memory so that the processes can be swapped in or swapped out within a short time.
ADVANTAGES:
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 CPU time is divided along all user and a fixed time is allowed to each user. The programming speed of the system allows the CPU 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.
DISADVANTAGES:
In this system only one program can be in control of the CPU at a given instance so all the programs will fall in one of the following stages.
Stages of Time Sharing:
ACTIVE STAGE
User’s program has got control on the CPU. Only one program can be active at given instruction of time. READY STAGE
User’s program is ready to execute but it is waiting for its turn to get the CPU time. WAITING STAGE
User has made no requirement for execution of his program and is waiting for completion of same input/output operations.
DISTRIBUTED SYSTEMS
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: [july’13]
Distributed system is collection of loosely coupled processors interconnected by a communications network
Processors variously called nodes, computers, machines, hosts (Site is location of the processor).
Heterogeneity.
Openness.
Security.
Scalability.
Failure Handling.
Concurrency.
Transparency.
Heterogeneity
Variety and differences inNetworksComputer hardwareOperating systemsProgramming languages Implementations by different developers
13
Openness
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.
14
Security
In a distributed system, clients send requests to access data managed by servers, resources in the networks: Doctors requesting records from hospitalsUsers 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)
15
Scalability
Adaptation of distributed systems to
accommodate more users
respond faster (this is the hard one)
Usually done by adding more and/or faster processors.
Components should not need to be changed when scale of a system increases.
Design components to be scalable!
16
Failure Handling (Fault Tolerance)
Hardware, software and networks fail!
Distributed systems must maintain availability even at low levels of hardware/software/network reliability.
Fault tolerance is achieved by
recovery
redundancy 17
Concurrency
Components in distributed systems are executed in concurrent processes.
Components access and update shared resources (e.g. variables, databases, device drivers).
Integrity of the system may be violated if concurrent updates are not coordinated.
Lost updates
Inconsistent analysis
18
Transparency
Distributed systems should be perceived by users and application programmers as a whole rather than as a collection of cooperating components.
19
Types of Distributed Operating Systems
Network Operating Systems Distributed Operating Systems
NetworkOperating Systems
Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by: Remote logging into the appropriate remote machine
Remote Desktop (Microsoft Windows)
Transferring data from remote machines to local machines, via the File Transfer Protocol (FTP) mechanism
DistributedOperating 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
DistributedOperating Systems (Cont.)
Process Migration – execute an entire process, or parts of it, at different sites Load balancing – distribute processes across network
to even the workload
Computation speedup – sub processes can run concurrently on different sites
Hardware preference – process execution may require specialized processor
Software preference – required software may be available at only a particular site
Data access – run process remotely, rather than transfer all data locally
Network Structure
LocalArea Network (LAN) – designed to cover small geographical area. Multi access bus, ring, or star network
Speed ≈ 10 – 100 megabits/second
Broadcast is fast and cheap
Nodes: usually workstations and/or personal computers
a few (usually one or two) mainframes
Depiction of typical LAN
Network Types (Cont.)
WideArea Network (WAN) – links geographically separated sites Pointtopoint connections over longhaul lines (often
leased from a phone company)
Speed ≈ 1.544 – 45 megabits/second
Broadcast usually requires multiple messages
Nodes: usually a high percentage of mainframes
Communication Processors in a WideArea Network
Robustness
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 Iamup 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 Areyouup? message to Site B
If Site A does not receive a reply, it can repeat the message or try an alternate route 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
Reconfiguration
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 to all other sites
Advantages and Disadvantages:
Advantages Economic.
Speed.
Inherent distribution.
Reliability.
Incremental Growth.
Disadvantages:
Software.
Network.
Security.
More components to fail.
• Economics: a collection of microprocessors offer a better price/performance than mainframes. Low price/performance ratio: cost effective way to increase computing power.
• Speed: a distributed system may have more total computing power than a mainframe. Ex. 10,000 CPU chips, each running at 50 MIPS. Not possible to build 500,000 MIPS single processor since it would require 0.002 n sec instruction cycle. Enhanced performance through load distributing.
• Inherent distribution: Some applications are inherently distributed. Ex. a supermarket chain.
• Reliability: If one machine crashes, the system as a whole can still survive. Higher availability and improved reliability.
• Incremental growth: Computing power can be added in small increments. Modular expandability
• Another deriving force: the existence of large number of personal computers, the need for people to collaborate and share information.
Reasons for distributed systems
Resource sharing
sharing and printing files at remote sites
processing information in a distributed database
using remote specialized hardware devices
Computation speedup – load sharing.
Reliability – detect and recover from site failure, function transfer, reintegrate failed site.
Communication – 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]