hicasbscit.files.wordpress.com  · web viewunit no. topics. hours. i. basics of operating systems:...

56
Programme Code: MIT Master of Science in Information Technology Course Code: 19ITP07 Course Title Batch: 2019 and Onwards ADVANCED OPERATING SYSYTEM Semeste r: II Hrs/Week: 5 Credits : 4 Course Objective Students will learn: 1. Main components of an OS & their functions. 2. The mechanisms of OS to handle processes and threads and their communications. 3.Gain insight into the components and management aspects of real time and mobile operating systems. 4.To develop real-time algorithm for task scheduling. 5.How Distributed Shared Memory is managed. Course Outcomes (CO) Students will able to: K1 CO1 Describe the important computer system resources and the role of operating system in their management policies and

Upload: others

Post on 20-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Programme Code: MIT Master of Science in Information Technology

Course Code: 19ITP07Course Title Batch:

2019 and Onwards

ADVANCED OPERATING SYSYTEM Semester: II

Hrs/Week: 5 Credits: 4

Course Objective

Students will learn:

1. Main components of an OS & their functions.

2. The mechanisms of OS to handle processes and threads and their communications.

3.Gain insight into the components and management aspects of real time and mobile operating systems.

4.To develop real-time algorithm for task scheduling.

5.How Distributed Shared Memory is managed.

Course Outcomes (CO)

Students will able to:

K1 CO1Describe the important computer system resources and the role of operating system in their management policies and algorithms.

K2 CO2 Discuss the working of real-time operating systems and real-time database.

K3 CO3 Manipulate hardware and software issues in modern distributed systems.

K4 CO4Evaluate the requirement for process synchronization and coordination handled by operating system

Page 2: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Mapping of Outcomes

PO

COPO1 PO2 PO3 PO4

CO1 M M M S

CO2 M S M S

CO3 S M M S

CO4 M M M M

S - Strong; M-Medium; L-Low.

Page 3: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

19ITP07ADVANCED OPERATING SYSYTEM II

Unit No. Topics Hours

I

Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor Systems – Distributed Systems – Clustered Systems – Real-Time Systems – Handheld Systems – Feature Migration – Computing Environments - Process Scheduling – Cooperating Processes – Inter Process Communication- Deadlocks – Prevention – Avoidance – Detection – Recovery.

12

II

Distributed Operating Systems: Issues – Communication Primitives – Lamport‟s Logical Clocks – Deadlock handling strategies – Issues in deadlock detection and resolution distributed file systems –design issues – Case studies – The Sun Network File System-Coda.

12

IIIRealtime Operating Systems : Introduction – Applications of Real Time Systems – Basic Model of Real Time System – Characteristics – Safety and Reliability - Real Time Task Scheduling

10

IVOperating Systems for Handheld Systems: Requirements – Technology Overview – Handheld Operating Systems – Palm OS- Symbian Operating System- Android –Architecture of android – Securing handheld systems.

13

V

Case Studies :Linux System: Introduction – Memory Management – Process Scheduling – Scheduling Policy - Managing I/O devices – Accessing Files- iOS : Architecture and SDK Framework - Media Layer - Services Layer - Core OS Layer - File System.

13

Text Book

1. William Stallings, “Operating systems”,Pearson Prentice Hall, 6th Edition, 2009.2. Pradeep K Sinha, “Distributed Operating Systems: Concepts and Design”, Prentice

Hall of India, 2007. Reference Books:

1. Abraham Silberschatz; Peter Baer Galvin; Greg Gagne, “Operating System Concepts”, Seventh Edition, John Wiley & Sons, 2004.

2. .Rajib Mall, “Real-Time Systems: Theory and Practice”, Pearson Education India, 2006.

3. Pramod Chandra P.Bhatt, An introduction to operating systems, concept and practice, PHI, Third edition, 2010

Page 4: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Course Designed by Verified by HOD Checked by Approved by

Ms.G.Siva brindha Dr.V.Saravanan

UNIT-I

Page 5: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers.

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/OS, etc.

BASICS OF OPERATING SYSTEMS

An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs.

Following are some of important functions of an operating System.

Memory Management Processor Management Device Management File Management Security Control over system performance Job accounting Error detecting aids Coordination between other software and users

MAINFRAME SYSTEMS

Page 6: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Mainframe development is software development, on a unique operating system, using obsolete tools and languages. A mainframe developer must know more than a programming language, he must know mainframe tools listed below and be comfortable working in the mainframe culture.

In simplest terms, an operating system is a collection of programs that manage a computer system's internal workings— its memory, processors, devices, and file system. Mainframe operating systems are sophisticated products with substantially different characteristics and purposes.

Operating systems are designed to make the best use of the computer's various resources, and ensure that the maximum amount of work is processed as efficiently as possible. Although an operating system cannot increase the speed of a computer, it can maximize use of resources, thereby making the computer seem faster by allowing it to do more work in a given period of time.

A computer's architecture consists of the functions the computer system provides. The architecture is distinct from the physical design, and, in fact, different machine designs might conform to the same computer architecture. In a sense, the architecture is the computer as seen by the user, such as a system programmer. For example, part of the architecture is the set of machine instructions that the computer can recognize and execute. In the mainframe environment, the system software and hardware comprise a highly advanced computer architecture, the result of decades of technological innovation.

Most of this information center teaches the fundamentals of z/OS®, which is IBM's foremost mainframe operating system. It is useful for mainframe students, however, to have a working knowledge of other mainframe operating systems. One reason is that a given mainframe computer might run multiple operating systems. For example, the use of z/OS, z/VM®, and Linux® on the same mainframe is common.

In addition to z/OS, four other operating systems dominate mainframe usage: z/VM, z/VSE™, Linux for System z®, and z/TPF.

o Mainframe operating system: z/OS z/OS, a widely used mainframe operating system, is designed to offer a stable, secure, and continuously available environment for applications running on the mainframe.

o Mainframe operating system: z/VM As a control program, z/Virtual Machine (z/VM) is a hypervisor because it runs other operating systems in the virtual machines it creates.

Page 7: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

MULTIPROCESSOR SYSTEMS

Multiprocessor operating systems are the server operating systems with special features for the communication and the connectivity.

Multiprocessor operating systems are used where multiple CPUs connected into a single system.

Multiprocessor operating system (OS) is almost a regular OS as they also handle system calls, do memory management, provide file system, and also manage input/output devices.

But, there are some extra features available in multiprocessor operating systems, those extra features are listed below:

Process synchronization Resource management Scheduling

Here are the list of some various organizations of multiprocessor operating systems:

Each CPU has its own OS Master-Slave multiprocessors Symmetric multiprocessors

Now let's describe briefly all the above three different-different organizations of multiprocessor operating systems.

Each CPU has its own OS

To statically divide the memory into as many partitions as there are central processing units and given central processing unit its own private memory and its own private copy of the OS is basically the simplest way to organize a multiprocessor OS or multiprocessor operating system.

Master-Slave Multiprocessors

Page 8: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

The master-slave models basically solves almost all the problems of the first model.

In this model, there is a single data structure that keeps track of ready processes.

Now, when a central processing unit goes idle in this model, then it asks the OS for a process to run and it is assigned one.

Symmetric Multiprocessors

Symmetric multiprocessors (SMP) is the third model. In this model, there is one copy of the OS in memory, but any central processing unit can run it.

Now, when a system call is made, then the central processing unit on which the system call was made traps to the kernel and then processes that system call.

This model balances processes and memory dynamically.

Distributed Operating System

Distributed Systems. A distributed system contains multiple nodes that are physically separate but linked together using the network. All the nodes in this system communicate with each other and handle processes in tandem. Each of these nodes contains a small part of the distributed operating system software.

Multiple central processors are used by Distributed systems to serve multiple real-time applications and multiple users. Accordingly, Data processing jobs are distributed among the processors.

Processors communicate with each other through various communication lines (like high-speed buses or telephone lines). These are known as loosely coupled systems or distributed systems. Processors in this system may vary in size and function. They are referred as sites, nodes, computers, and so on.

Advantages With resource sharing facility, a user at one site may be able to use the resources

available at another. Speedup the exchange of data with one another via electronic mail. Failure of one site in a distributed system doesn’t affect the others, the remaining sites

can potentially continue operating. Better service to the customers. Reduction of the load on the host computer. Reduction of delays in data processing.

Clustered systems

They are similar to parallel systems as they both have multiple CPUs. However a major difference is that clustered systems are created by two or more individual computer systems merged together.

Page 9: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

clustered systems are a combination of hardware clusters and software clusters. The hardware clusters help in sharing of high performance disks between the systems. The software clusters makes all the systems work together.

Asymmetric Clustering SystemIn this system, one of the nodes in the clustered system is in hot standby mode and all the others run the required applications. The hot standby node continuously monitors the server and if it fails, the hot standby node takes its place.

Symmetric Clustering System

In symmetric clustering system two or more nodes all run applications as well as monitor each other. This is more efficient than asymmetric system as it uses all the hardware and doesn't keep a node merely as a hot standby.

Benefits of Clustered Systems

Performance - Fault Tolerance – Scalability

Real Time OS:

The real-time operating system used for a real-time application means for those applications where data processing should be done in the fixed and small quantum of time.

RTOS is a time-sharing system based on clock interrupts. Interrupt Service Routine (ISR) serve the interrupt, raised by the system. RTOS used Priority to execute the process.

The primary functions of the real time operating system are to:1. Manage the processor and other system resources to meet the requirements of an application.

2. Synchronize with and respond to the system events.

3. Move the data efficiently among processes and to perform coordination among these processes.

Few more examples of real time processing are:1. Airlines reservation system.

2. Air traffic control system.

HANDHELD OPERATING SYSTEMS

Page 10: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Handheld operating systems are designed to run on machines that have lower speed processors and less memory, they were designed to use less memory and require fewer resources.  Handheld operating systems are also designed to work with different types of hardware than standard desktop operating systems

Examples of mobile device operating systems include Apple iOS, Google Android, Research in Motion's BlackBerry OS, Nokia's Symbian, Hewlett-Packard's webOS (formerly Palm OS) and Microsoft's Windows Phone OS. Some, such as Microsoft's Windows 8, function as both a traditional desktop OS and a mobile operating system.

Migration Of Operating-System Concepts And Features

I/O routine supplied by the system. Memory Management - the system should allocate the memory to many work. CPU Scheduling - the system should select amongst a number of work ready to run. Allocation of devices.

A computer system uses many devices, arranged in different ways to solve many problems. This constitutes a computing environment where many computers are used to process and exchange information to handle multiple issues.

The different types of Computing Environments are:

Let us begin with Personal Computing Environment: Personal Computing EnvironmentIn the personal computing environment, there is a single computer system. All the system processes are available on the computer and executed there. The different devices that constitute a personal computing environment are laptops, mobiles, printers, computer systems, scanners etc.Time Sharing Computing Environment The time sharing computing environment allows multiple users to share the system

simultaneously. Each user is provided a time slice and the processor switches rapidly among the users according to it. Because of this, each user believes that they are the only ones using the system.

Page 11: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Client Server Computing Environment In client server computing, the client requests a resource and the server provides that

resource. A server may serve multiple clients at the same time while a client is in contact with only one server. Both the client and server usually communicate via a computer network but sometimes they may reside in the same system.Distributed Computing Environment

A distributed computing environment contains multiple nodes that are physically separate but linked together using the network. All the nodes in this system communicate with each other and handle processes in tandem. Each of these nodes contains a small part of the distributed operating system software.Cloud Computing Environment

The computing is moved away from individual computer systems to a cloud of computers in cloud computing environment. The cloud users only see the service being provided and not the internal details of how the service is provided. This is done by pooling all the computer resources and then managing them using a software.Cluster Computing Environment

The clustered computing environment is similar to parallel computing environment as they both have multiple CPUs. However a major difference is that clustered systems are created by two or more individual computer systems merged together which then work parallel to each other

Process Schedulers -Definition

The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy.

Process scheduling is an essential part of a Multiprogramming operating systems. Such operating systems allow more than one process to be loaded into the executable memory at a time and the loaded process shares the CPU using time multiplexing.

Process Scheduling Queues

The OS maintains all PCBs in Process Scheduling Queues. The OS maintains a separate queue for each of the process states and PCBs of all processes in the same execution state are placed in the same queue. When the state of a process is changed, its PCB is unlinked from its current queue and moved to its new state queue.

The Operating System maintains the following important process scheduling queues −

Job queue − This queue keeps all the processes in the system.

Ready queue − This queue keeps a set of all processes residing in main memory, ready and waiting to execute. A new process is always put in this queue.

Device queues − The processes which are blocked due to unavailability of an I/O device constitute this queue.

Page 12: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

The OS can use different policies to manage each queue (FIFO, Round Robin, Priority, etc.). The OS scheduler determines how to move processes between the ready and run queues which can only have one entry per processor core on the system; in the above diagram, it has been merged with the CPU.

Two-State Process Model

Two-state process model refers to running and non-running states which are described below −

S.N. State & Description

1 Running

When a new process is created, it enters into the system as in the running state.

2 Not Running

Processes that are not running are kept in queue, waiting for their turn to execute. Each entry in the queue is a pointer to a particular process. Queue is implemented by using linked list. Use of dispatcher is as follows. When a process is interrupted, that process is transferred in the waiting queue. If the process has completed or aborted, the process is discarded. In either case, the dispatcher then selects a process from the queue to execute.

Schedulers

Schedulers are special system software which handle process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run. Schedulers are of three types −

Long-Term Scheduler Short-Term Scheduler

Page 13: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Medium-Term Scheduler

Long Term Scheduler

It is also called a job scheduler. A long-term scheduler determines which programs are admitted to the system for processing. It selects processes from the queue and loads them into memory for execution. Process loads into the memory for CPU scheduling.

The primary objective of the job scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound. It also controls the degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of processes leaving the system.

On some systems, the long-term scheduler may not be available or minimal. Time-sharing operating systems have no long term scheduler. When a process changes the state from new to ready, then there is use of long-term scheduler.

Short Term Scheduler

It is also called as CPU scheduler. Its main objective is to increase system performance in accordance with the chosen set of criteria. It is the change of ready state to running state of the process. CPU scheduler selects a process among the processes that are ready to execute and allocates CPU to one of them.

Short-term schedulers, also known as dispatchers, make the decision of which process to execute next. Short-term schedulers are faster than long-term schedulers.

Medium Term Scheduler

Medium-term scheduling is a part of swapping. It removes the processes from the memory. It reduces the degree of multiprogramming. The medium-term scheduler is in-charge of handling the swapped out-processes.

cooperating processesA running process may become suspended if it makes an I/O request. A suspended processes cannot make any progress towards completion. In this condition, to remove the process from memory and make space for other processes, the suspended process is moved to the secondary storage. This process is called swapping, and the process is said to be swapped out or rolled out. Swapping may be necessary to improve the process mix.

Cooperating processes are those that can affect or are affected by other processes running on the system. Cooperating processes may share data with each other.

Reasons for needing cooperating processesThere may be many reasons for the requirement of cooperating processes. Some of these are given as follows:

Page 14: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

1. Modularity

Modularity involves dividing complicated tasks into smaller subtasks. These subtasks can completed by different cooperating processes. This leads to faster and more efficient completion of the required tasks.

2. Information Sharing

Sharing of information between multiple processes can be accomplished using cooperating processes. This may include access to the same files. A mechanism is required so that the processes can access the files in parallel to each other.

3. Convenience

There are many tasks that a user needs to do such as compiling, printing, editing etc. It is convenient if these tasks can be managed by cooperating processes.

4. Computation Speedup

Subtasks of a single task can be performed parallely using cooperating processes. This increases the computation speedup as the task can be executed faster. However, this is only possible if the system has multiple processing elements.

Methods of CooperationgCooperating processes can coordinate with each other using shared data or messages. Details about these are given as follows:

1. Cooperation by Sharing

The cooperating processes can cooperate with each other using shared data such as memory, variables, files, databases etc. Critical section is used to provide data integrity and writing is mutually exclusive to prevent inconsistent data.

A diagram that demonstrates cooperation by sharing is given as follows:

In the above diagram, Process P1 and P2 can cooperate with each other using shared data such as memory, variables, files, databases etc.

2. Cooperation by Communication

Page 15: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

The cooperating processes can cooperate with each other using messages. This may lead to deadlock if each process is waiting for a message from the other to perform a operation. Starvation is also possible if a process never receives a message.

A diagram that demonstrates cooperation by communication is given as follows:

In the above diagram, Process P1 and P2 can cooperate with each other using messages to communicate.

.

Inter Process Communication (IPC)

A process can be of two type:

Independent process. Co-operating process.

An independent process is not affected by the execution of other processes while a co-operating process can be affected by other executing processes. Though one can think that those processes, which are running independently, will execute very efficiently but in practical, there are many situations when co-operative nature can be utilised for increasing computational speed, convenience and modularity. Inter process communication (IPC) is a mechanism which allows processes to communicate each other and synchronize their actions. The communication between these processes can be seen as a method of co-operation between them. Processes can communicate with each other using these two ways:

1. Shared Memory2. Message passing

The Figure 1 below shows a basic structure of communication between processes via shared memory method and via message passing.

An operating system can implement both method of communication. First, we will discuss the shared memory method of communication and then message passing. Communication between processes using shared memory requires processes to

Page 16: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

share some variable and it completely depends on how programmer will implement it. One way of communication using shared memory can be imagined like this: Suppose process1 and process2 are executing simultaneously and they share some resources or use some information from other process, process1 generate information about certain computations or resources being used and keeps it as a record in shared memory. When process2 need to use the shared information, it will check in the record stored in shared memory and take note of the information generated by process1 and act accordingly. Processes can use shared memory for extracting information as a record from other process as well as for delivering any specific information to other process.Let’s discuss an example of communication between processes using shared memory method.

Deadlock Prevention

Deadlock prevention algorithms ensure that at least one of the necessary conditions (Mutual exclusion, hold and wait, no preemption and circular wait) does not hold true. However most prevention algorithms have poor resource utilization, and hence result in reduced throughputs.

Mutual Exclusion

Not always possible to prevent deadlock by preventing mutual exclusion (making all resources shareable) as certain resources are cannot be shared safely.

Hold and Wait

We will see two approaches, but both have their disadvantages.

Page 17: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

A resource can get all required resources before it start execution. This will avoid deadlock, but will result in reduced throughputs as resources are held by processes even when they are not needed. They could have been used by other processes during this time.

Second approach is to request for a resource only when it is not holing any other resource. This may result in a starvation as all required resources might not be available freely always.

No preemption

We will see two approaches here. If a process request for a resource which is held by another waiting resource, then the resource may be preempted from the other waiting resource. In the second approach, if a process request for a resource which are not readily available, all other resources that it holds are preempted.  

The challenge here is that the resources can be preempted only if we can save the current state can be saved and processes could be restarted later from the saved state.

Circular wait

To avoid circular wait, resources may be ordered and we can ensure that each process can request resources only in an increasing order of these numbers. The algorithm may itself increase complexity and may also lead to poor resource utilization.

 

Deadlock avoidance

As you saw already, most prevention algorithms have poor resource utilization, and hence result in reduced throughputs. Instead, we can try to avoid deadlocks by making use prior knowledge about the usage of resources by processes including resources available, resources allocated, future requests and future releases by processes. Most deadlock avoidance algorithms need every process to tell in advance the maximum number of resources of each type that it may need. Based on all these info we may decide if a process should wait for a resource or not, and thus avoid chances for circular wait.

Page 18: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

If a system is already in a safe state, we can try to stay away from an unsafe state and avoid deadlock. Deadlocks cannot be avoided in an unsafe state. A system can be considered to be in safe state if it is not in a state of deadlock and can allocate resources upto the maximum available. A safe sequence of processes and allocation of resources ensures a safe state. Deadlock avoidance algorithms try not to allocate resources to a process if it will make the system in an unsafe state. Since resource allocation is not done right away in some cases, deadlock avoidance algorithms also suffer from low resource utilization problem.

A resource allocation graph is generally used to avoid deadlocks. If there are no cycles in the resource allocation graph, then there are no deadlocks. If there are cycles, there may be a deadlock. If there is only one instance of every resource, then a cycle implies a deadlock. Vertices of the resource allocation graph are resources and processes. The resource allocation graph has request edges and assignment edges. An edge from a process to resource is a request edge and an edge from a resource to process is an allocation edge. A calm edge denotes that a request may be made in future and is represented as a dashed line. Based on calm edges we can see if there is a chance for a cycle and then grant requests if the system will again be in a safe state.

Consider the image with calm edges as below:

If R2 is allocated to p2 and if P1 request for R2, there will be a deadlock.

Page 19: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

The resource allocation graph is not much useful if there are multiple instances for a resource. In such a case, we can use Banker’s algorithm. In this algorithm, every process must tell upfront the maximum resource of each type it need, subject to the maximum available instances for each type. Allocation of resources is made only, if the allocation ensures a safe state; else the processes need to wait. The Banker’s algorithm can be divided into two parts: Safety algorithm if a system is in a safe state or not. The resource request algorithm make an assumption of allocation and see if the system will be in a safe state. If the new state is unsafe, the resources are not allocated and the data structures are restored to their previous state; in this case the processes must wait for the resource. You can refer to any operating system text books for details of these algorithms.  

 

Deadlock Detection

If deadlock prevention and avoidance are not done properly, as deadlock may occur and only things left to do is to detect the recover from the deadlock.

If all resource types has only single instance, then we can use a graph called wait-for-graph, which is a variant of resource allocation graph. Here, vertices represent processes and a directed edge from P1 to P2 indicate that P1 is waiting for a resource held by P2. Like in the case of  resource allocation graph, a cycle in a wait-for-graph indicate a deadlock. So the system can maintain a wait-for-graph and check for cycles periodically to detect any deadlocks.

The wait-for-graph is not much useful if there are multiple instances for a resource, as a cycle may not imply a deadlock. In such a case, we can use an algorithm similar to Banker’s algorithm to detect deadlock. We can see if further allocations can be made on not based on current allocations. You can refer to any operating system text books for details of these algorithms.

 

Page 20: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Deadlock Recovery

Once a deadlock is detected, you will have to break the deadlock. It can be done through different ways, including, aborting one or more processes to break the circular wait condition causing the deadlock and preempting resources from one or more processes which are deadlocked.

UNIT-II

DISTRIBUTED OPERATING SYSTEMS

Distributed Operating System is one of the important type of operating system.

Multiple central processors are used by Distributed systems to serve multiple real-time applications and multiple users. Accordingly, Data processing jobs are distributed among the processors.

Processors communicate with each other through various communication lines (like high-speed buses or telephone lines). These are known as loosely coupled systems or distributed systems. Processors in this system may vary in size and function. They are referred as sites, nodes, computers, and so on.

Advantages With resource sharing facility, a user at one site may be able to use the resources

available at another.

Speedup the exchange of data with one another via electronic mail.

Failure of one site in a distributed system doesn’t affect the others, the remaining sites can potentially continue operating.

Better service to the customers.

Reduction of the load on the host computer.

Reduction of delays in data processing.

Distributed Operating System is one of the important type of operating system.

Page 21: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Multiple central processors are used by Distributed systems to serve multiple real-time applications and multiple users. Accordingly, Data processing jobs are distributed among the processors.

Processors communicate with each other through various communication lines (like high-speed buses or telephone lines). These are known as loosely coupled systems or distributed systems. Processors in this system may vary in size and function. They are referred as sites, nodes, computers, and so on.

Advantages With resource sharing facility, a user at one site may be able to use the resources

available at another.

Speedup the exchange of data with one another via electronic mail.

Failure of one site in a distributed system doesn’t affect the others, the remaining sites can potentially continue operating.

Better service to the customers.

Reduction of the load on the host computer.

Communication Primitives

• communication primitives o blocking vs. non-blocking o synchronous vs. asynchronous o direct vs. indirect ß remote procedure calls

• motivation

• overview

• binding

• parameter and result passing

• stub generation

• execution semantics

Message passing ß Communication primitives

• send(destination-process, message)

• receive(source-process, message) ß blocking vs. non-blocking primitives

• a message is copied at least three times: sender (user buffer -1-> kernel buffer) -2-> receiver(kernel buffer -3-> user buffer)

• non-blocking - faster, harder to code, riskier, requires additional OS support o send - return as soon as message copied to kernel buffer o receive - provide a (user) buffer for message to be copied to and return

• blocking - safer, easier to think about, slower o unreliable - block until message is sent/received o reliable - receipt is confirmed by acknowledgement, block until ack is sent/received

Page 22: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Direct vs indirect communication

Direct communication — explicitly name the process you’re communicating with o send(destination-process, message) o receive(source-process, message)

• Link is associated with exactly two processes o Between any two processes, there exists at most one link o The link may be unidirectional, but is usually bidirectional ß Indirect communication — communicate using mailboxes (ports) (usually) owned by receiver o send(mailbox, message) o receive(mailbox, message)

• Link is associated with two or more processes that share a mailbox o Between any two processes, there may be a number of links o The link may be either unidirectional or bidirectional

Lamport Logical clocksThe algorithm of Lamport timestamps is a simple algorithm used to determine the order of events in a distributed computer system. As different nodes or processes will typically not be perfectly synchronized, this algorithm is used to provide a partial ordering of events with minimal overhead, and conceptually provide a starting point for the more advanced vector clock method. They are named after their creator, Leslie Lamport.

Distributed algorithms such as resource synchronization often depend on some method of ordering events to function. For example, consider a system with two processes and a disk. The processes send messages to each other, and also send messages to the disk requesting access. The disk grants access in the order the messages were sent. For example process 

sends a message to the disk requesting write access, and then sends a read instruction message to process . Process  receives the message, and as a result sends its own read request message to the disk. If there is a timing delay causing the disk to receive both messages at the same time, it can determine which message happened-before the other:  happens-before  if one can get from  to  by a sequence of moves of two types: moving forward while remaining in the same process, and following a message from its sending to its reception. A logical clock algorithm provides a mechanism to determine facts about the order of such events.

Lamport invented a simple mechanism by which the happened-before ordering can be captured numerically. A Lamport logical clock is a numerical software counter value maintained in each process.

Conceptually, this logical clock can be thought of as a clock that only has meaning in relation to messages moving between processes. When a process receives a message, it re-synchronizes its logical clock with that sender. The above-mentioned vector clock is a generalization of the idea into the context of an arbitrary number of parallel, independent processes.

The algorithm follows some simple rules:

1. A process increments its counter before each event in that process;2. When a process sends a message, it includes its counter value with the message;3. On receiving a message, the counter of the recipient is updated, if necessary, to the

greater of its current counter and the timestamp in the received message. The counter is then incremented by 1 before the message is considered received.[1]

In pseudocode, the algorithm for sending is:

# event is knowntime = time + 1;

Page 23: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

# event happenssend(message, time);

The algorithm for receiving a message is:

(message, time_stamp) = receive();time = max(time_stamp, time) + 1;

n a distributed system, it is not possible in practice to synchronize time across entities (typically thought of as processes) within the system; hence, the entities can use the concept of a logical clock based on the events through which they communicate.

If two entities do not exchange any messages, then they probably do not need to share a common clock; events occurring on those entities are termed as concurrent events.

Among the processes on the same local machine we can order the events based on the local clock of the system.

When two entities communicate by message passing, then the send event is said to happen-before the receive event, and the logical order can be established among the events.

A distributed system is said to have partial order if we can have a partial order relationship among the events in the system. If 'totality', i.e., causal relationship among all events in the system, can be established, then the system is said to have total order.

A single entity cannot have two events occur simultaneously. If the system has total order we can determine the order among all events in the system. If the system has partial order between processes, which is the type of order Lamport's logical clock provides, then we can only tell the ordering between entities that interact. Lamport addressed ordering two events with the same

timestamp (or counter): "To break ties, we use any arbitrary total ordering   of the processes."[1] Thus two timestamps or counters may be the same within a distributed system, but in applying the logical clocks algorithm events that occur will always maintain at least a strict partial ordering.

Lamport clocks lead to a situation where all events in a distributed system are totally ordered. That is, if , then we can say  actually happened before .Note that with Lamport’s clocks, nothing can be said about the actual time of  and . If the logical clock says , that does not mean in reality that  actually happened before  in terms of real time.Lamport clocks show non-causality, but do not capture all causality. Knowing  and  shows  did not cause  or  but we cannot say which

initiated  .

This kind of information can be important when trying to replay events in a distributed system (such as when trying to recover after a crash). If one node goes down, and we know the causal relationships between messages, then we can replay those messages and respect the causal relationship to get that node back up to the state it needs to be in.

Distributed Deadlock issues

Based on WFG (not GRG)

Nodes are processes

Page 24: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Resources are located at a site, but may be held by processes at other sites Edge (P,Q) indicates P is blocked and waiting for Q to release some

resource Deadlock exists iff there is a directed cycle or knot.

The text fudges a bit by forgetting that in some models the existence of a cycle is necessary but not sufficient, and the existence of a knot is sufficient but not necessary, leaving a gap.

Distributed Deadlock Handling Strategies

Deadlock preventiono All resource at once.o Preventing a process from holding while waitingo inefficient, can become deadlocked at resource acquiring phase,

resource requirements are unpredictable -- not an efficient, universal solution.

Deadlock avoidanceo A resource is granted to a process if the resulting state is safeo Every site has to maintain the global stateo The checking for a safe state must be done with mutual exclusiono The number of processes and resources in a distributed system is

largeo Not a practical solution

Deadlock detectiono Once deadlock, always deadlock -- detection won't be outdatedo deadlock detection can be preceed concurrently with normal

activitieso This is the usual approach -- the focus of this Chapter

Distributed Deadlock Detection Issues

issueso maintenance of WFGo detection of cycles (or knots) in the WFG

requirementso progress = no undetected deadlockso safety = no false deadlocks

What do we do when a deadlock is detected?

Page 25: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Categorization of Methods

centralized control distributed control hierarchical control

Simple Centralized Control

one control site maintains the WFG and checks for deadlock other sites send request and release messages to control site

What are the advantages and disadvantages?

If we try to improve this algorithm by having each site maintaining its own WFG locally and sending the information to the control site periodically, we may have false deadlocks:

False Deadlock Example

Two transactions run concurrently:

T1: lock R1T2: lock R1

T1: unlock R1

T2: unlock R1

T1: lock R2

T2: lock R2

T1: unlock R2T2: unlock R2

Design Issues of Distributed System

The distributed information system is defined as “a number of interdependent computers linked by a network for sharing information among them”. A distributed information system consists of multiple autonomous computers that communicate or exchange information through a computer network.

Design issues of distributed system –1. Heterogeneity : Heterogeneity is applied to the network, computer hardware,

operating system and implementation of different developers. A key component of the heterogeneous distributed system client-server environment is middleware. Middleware is a set of service that enables application and end-user to interacts with each other across a heterogeneous distributed system.

2. Openness: The openness of the distributed system is determined primarily by the degree to which new resource sharing services can be made available to the users. Open systems are characterized by the fact that their key interfaces are published. It is based on a uniform communication mechanism and published interface for access to shared resources. It can be constructed from heterogeneous hardware and software.

3. Scalability: Scalability of the system should remain efficient even with a significant increase in the number of users and resources connected.

4. Security : Security of information system has three components Confidentially, integrity and availability. Encryption protects shared resources, keeps sensitive information secrets when transmitted.

Page 26: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

5. Failure Handling : When some faults occur in hardware and the software program, it may produce incorrect results or they may stop before they have completed the intended computation so corrective measures should to implemented to handle this case.Failure handling is difficult in distributed systems because the failure is partial i, e, some components fail while others continue to function.

6. Concurrency: There is a possibility that several clients will attempt to access a shared resource at the same time. Multiple users make requests on the same resources, i.e read, write, and update. Each resource must be safe in a concurrent environment. Any object that represents a shared resource a distributed system must ensure that it operates correctly in a concurrent environment.

7. Transparency : Transparency ensures that the distributes system should be perceived as the single entity by the users or the application programmers rather than the collection of autonomous systems, which is cooperating. The user should be unaware of where the services are located and the transferring from a local machine to a remote one should be transparent.

Sun’s Network File System:

Sun’s Network File System:The earliest successful distributed system could be attributed to Sun Microsystems, which developed the Network File System (NFS). NFSv2 was the standard protocol followed for many years, designed with the goal of simple and fast server crash recovery. This goal is of utmost importance in multi-client and single-server based network architectures because a single instant of server crash means that all clients are unserviced. The entire system goes down.Stateful protocols make things complicated when it comes to crashes. Consider a client A trying to access some data from the server. However, just after the first read, the server crashed. Now, when the server is up and running, client A issues the second read request. However, the server does not know which file the client is referring to, since all that information was temporary and lost during the crash.Stateless protocols come to our rescue. Such protocols are designed so as to not store any state information in the server. The server is unaware of what the clients are doing — what blocks they are caching, which files are opened by them and where their current file pointers are. The server simply delivers all the information that is required to service a client request. If a server crash happens, the client would simply have to retry the request. Because of their simplicity, NFS implements a stateless protocol.File Handles:NFS uses file handles to uniquely identify a file or a directory that the current operation is being performed upon. This consists of the following components:

Volume Identifier – An NFS server may have multiple file systems or partitions. The volume identifier tells the server which file system is being referred to.

Page 27: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Inode Number – This number identifies the file within the partition. Generation Number – This number is used while reusing an inode number.

File Attributes:“File attributes” is a term commonly used in NFS terminology. This is a collective term for the tracked metadata of a file, including file creation time, last modified, size, ownership permissions etc. This can be accessed by calling stat() on the file.

Introduction

The Coda distributed file system is a state of the art experimental file system developed in the group of M. Satyanarayanan at Carnegie Mellon University. Numerous people contributed to Coda which now incorporates many features not found in other systems:Mobile Computing 

disconnected operation for mobile clientso reintegration of data from disconnected clientso bandwidth adaptation

Failure Resilienceo read/write replication serverso resolution of server/server conflictso handles of network failures which partition the serverso handles disconnection of clients client

Performance and scalabilityo client side persistent caching of files, directories and attributes for

high performanceo write back caching

Securityo kerberos like authenticationo access control lists (ACL's)

Well defined semantics of sharing Freely available source code

Page 28: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Fig 1: Coda Logo (Illustration by Gaich Muramatsu)

Maybe you are baffled by some of the terms, so let's take a tour.

UNIT-III

Real-Time Operating System

Real-time operating system (RTOS) is an operating system intended to serve real time application that process data as it comes in, mostly without buffer delay. The full form of RTOS is Real time operating system.

Page 29: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

In a RTOS, Processing time requirement are calculated in tenths of seconds increments of time. It is time-bound system that can be defined as fixed time constraints. In this type of system, processing must be done inside the specified constraints. Otherwise, the system will fail.

Components of RTOS

The Scheduler: This component of RTOS tells that in which order, the tasks can be executed which is generally based on the priority.

Symmetric Multiprocessing (SMP): It is a number of multiple different tasks that can be handled by the RTOS so that parallel processing can be done.

Function Library: It is an important element of RTOS that acts as an interface that helps you to connect kernel and application code. This application allows you to send the requests to the Kernel using a function library so that the application can give the desired results.

Memory Management: this element is needed in the system to allocate memory to every program, which is the most important element of the RTOS.

Page 30: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Fast dispatch latency: It is an interval between the termination of the task that can be identified by the OS and the actual time taken by the thread, which is in the ready queue, that has started processing.

User-defined data objects and classes: RTOS system makes use of programming languages like C or C++, which should be organized according to their operation.

Types of RTOS

Three types of RTOS systems are:

Hard Real Time :

In Hard RTOS, the deadline is handled very strictly which means that given task must start executing on specified scheduled time, and must be completed within the assigned time duration.

Example: Medical critical care system, Aircraft systems, etc.

Firm Real time:

These type of RTOS also need to follow the deadlines. However, missing a deadline may not have big impact but could cause undesired affects, like a huge reduction in quality of a product.

Example: Various types of Multimedia applications.

Soft Real Time:

Soft Real time RTOS, accepts some delays by the Operating system. In this type of RTOS, there is a deadline assigned for a specific job, but a delay for a small amount of time is acceptable. So, deadlines are handled softly by this type of RTOS.

Example: Online Transaction system and Livestock price quotation System.

Terms used in RTOS

Here, are essential terms used in RTOS:

Page 31: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Task – A set of related tasks that are jointly able to provide some system functionality.

Job – A job is a small piece of work that can be assigned to a processor, and that may or may not require resources.

Release time of a job – It's a time of a job at which job becomes ready for execution.

Execution time of a job: It is time taken by job to finish its execution. Deadline of a job: It's time by which a job should finish its execution. Processors: They are also known as active resources. They are important

for the execution of a job. Maximum It is the allowable response time of a job is called its relative

deadline. Response time of a job: It is a length of time from the release time of a

job when the instant finishes. Absolute deadline: This is the relative deadline, which also includes its

release time.

Features of RTOS

Here are important features of RTOS:

Occupy very less memory Consume fewer resources Response times are highly predictable Unpredictable environment The Kernel saves the state of the interrupted task ad then determines

which task it should run next. The Kernel restores the state of the task and passes control of the CPU for

that task.

Factors for selecting an RTOS

Here, are essential factors that you need to consider for selecting RTOS:

Performance: Performance is the most important factor required to be considered while selecting for a RTOS.

Middleware: if there is no middleware support in Real time operating system, then the issue of time-taken integration of processes occurs.

Error-free: RTOS systems are error-free. Therefore, there is no chance of getting an error while performing the task.

Page 32: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Embedded system usage: Programs of RTOS are of small size. So we widely use RTOS for embedded systems.

Maximum Consumption: we can achieve maximum Consumption with the help of RTOS.

Task shifting: Shifting time of the tasks is very less. Unique features: A good RTS should be capable, and it has some extra

features like how it operates to execute a command, efficient protection of the memory of the system, etc.

24/7 performance: RTOS is ideal for those applications which require to run 24/7.

Difference between in GPOS and RTOS

Here are important differences between GPOS and RTOS:

General-Purpose Operating System (GPOS)

Real-Time Operating System (RTOS)

It used for desktop PC and laptop. It is only applied to the embedded application.

Process-based Scheduling. Time-based scheduling used like round-robin scheduling.

Interrupt latency is not considered as important as in RTOS.

Interrupt lag is minimal, which is measured in a few microseconds.

No priority inversion mechanism is present in the system.

The priority inversion mechanism is current. So it can not modify by the system.

Kernel's operation may or may not be preempted.

Kernel's operation can be preempted.

Priority inversion remain unnoticed No predictability guarantees

Page 33: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Applications of Real Time Operating System

Real-time systems are used in:

Airlines reservation system. Air traffic control system. Systems that provide immediate updating. Used in any system that provides up to date and minute information on

stock prices. Defense application systems like RADAR. Networked Multimedia Systems Command Control Systems Internet Telephony Anti-lock Brake Systems Heart Pacemaker

Disadvantages of RTOS

Here, are drawbacks/cons of using RTOS system:

RTOS system can run minimal tasks together, and it concentrates only on those applications which contain an error so that it can avoid them.

RTOS is the system that concentrates on a few tasks. Therefore, it is really hard for these systems to do multi-tasking.

Specific drivers are required for the RTOS so that it can offer fast response time to interrupt signals, which helps to maintain its speed.

Plenty of resources are used by RTOS, which makes this system expensive.

The tasks which have a low priority need to wait for a long time as the RTOS maintains the accuracy of the program, which are under execution.

Minimum switching of tasks is done in Real time operating systems. It uses complex algorithms which is difficult to understand. RTOS uses lot of resources, which sometimes not suitable for the system.

Tasks in Real Time systems

The system is subjected to real time, i.e. response should be guaranteed within a specified timing constraint or system should meet the specified deadline. For example flight control system, real-time monitors etc.There are two types of tasks in real-time systems:

1. Periodic tasks

Page 34: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

2. Dynamic tasks Periodic Tasks: In periodic task, jobs are released at regular intervals. A periodic task

is one which repeats itself after a fixed time interval. A periodic task is denoted by five tuples: Ti = < Φi, Pi, ei, Di >Where,

Φi – is the phase of the task. Phase is release time of the first job in the task. If the phase is not mentioned then release time of first job is assumed to be zero.

Pi – is the period of the task i.e. the time interval between the release times of two consecutive jobs.

ei – is the execution time of the task. Di – is the relative deadline of the task.

For example: Consider the task Ti with period = 5 and execution time = 3Phase is not given so, assume the release time of the first job as zero. So the job of this task is first released at t = 0 then it executes for 3s and then next job is released at t = 5 which executes for 3s and then next job is released at t = 10. So jobs are released at t = 5k where k = 0, 1, . . ., n

Hyper period of a set of periodic tasks is the least common multiple of periods of all the tasks in that set. For example, two tasks T1 and T2 having period 4 and 5 respectively will have a hyper period, H = lcm(p1, p2) = lcm(4, 5) = 20. The hyper period is the time after which pattern of job release times starts to repeat.

Dynamic Tasks: It is a sequential program that is invoked by the occurrence of an event. An event may be generated by the processes external to the system or by processes internal to the system. Dynamically arriving tasks can be categorized on their criticality and knowledge about their occurrence times.

1. Aperiodic Tasks: In this type of task, jobs are released at arbitrary time intervals i.e. randomly. Aperiodic tasks have soft deadlines or no deadlines.

2. Sporadic Tasks: They are similar to aperiodic tasks i.e. they repeat at random instances. The only difference is that sporadic tasks have hard deadlines. A speriodic task is denoted by three tuples: Ti =(ei, gi, Di)Whereei – the execution time of the task.gi – the minimum separation between the occurrence of two consecutive instances of the task.Di – the relative deadline of the task.

Page 35: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

UNIT-IV

A handheld computer is a computer that can conveniently be stored in a pocket (of sufficient size) and used while you're holding it. Today's handheld computers, which are also called personal digital assistants (PDAs), can be divided into those that accept handwriting as input and those with small keyboards. The original handheld that accepted handwriting was Apple's Newton, which was later withdrawn from the market. Today, the most popular handheld that accepts handwritten input is the PalmPilot from 3Com. Philips, Casio, NEC, Compaq, and other companies make handhelds with small keyboards.

Handheld computers are typically used for personal information manager (PIM) types of applications: maintaining schedules, keeping names and phone numbers, doing simple calculations, taking notes, and, with a modem, exchanging e-mail and getting information from the Web. Keyboards have tiny keys that take getting used to. Those that handle handwriting also impose constraints and require some learning. Nevertheless, this class of computer is widely sold and appreciated by many users.

Hewlett-Packard has recently introduced the first handheld computer with a color display. A number of companies now combine voice and data telephone service using cellular telephone or other wireless technologies with the handheld computer in a single device.

Handheld computers—also known as personal digital assistants (PDAs)—are small, portable devices that offer users many of the same features and capabilities as desktop computers at a fraction of the size. Although the terms "handheld computer" and "PDA" are often used interchangeably, handhelds tend to be larger and feature miniature keyboards, while PDAs tend to be smaller and rely on a touch screen and stylus for data entry.

Since their introduction in the late 1990s, hand-held computers have become standard equipment for many professionals, providing them with tiny, versatile electronic alternatives to paper day planners. "Once the domain of early adopting gadget lovers, handhelds now organize and update millions of mobile business professionals," reports Mike Brown at HandheldComputerDepot.com. Users have found PDAs to be particularly helpful tools for organizing and maintaining personal

Page 36: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

data, such as address books, appointment calendars, project lists, and expense reports. Later incarnations of the technology have also offered users mobile access to electronic mail, news, and entertainment through connectivity to the Internet.

When shopping for a handheld computer, experts recommend that users start by identifying their needs. They should consider, for example, whether they require only personal information management (PIM) functions, or whether they also wish to take notes during meetings, download e-mail and other information from the Internet, and connect with other users through a company computer network. Considering such needs, as well as the available budget, will help users decide among the basic options in handheld computers, including size, display, memory, operating system, and power source.

The size of handheld computers ranges from credit card to small notebook computer, and the available features and power generally increase with greater size. The most popular size for the devices is palm size-which falls somewhere between a calculator and a paperback book. Most handheld computers utilize a liquid crystal display (LCD), which acts as both an input and an output device. Only the larger PDAs feature keyboards, and most others require users to enter information on a touch screen, either by tapping letters with a stylus or by writing letters on the screen, which the device interprets using handwriting-recognition software. In the future, many handheld units are expected to incorporate voice-recognition technology.

Many handheld computers are designed to work closely with a desktop computer or network. In order to maintain up-to-date information in both places, a process known as synchronizing data must occur—users must perform frequent uploads and downloads between their PDA and desktop systems. This process can take place through cables, wireless connections, or over telephone lines via modem. Rather than down-loading from PCs, however, some of the more sophisticated handheld devices allow users to connect directly to the Internet for downloading e-mail, Web magazines and news services, and audio programs.

In an article for Computerworld, Matt Hamblen and Sharon Gaudin warned that many corporate information technology (IT) managers were unprepared to deal with the proliferation of handheld computers among employees. They found that some companies ignored the devices, while others simply banned them from connecting to corporate networks. Instead, Hamblen and Gaudin recommended that IT managers embrace the new technology, helping employees choose products and find ways to use them to increase productivity. They argued that businesses should take an active role in deciding which handheld platforms and software applications their networks will support. They cautioned that businesses should also be aware of the security threats posed by handheld devices and take steps to protect the corporate network by establishing software synchronization standards.

Experts predict that the next evolution in hand-held computers will be the "smartphone," which combines the most popular functions of PDAs (storing addresses and phone numbers, taking down notes or messages, and browsing the Internet remotely) with wireless phone service. Some analysts believe that the market for straightforward PDAs has become saturated. They claim that future growth will come in the form of phone units, because users will no longer be willing to carry both a PDA and a cellular phone.

Page 37: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

P

PALM OSPalm OS (also known as Garnet OS) is a discontinued mobile operating system initially developed by Palm, Inc., for personal digital assistants (PDAs) in 1996. Palm OS was designed for ease of use with a touchscreen-based graphical user interface. It is provided with a suite of basic applications for personal information management. Later versions of the OS have been extended to support smartphones. Several other licensees have manufactured devices powered by Palm OS.

Following Palm's purchase of the Palm trademark, the currently licensed version from ACCESS was renamed Garnet OS. In 2007, ACCESS introduced the successor to Garnet OS, called Access Linux Platform and in 2009, the main licensee of Palm OS, Palm, Inc., switched from Palm OS to webOS for their forthcoming devices.

OVERVIEWPalm OS is a proprietary mobile operating system. Designed in 1996 for Palm Computing, Inc.'s new Pilot PDA, it has been implemented on a wide array of mobile devices, including smartphones, wrist watches, handheld gaming consoles, barcode readers and GPS devices.

Palm OS versions earlier than 5.0 run on Motorola/Freescale DragonBall processors. From version 5.0 onwards, Palm OS runs on ARM architecture-based processors.

The key features of the current Palm OS Garnet are:

Simple, single-tasking environment to allow launching of full screen applications with a basic, common GUI set

Monochrome or color screens with resolutions up to 480x320 pixel Handwriting recognition  input system called Graffiti 2 HotSync technology for data synchronization with desktop computers Sound playback and record capabilities Simple security model: Device can be locked by password, arbitrary application records can

be made private TCP/IP  network access Serial port /USB, infrared, Bluetooth and Wi-Fi connections Expansion memory card support Defined standard data format for personal information management applications to store

calendar, address, task and note entries, accessible by third-party applications.

Included with the OS is also a set of standard applications, with the most relevant ones for the four mentioned PIM operations.

It is a dropped mobile operating system and digital platform developed for smartphones. It was initially developed for a closed-source operating system for personal digital assistant in 1988 by Symbian Ltd. It was used by many popular brands named as Samsung, Sony Ericsson, Nokia, etc. The OS of Symbian contains two components: microkernel   and user interface. The Symbian OS was written in C++ language. Various versions of Symbian OS:

EPOC32(Electronic Piece of Cheese) Symbian OS 6.0 and 6.1 Symbian OS 6.2 Symbian OS 7.0 Symbian OS 7.0 Symbian OS 8.0 Symbian OS 9.1

Page 38: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Symbian OS 9.3 Symbian OS 9.5

Evolution Of Symbian: Symbian was begun from EPOC32. It was developed by Psion in the 1990s. In 1998, Psion software turns into Symbian Ltd. and established a partnership with Nokia, Sony Ericsson, and Motorola. After that Symbian OS goes under several different software platforms was created for Symbian with the help of these big companies. They incorporate S60(for Nokia, LG, and Samsung), UIQ(Ericsson and Motorola) and MOAP(for Japanese only). Symbian cover 67% of the global market of the smartphone in 2006. Nokia was the biggest shareholder of Symbian. In 2008, Nokia takes over Symbian Ltd. and established a new non- profit organization named as Symbian foundation. In 2010 Apple launched its iPhone and Google launched its Android Os, which continuously decreasing the popularity of Symbian. In 2012 Nokia launched the last Symbian smartphone named as Nokia808 PureView. In 2014 Nokia breaks its all ties with Symbian.

Symbian OS: 

Symbian OS contained a browser, messaging, multimedia, communication protocol, mobile telephony, data synchronization, security, application environment, multi-tasking, robustness, flexible.

Advantages of Symbian OS: Symbian OS provieds open platform to enable independent technology and software

vendros to develop third party app. Symbian allowed impressive battery life. Symbian required lower hardware requirments.

Disadvantages of Symbian OS Symbian OS is dependent on Nokia Major drawback of Symbian os is it provided a late response as compared to ios and

Android. The touch of Symbian use devices are not as smooth as compared to ios and android

devices.

Page 39: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Android - ArchitectureAndroid operating system is a stack of software components which is roughly divided into five sections and four main layers as shown below in the architecture diagram.

Linux kernel

At the bottom of the layers is Linux - Linux 3.6 with approximately 115 patches. This provides a level of abstraction between the device hardware and it contains all the essential hardware drivers like camera, keypad, display etc. Also, the kernel handles all the things that Linux is really good at such as networking and a vast array of device drivers, which take the pain out of interfacing to peripheral hardware.

Libraries

On top of Linux kernel there is a set of libraries including open-source Web browser engine WebKit, well known library libc, SQLite database which is a useful repository for storage and sharing of application data, libraries to play and record audio and video, SSL libraries responsible for Internet security etc.

Android Libraries

This category encompasses those Java-based libraries that are specific to Android development. Examples of libraries in this category include the application framework libraries in addition to those that facilitate user interface building,

Page 40: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

graphics drawing and database access. A summary of some key core Android libraries available to the Android developer is as follows −

android.app − Provides access to the application model and is the cornerstone of all Android applications.

android.content − Facilitates content access, publishing and messaging between applications and application components.

android.database − Used to access data published by content providers and includes SQLite database management classes.

android.opengl − A Java interface to the OpenGL ES 3D graphics rendering API.

android.os − Provides applications with access to standard operating system services including messages, system services and inter-process communication.

android.text − Used to render and manipulate text on a device display.

android.view − The fundamental building blocks of application user interfaces.

android.widget − A rich collection of pre-built user interface components such as buttons, labels, list views, layout managers, radio buttons etc.

android.webkit − A set of classes intended to allow web-browsing capabilities to be built into applications.

Having covered the Java-based core libraries in the Android runtime, it is now time to turn our attention to the C/C++ based libraries contained in this layer of the Android software stack.

Android Runtime

This is the third section of the architecture and available on the second layer from the bottom. This section provides a key component called Dalvik Virtual Machine which is a kind of Java Virtual Machine specially designed and optimized for Android.

The Dalvik VM makes use of Linux core features like memory management and multi-threading, which is intrinsic in the Java language. The Dalvik VM enables every Android application to run in its own process, with its own instance of the Dalvik virtual machine.

The Android runtime also provides a set of core libraries which enable Android application developers to write Android applications using standard Java programming language.

Application Framework

The Application Framework layer provides many higher-level services to applications in the form of Java classes. Application developers are allowed to make use of these services in their applications.

The Android framework includes the following key services −

Activity Manager − Controls all aspects of the application lifecycle and activity stack.

Page 41: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Content Providers − Allows applications to publish and share data with other applications.

Resource Manager − Provides access to non-code embedded resources such as strings, color settings and user interface layouts.

Notifications Manager − Allows applications to display alerts and notifications to the user.

View System − An extensible set of views used to create application user interfaces.

Applications

You will find all the Android application at the top layer. You will write your application to be installed on this layer only. Examples of such applications are Contacts Books, Browser, Games etc.

Palm OS 1.0Palm OS 1.0 is the original version present on the Pilot 1000 and 5000. It was introduced in March 1996.

Version 1.0 features the classic PIM applications Address, Date Book, Memo Pad, and To Do List. Also included is a calculator and the Security tool to hide records for private use.

Palm OS 1.0 does not differentiate between RAM and file system storage. Applications are installed directly into RAM and executed in place. As no dedicated file system is supported, the operating system depends on constant RAM refresh cycles to keep its memory. The OS supports 160x160 monochrome output displays. User input is generated through the Graffiti handwriting recognition system or optionally through a virtual keyboard. The system supports data synchronization to another PC via its HotSync technology over a serial interface. The latest bugfix release is version 1.0.7.

Palm OS 2.0Palm OS 2.0 was introduced on March 10, 1997 with the PalmPilot Personal and Professional.[14] This version adds TCP/IP network, network HotSync, and display backlight support. The last bugfix release is version 2.0.5.

Two new applications, Mail and Expense are added, and the standard PIM applications have been enhanced.

Palm OS 3.0Palm OS 3.0 was introduced on March 9, 1998 with the launch of the Palm III series.[15] This version adds IrDA infrared and enhanced font support. This version also features updated PIM applications and an update to the application launcher.

Palm OS 3.1 adds only minor new features, like network HotSync support. It was introduced with the Palm IIIx and Palm V.[16] The last bugfix release is version 3.1.1.

Palm OS 3.2 adds Web Clipping support, which is an early Palm-specific solution to bring web-content to a small PDA screen. It was introduced with the Palm VII organizer.

Palm OS 3.3 adds faster HotSync speeds and the ability to do infrared hotsyncing. It was introduced with the Palm Vx organizer.

Palm OS 3.5 is the first version to include native 8-bit color support. It also adds major convenience features that simplify operation, like a context-sensitive icon-bar or simpler menu activation. The datebook application is extended with an additional agenda view. This version was first introduced with the Palm IIIc device.[17] The latest bugfix release is version 3.5.3.

Page 42: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

As a companion, Palm later offered a Mobile Internet Kit software upgrade for Palm OS 3.5.[18] This included Palm's Web Clipping software, MultiMail (which was later renamed to VersaMail) Version 2.26 e-mail software, handPHONE Version 1.3 SMS software, and Neomar Version 1.5 WAP browser.

Palm OS 4.0Palm OS 4.0 was released with the new Palm m500 series on March 19, 2001.[19] This version adds a standard interface for external file system access (such as SD cards). External file systems are a radical change to the operating system's previous in-place execution. Now, application code and data need to be loaded into the device's RAM, similar to desktop operating system behavior. A new Universal Connector with USB support is introduced. The previous optional Mobile Internet Kit is now part of the operating system. Version 4.0 adds an attention manager to coordinate information from different applications, with several possibilities to get the user's attention, including sound, LED blinking or vibration. 16-bit color screens and different time zones are supported. This version also has security and UI enhancements.

Palm OS 4.1 is a bugfix release. It was introduced with the launch of the Palm i705. The later minor OS update to version 4.1.2 includes a backport of Graffiti 2 from Palm OS 5.2.

Palm OS 4.2 Simplified Chinese Edition is targeted especially for the Chinese market with fully Simplified Chinese support, co-released with Palm OS 5.3. No device has been manufactured with this version up to now.

Palm OS 5 (Garnet)Palm OS 5 (not called 5.0) was unveiled by the Palm subsidiary PalmSource in June 2002 [20] and first implemented on the Palm Tungsten T. It is the first version to support ARM devices and replaced the Kadak AMX68000 kernel with the custom MCK kernel, named for its developer, that was written in-house by Palm.[21] Applications written for the prior OS versions use the older DragonBall 68K instruction set and are supported via the Palm Application Compatibility Environment (PACE) emulator in Garnet. Even with the additional overhead of PACE, Palm applications usually run faster on ARM devices than on previous generation hardware. New software can take advantage of the ARM processors with small units of ARM code, referred to as ARMlets.

With a more powerful hardware basis, Palm OS 5 adds substantial enhancements for multimedia capabilities. High density 320x320 screens are supported together with a full digital sound playback and record API. Palm's separate Bluetooth stack is added together with an IEEE 802.11b Wi-Fi stack. Secure network connections over SSL are supported. The OS can be customized with different color schemes.

For Palm OS 5, PalmSource developed and licensed a web browser called PalmSource Web Browser[22] based on ACCESS' NetFront 3.0 browser.

Palm OS 5.2 is mainly a bugfix release, first implemented in the Samsung SGH-i500 in March 2003.[23] It added support for 480x320 resolutions and introduced the new handwriting input system called Graffiti 2; the new input system was prompted by Xerox' lawsuit win against Palm. Graffiti 2 is based on Jot from CIC. The last bugfix release is version 5.2.8.

Palm OS 5.3 Simplified Chinese Edition released in September 2003, added full Simplified Chinese support,[24] further support for QVGA resolutions, and a standard API for virtual Graffiti called Dynamic Input Area. This version first shipped on Lenovo's P100 and P300 handhelds.[25]

Palm OS Garnet (5.4) added updated Bluetooth libraries and support for multiple screen resolutions ranging from 160x160 up to 480x320. It first shipped on the Treo 650 in November 2004. This version also introduced the Garnet moniker to distinguish it from Palm OS Cobalt 6.0. The last bugfix release is version 5.4.9.

Garnet OS 5.5 dropped the Palm moniker[26] and, as of 2007, is the current version developed by ACCESS. This version is dedicated for use inside the Garnet VM virtual machine.

Page 43: hicasbscit.files.wordpress.com  · Web viewUnit No. Topics. Hours. I. Basics of Operating Systems: An Operating System – Main frame Systems – Desktop Systems – Multiprocessor

Garnet VM was announced and released by ACCESS in November 2007[27] as a core part of the Access Linux Platform and as an emulator allowing Nokia Internet Tablets to run applications written for the Garnet OS. In June 2010, ACCESS release Garnet VM version 6 (a.k.a. Garnet VM Beta 6 1.05b).[28]

Palm OS CobaltPalm OS Cobalt (6.0) was the designated successor for Palm OS 5. It was introduced on February 10, 2004,[29] but is no longer offered by ACCESS (see next section). Palm OS 6.0 was renamed to Palm OS Cobalt to make clear that this version was initially not designated to replace Palm OS 5, which adopted the name Palm OS Garnet at the same time.

Palm OS Cobalt introduced modern operating system features to an embedded operating system based on a new kernel with multitasking and memory protection, a modern multimedia and graphic framework (derived from Palm's acquired BeOS), new security features, and adjustments of the PIM file formats to better cooperate with Microsoft Outlook.

Palm OS Cobalt 6.1[30] presented standard communication libraries for telecommunication, Wi-Fi, and Bluetooth connectivity. Despite other additions, it failed to interest potential licensees to Palm OS Cobalt.