1 Introduction to Operating Systems Syllabus: What is an OS, mainframe systems, desktop systems, multiprocessor system, distributed system, clustered system

, real time system, handheld system, feature migration, & computing environments. What is an OS? Introduction: A computer system’s components are its hardware, software and data. The hardware consists of the CPU: the central processing unit, the memory and the I/O devices. They form the basic computing devices. S/W consists of the application programs, compilers etc. The data is the one given from keyboard or input device which gets manipulated by the computer after which the result of its manipulation is seen on the screen or output device. These resources have to be used to solve the users problem. In general the four components of the computer system is the h/w, application programs, OS and the users. We need somebody to coordinate all of the computer’s individual components. The abstract view of the computer system is as follows:
User 1 User 2 User 3

……………..

User n

Compiler

assembler

editor ……………………………………..d/b

Operating system

Computer H/W

Definition: • OS is a program that acts as an intermediary between the user and the computer hardware. • OS is a program that implements an abstract view by acting as an intermediary between the user and the computer system. • OS is a set of programs implemented in either software of firmware that make the hardware usable. • OS is the means for controlling resources and bringing about a communication between the outside world/user/operator in accordance with the policies set by the individual or organization controlling the computer system. • OS is the program running at all times on the computer with all others being application programs. Need for OS? To manage the computer system h/w, s/w, data and communication with outside world. To hide the hardware details, I/O operations and program execution of the computer from the user. OS Goals: 1. Provide convenience to the user. Provides services in the following areas: • Program development: provides services such as editors, debuggers etc.

• • • •

2 Program execution: Access to I/O devices: Controlled access to files: System Access: Facet of user convenience Necessity Good service User friendly OS New Programming model Examples Ability to execute programs, use the file systems. Speedy response to computational requests. GUI, Easy to use commands Concurrent programming

2. Efficient operation of the computer system’s resources: 3. Ability to evolve should be constructed such that it permits effective development and introduction of new features without disturbing other functionality. 4. Provide support for execution of user programs. 5. Functionality to assist program execution. Functions they perform? • Resource managing. • Implementing the user interface. • Sharing hardware among users. • Allowing users to share data among themselves. • Scheduling resources among users. • Facilitating input/output. • Recovering from errors. • Facilitating parallel operations. • Organizing data for secure and rapid access. • Handling network communications. • Process management. • Device management. • CPU management. • Memory/Storage management. • Application interface. In general OS is different for different users. Each users view is called abstract view. It emphasizes features that are important from users perspective. The OS implements the abstract view by acting as an intermediary between user and computer. For Ex. • For a young school student OS is the s/w that permits access to wealth of data available on the net. • For a programmer an OS is the s/w that permits the use of a computer system for program development. • For a person using the application package the OS is simply the s/w that makes it possible to use the package. I.e. It is clear that the user perceives the OS as the software that helps in achieving an intended use of the computer system. OS is simply a means of achieving an intended purpose. What we see is that each user has a different abstract view. In general there are two views of the OS: 1. User View: The users perception of the OS depends on three factors:

3 a. Purpose for which the computer is used. b. The computing environment. c. Degree of identity of the computer system with the purpose being served. The user view of the computer varies by the interface being used: 1. PC: Monitor, keyboard, mouse and system unit. It is for one user to have all the resources and maximize performance. Easy to use is the design criteria with importance to performance rather than resource utilization. 2. Terminal to Mainframe or minicomputer: Many users may be accessing the same system. Sharing of resources and exchange of information may be the criteria. Design issue is to maximize resource utilization. 3. Workstations: users can have the workstations connected to other workstations or servers. Even though the users have dedicated resources they can share. Here the OS is designed to compromise between individual usability and resource utilization. 4. Handheld computers: standalone. Wireless or wired to other devices. OS design issue here is individual usability and performance per battery life is important. 5. Embedded: No user view and the OS is designed to run without user intervention at times. 2. System View: Here the different views are: • From the system point of view OS is the program that is close to h/w and more of a resource allocator. When conflicting requests for resources arise the OS has to decide how to allocate them to the users. • Another view is where the OS has to control various I/O devices and user program. A control program of the OS manages execution of programs and prevents errors and improper use of the computer. ***************************************************************************************** * What are the two types of computer systems? The two types are uniprocessor (one CPU, memory & peripherals) system and multiprocessor (two or more CPUs with shared memory & peripherals) system. ***************************************************************************************** * Mainframe Systems: These were complex systems first used to tackle commercial and scientific applications. The growth of mainframe system can be traced from a simple batch system to a time-shared system. They are also referred to as non-interactive systems. Batch System: Introduction: Early machines were expensive and therefore it was important to maximize machine utilization. The wastage of time was mainly due to setup time and scheduling. The first batch operating system was developed in mid 50s by General Motors to use on an IBM 701. Origin? Early computers used card readers and tapes drives as input devices. A program typically consisted of a deck of cards. The user did not interact with the computer directly instead prepared a job consisting of program, data and some control information (control cards) and submitted to the computer operator. The job was a collection of punch cards. The operator had to handle the card deck with loading, pressing some switches on the console and initiate processing. This was the setup time. After minutes or hours the output appeared. The output consisted of the result of the program as well as the dump of the final memory and register contents. The tapes had to be removed and this contributed to the teardown time. The CPU of the computer was idle when the operator performed all these actions. Hence a lot of CPU time was wasted in this manner. To speed up the processing and avoid wastage of CPU time batch processing was introduced.

4 Batch? Grouping together jobs with similar needs and running them on the computer as a group along with the operating system that allowed automatic transfer of control form one job to another in the same batch. Thus the job-to-job transition was reduced. The operator was responsible for setting up the batch and later sending the results out to the programmers. Advantages: • Batch processing is useful for operations that require the computer or a peripheral device for an extended period of time with very little user interaction. Disadvantages: • No interaction possible when processing is happening. • High job set up time. • CPU idle between jobs. Hence an improvement was made later. Batch processing is implemented through a software batch monitor that resides in the main memory. Hence it was called a resident monitor. It does the entire house keeping chores. When the operator gives command to initiate the processing of a batch the batch monitor sets up the processing of the first job in the batch. At the end of the job it performs job termination and initiates the execution of the next job. At the end of the last job it does batch termination and waits till the initiation of the next batch by the operator. The next problem was when the CPU was idle because of the speed mismatch between the slower mechanical I/O devices and the faster electronic devices. The mismatch in CPU and I/O speeds was made up with better technology and the introduction of disks.The disk technology allowed all the OS to keep all the jobs on the disk and making the OS to do the job scheduling. This helped to use the resources efficiently and hence the CPU time was better utilized. This can be explained with the notion of virtual devices. The computer system used virtual devices for input and output like tapes or disks instead of punch cards. The program was first recorded a batch of jobs on a magnetic tape. The batch processing system processed these jobs and wrote the results on another tape. This spooling operation called inspooling and outspooling was typically performed on smaller computer having a slow CPU. The main computer used a faster magnetic tape to get smaller CPU idle times. Thus spooling helped to overcome the problem of speed mismatch. Batch systems demonstrated the real value of OS and the intensive resource management. (SPOOLING: Simultaneous Peripheral Operation Online) Batch System Memory Layout: Operating System User program area

Multiprogrammed Systems: Introduction: A switch from uniprogramming i.e. only one process/job in the memory to multiprogramming was a remarkable achievement. The job-scheduling notion gave way to multiprogramming capability. The idea here is to increase the CPU utilization even further. The fact is that no user program can either keep the CPU or I/O

5 devices busy all the time. Thus concurrency of operation between the CPU and I/O subsystem is exploited to get more work done by the CPU and hence increase CPU utilization. Multiprogramming arrangement ensures synchronization of the CPU and I/O activities in a simple manner. We space multiplex physical memory and time multiplex the physical processor. Sometimes they are also called as multi-user system. What is multiprogramming system? Keeping the CPU always busy either with execution of instructions or I/O processing of one or the other program/job in a system is called multiprogramming system. OR Rapid switching of the CPU between different jobs is called multiprogramming. Idea? The OS has to keep several jobs in memory simultaneously. Usually this is the subset of the jobs kept in the job pool because of the limited primary memory. The OS picks up and starts executing on of the jobs. Eventually this job may not need the CPU due to some reason like say an I/O operation to complete. Usually a DMA is initiated which does not require CPU intervention. Instead of having the CPU idle the OS switches to the next job in the memory. (This is called context switching. Though context switching is an overhead and expensive the rationale is that the time loss in context switch if far lower than time gained due to CPU utilization.) CPU remains with this job until a request for I/O is made. Thus CPU switches from one job to another. Eventually all jobs complete execution by acquiring the CPU in course of time. Interrupts are used to indicate completion of I/O. Thus the OS does three major functions: Scheduling, memory management and I/O management. Observation? Multiprogramming is the first instance where the OS has to make decisions for the users. Which means the OS is fairly complex. • Switching from one job to the next involves huge effort on the part of the OS because it has keep track of where it left off one job and from where to pick up the next. • All jobs that enter the system are kept in the job pool on the disk. If the jobs have to be brought to the memory and there is not enough space the OS has to decide which jobs to bring in. • This decision of which job to be brought to memory is called job scheduling which the OS will have to do. • When jobs are loaded into the memory requires that the different programs be handled properly in the memory. So memory management has to be done by the OS. • If several jobs are ready to run on the CPU a decision has to be made as to which job goes first to the CPU. This decision making process is called CPU scheduling. The part of the OS which decides on the job that will go to the CPU is called the dispatcher. • The OS has to make sure that when multiple programs are running concurrently they do not affect each others program. • It may have to also take part in the I/O management. I/O interrupt handling has to be done when a job comes back indication the completion of I/O processing. Advantages: • High CPU utilization. • It appears that many programs allotted CPU almost simultaneously. Disadvantages: • Jobs may be different sizes so memory management is needed to accommodate them. • Since many jobs are ready to run CPU scheduling will have to be done. • Will have to do process management, disk and memory management.

Multiprogrammed systems do not function well if there are only CPU bound jobs or only I/O bound jobs. • Does not allow user interaction with the computer. Performance: For better performance we need a mix of CPU and I/O bound jobs. When a proper mix is there an increase in degree of multiprogramming will yield higher throughput. • The number of processes running simultaneously and competing for the CPU is called degree of multiprogramming. Multiprogramming System memory layout: Operating System Job1 Job2 Job3

6

Time Sharing System: Introduction: Time-sharing is a logical extension of Multiprogramming System. It is also called as a multitasking system. In a non-interactive computing environment like in batch processing or multiprogramming the user has no contact with his program during execution. Such systems provide poor service to the user. In the new paradigm of time-sharing there is an interactive computing environment and quick response to the user requests. One of the first Timesharing System was the Compatible Time Sharing System (CTSS) developed by MIT and used on IBM 7094 and supported a large number of users. It was followed by MULTICS (Multiplexed Information and Computing Service). Cal and UNIX are the other examples. (Note: Windows 95 is multitasking and not multiuser but LINUX is both multitasking and multiuser system. As Time sharing systems evolved processes were sometimes called as tasks)) Goal? The goal was to enable many users interact with the computer system simultaneously and each using his or her own terminal keyboard and display device. Def: It is an interactive system or a hands-on computer system that provides direct communication between the user and the system. Time sharing is an operating system feature that allows several users to run several tasks concurrently on one or more processors providing each user with his or her own input and output terminal and providing an impression that he/she is the only one using the system. Features: • Interactive systems need to recognize a terminal as an input medium. Thus the user gives instructions to the OS or a program directly using a keyboard or a mouse and waits for immediate results. This time between request and service is called response time. The effectiveness of the timesharing system is measured using its response time. • Allows several users to share the computer simultaneously.

The presence of other users is transparent to the user. The action or commands tend to be short and hence only little CPU time is needed for each user. The CPU gives a small time slot called as the time slice. Time Slice δ is the largest amount of CPU time any program can consume when scheduled to execute. • The system switches rapidly from one user to another giving an impression that the entire computer is dedicated to his/her use even though it is shared by many users. • The time-sharing system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time shared computer. • Each user has at least one separate program/process in memory. Each process executes for a short time before it either finishes or needs I/O operation. This interactive I/O takes place at the users speed, during which time the CPU switches to another process of a different program of another user. • They have memory management and protection since many user tasks are in the memory simultaneously. • It implements the concept of virtual memory (VM). In order to get reasonable response time the jobs in the memory have to be swapped in and out of the main memory. To achieve this it uses the concept of virtual memory which is a technique that allows the execution of a job that may not be completely in memory. Advantage of VM is that: The size of the program can be greater than the size of the physical memory. It helps to separate the logical memory as viewed by the user from the physical memory. • Time sharing systems also provide file systems. • They also provide disk management, a mechanism for concurrent execution and many CPU scheduling techniques. • It also provides job synchronization, and communication and deadlock handling. ***************************************************************************************** * Desktop systems: Def: Desktop systems are typically single user Von-Neumann computer with a multiprogramming OS. They include PCs running Microsoft Windows and Apple Macintosh. They are built around 32-bit microprocessor that contains the CPU on a single chip. Desktop computers are capable of working with an extraordinary collection of devices The MS-DOS operating system has been superseded with different flavours of Microsoft Windows and IBM upgraded MS-DOS to OS/2 a multitasking system. Apple Macintosh is upgraded to more advanced hardware and includes features like multitasking and virtual memory. MacOS X is also used for the desktops. LINUX and UNIX like OS are also used for the PCs. Advantage of using such systems: • They were able to adopt some of the OS features developed for larger operating systems (mainframes). (Note that some of the design features used in large systems are not applicable to desktop systems. High-end file protection is not necessary. But since desktops can be connected to other computers via LAN or Internet file protection is used. Lack of protection can also lead to the spread of virus and worms that can disrupt the operation of the system.) • Hardware costs of such systems (microcomputers) is sufficiently low hence individuals have the sole user of the computer and CPU utilization is no longer a concern. Read the attachment on Desktop Systems. (EXTRA:

• •

7

8 Control Program for Microcomputers (CP/M) was almost the first OS on the microcomputer platform. It was developed on Intel 8080 in 1974 as a File System. Intel decided to use PL/M (Programming Language for Microcomputers) instead of assembly language for the development of the systems s/w and needed a compiler badly. The compiler needed some support to perform file related operations. Hence CP/M was born as a very simple single user OS. After the commercial licensing of CP/M other utilities like editors, debuggers etc were developed and CP/M became very popular. CP/M went through several versions and finally a 16bit multi-user, timesharing MP/M (Multitasking program for Microcomputers) was designed with real time capabilities and a genuine competition with the minicomputers started. Later CP/Net was released to provide networking capabilities. CP/M was popular because of its user friendliness. ……………….Godbole *************************************************************************************** Multiprocessor System: Def: Multiprocessor System consists of two or more CPUs with shared memory & peripherals. They also have a single operating system. Multiprocessor systems are also called as Tightly Coupled System because of the shared memory. They are also referred to as Parallel Systems. Here we achieve true hardware parallelism. Users of multiprocessor system see a single powerful computer system. Multiplicity of the processors and the way the processors act together to perform computation are transparent to the users. Advantage: 1. Increased throughput/Enhanced Performance: They have a greater system throughput than a uniprocessor system. By increasing the number of processors more work can be done in less time. Speed up ratio with N processors is not N but little less than N. This is because of: • The overhead incurred when we need to make all the processors work in cooperation. • Contention for shared resources. 2. Economy of scale: Multiprocessor system can save more money than multiple single processor system. This is because: • They can share peripherals, mass storage and power supplies. • If several programs operate on the same data it is cheaper to store those data on one disk and have all the processors share them. It is better than having many computers with local disks and many copies of the data. 3. Increased reliability: The functions can be distributed among several processors. Hence the failure of one processor does not halt the system. It will only slow down. 4. Graceful Degradation: The ability to continue providing service proportional to the level of surviving hardware is called graceful degradation. Such systems that provide graceful degradation are fault tolerant. In the case of failure and continued operation a mechanism to detect failure, and diagnosis and correction may be required. Ex. In a Tandem System h/w and s/w duplication is used for continued operation in case of failure. The system consists of twp processors each with its own local memory. One is called the primary and the other is the backup. If failure is detected the back is initiated from the most recent checkpoint. Duplication makes it very expensive mechanism. 5. Parallelism is more since multiple programs can run on multiple processors simultaneously. 6. Higher speedup. (not linear i.e. not directly proportional to the number of CPUs) Multiprocessor system use? 1. Symmetric multiprocessing: This is the most common architecture for multiprocessing system. Here each processor runs an identical copy of the OS and these copies communicate when needed with each other. Here all the processors are peers.

9 Ex. SMP is used in Encore’s version of UNIX for the Multimax computer. This computer is configured to have dozens of computers all running on UNIX. Advantage here is: N process can run simultaneously if there are N processors without degradation in performance. The inefficiencies in having some CPUs idle and the others overloaded can be avoided if we allow the processors to share certain data structures. By also allowing the memory to be shared dynamically among various processors the variance of load can be lowered. Many modern OS like Windows NT, Solaris, Digital UNIX, OS2 and LINUX support SMP. Windows XP is also SMP system. 2. Asymmetric multiprocessing: Here there is master slave relationship. Each processor is assigned a specific task. A master processor controls the system and the other processors either look to the master for instructions or do a predefined task. Master processors schedules work for the slaves. The configuring of asymmetric multiprocessing is through special h/w or s/w set up. This way we can design such that only one processor is a master and the rest are slaves. Ex. The SunOS Version4 provides asymmetric multiprocessing. The multiprocessors in which every word from memory can be read at the same speed is called UMA (Uniform memory access) and when speed is not the same for every word it is called NUMA (Non Uniform memory access). Disadvantage: • If the master processor fails the entire system fails. ***************************************************************************************** * Network: What is a network? A network is a communication path between two or more systems. Variation in networks? Based on type of transport media, protocol used and distance between the nodes networks vary. • Types of protocols? TCP/IP: common and supported by Windows and UNIX, ATM, and other proprietary protocols. • Based on distance? LAN: Local Area Network: exits within a room, floor or a building. MAN: Metropolitan Area Network: could link buildings within a city. WAN: Wide Area Network: exits between buildings, cities or countries. SAN: Small Area Network: Blue tooth devices can communicate over short distances of several feet. • Transmission Medium? Copper wires, fiber strands, and wireless transmissions between microwave dishes, satellites and radio. Infrared communication is also one. What is a network operating system NOS? NOS is an OS that allows file sharing on the network and provides a communication scheme that allow different processes on different computers to exchange messages. A computer running NOS works autonomously from all other computers on the network but aware of the communication and the other computers on the network. Hence it makes the system less transparent. Types of Systems: Client-Server Systems: (master-slave relationship) Consists of a centralized server, which satisfies the requests made by the client systems. The clients can be normal PCs, which also handle the user interface. Servers are of two categories: 1. Compute-Server Systems: Provide an interface to which clients can send requests to perform action, in response to which they execute the action and send back results to the client.

10 2. File Server System: Provide a file system interface where clients can create, update, read and delete files. Peer-to-Peer Systems: Entities here are equal partners. Participants can negotiate the characteristics of their interaction. Distributed system: How started? Trend to replace a centralized large computer with a number of smaller systems geographically separated but connected together through a network. MIMD systems are either tightly coupled (shared memory) systems TCS or loosely coupled (no shared memory) systems LCS. LCS is the distributed systems. What is a distributed system? A multi computer system with no shared memory or shared clock. A distributed computer system consists of several individual computer system connected through a network. They depend on networking for their functionality. Goal? To share computational tasks and provide rich set of features to users. DOS: The Distributed Operating Systems run on the distributed computer systems and make the whole network transparent. They exploit the multiplicity of resources to provide resource sharing. The resources like files, printers, databases etc are shared amongst several users working on different machines but who are not aware of it. They also allow parallelism: fragment a task and run it on different machines simultaneously. It must also hide hardware differences, and also provide high level of fault tolerance. DOS is more autonomous compared to NOS. It is more transparent in the sense that it creates an illusion that only a single OS controls the entire network. DOS is more complex because they have to hide the hardware differences and make the entire network to look like one system. Features of DOS: • Resource sharing: Improves resource utilization across boundaries of individual computer systems. • Reliability: availability of resources and services despite failures. • Computation speed up: Parts of computation can be executed in different computer systems to speed up computation. • Communication: Provides means of communication between remote entities. • Incremental growth: Capabilities of a system can be enhanced at a price proportional to the nature and size of the enhancement. ***************************************************************************************** * Clustered System: Introduction: Clustered systems combine the best features of both Distributed OS and multiprocessor systems. In general they gather together multiple CPUs to accomplish computational work. The clustered system was originally developed by the DEC in late 1980s for the VAX/VMS OS. Parallel Systems | | | SIMD | MIMD |

11 | Shared Memory (TCS) | Distributed Memory (LCS) | Clusters

Def: •

• Note:

Generally refers to a group of connected computers working together as a unit called as clustered system. The connected computer systems can be either Uniprocessor or Multiporcessor System. The computers share storage and are closely linked via LAN networking. Typically the network connections are gigabit Ethernet connections. Clustered system is group of interconnected whole computers (system that can run on its own) working together as a unified computing resource that can create the illusion of one machine.

A cluster is a group of hosts that work together in an integrated manner. It typically constitutes a single node of a distributed system. Each individual host is a node in the cluster. The nodes share the disk storage. Cluster software controls operation on all nodes in the cluster. The s/w helps to provide computational speed up by scheduling sub-tasks in an application on different nodes within the cluster and reliability by exploiting redundancy of CPUs. Each cluster is connected to a private LAN to which only the nodes in the cluster are connected and to a public n/w through which it can communicate with other nodes in the Distributed System. Need? To provide high performance through high availability. Features: Clustered systems consist of several cluster nodes. A layer of cluster s/w runs on the cluster nodes. Each node monitors one or more of others over the LAN. If a monitored machine fails the monitor can take ownership of its storage and restart the application. The users see only a brief interruption of service. Modes: There are two modes of clustering: 1. Asymmetric Clustering: -Here one machine is on hot stand by mode while the other is running the application. It does nothing but monitor the active server. If the server fails the hot stand by host becomes the active server. 2. Symmetric Clustering: -Here two or more hosts are running the applications and they monitor each other. -This mode is efficient because it uses all the available hardware/resources. -But the requirement is that more than one application must be present to run. Other types: 3. Parallel Clusters: -Here the parallel clusters allow multiple hosts to access the same data on a shared storage. -Ex. Oracle Parallel Server is a version of Oracle’s database that has been designed to run on parallel clusters. 4. Clustering over WAN. What is DLM? In the case of distributed systems most clusters do not allow shared access to data on disk. Hence to support the clustered system requirements the distributed system must provide access control and locking to files to ensure no conflicting operations happen. This type of system is called distributed lock manager (DLM). Ex. • The most popular implementation of Clustered System is Beowulf Clusters consisting of a group of identical PCs running on Open Source OS LINUX and cluster management software running on top to

12 • • • • implement parallelism. It links multiple inexpensive computers in an effort to achieve the performance of a conventional super computer, Other commercial clustering products are Grid Engine, Open SSI etc. Google the Internet search engine uses a cluster of 4000 LINUX systems to support its web services. They are typically used for highly scalable web services such as search engines and online stores. They are also used to run parallel programs.

Advantage: • They provide an excellent price-performance ratio. A system consisting of hundreds of nodes can easily give the traditional super computer a run for money. o Ex. System X assembled at Virginia Tech University in 2003 using 100 Macintosh G5 computers is capable of performing 10trillion floating-point operations per sec. Its cost is about $5 million which much cheaper than a super computer. • They provide excellent fault tolerance i.e. they continue operation at an acceptable quality despite an unexpected hardware or software failure. o How it works is: The cluster s/w running on top of cluster nodes monitors one or more nodes. If a node fails the monitoring node acquires the resources of the failed node and resumes operation. • They provide high availability. Since each node is a standalone computer the failure of one node does not mean loss of service. • It provides absolute scalability. It is possible to create large clusters that surpass the power super machines. • Also supports incremental scalability. A cluster is configured in such a way that it is possible to add new systems to the cluster in small increments there by we can start with a modest system and expand the need grows. • Future? Clustered systems use and features should expand as Storage-Area-Networks (SANs) since SANs allow easy attachment of multiple hosts to multiple storage units. More info? For more info refer OS by Stallings section 14.4 ***************************************************************************************** * Real Time Systems: Introduction: The systems of the 1970s were primarily time-sharing systems that supported batch processing, timesharing and real time applications. In a class of applications users need the computer to perform some actions in a timely manner to control the activities of an external system or participate in them. The timeliness of actions is dependent on the time constraints of the external system. Here the importance is the ‘response requirement’ of the system. Def: A real time system is a special purpose OS with well-defined and fixed time constraints in processing and responding. Characteristics: • Used when rigid time requirements have been placed on the operation of a processor or the flow of data, hence used as a control device in dedicated application.

13 Real time systems are characterized by supplying immediate response. Hence a real time is said to function correctly only if it returns correct result within its time constraint.

Disadvantages: • Their relative costs makes them heavily under utilized. It is far more important for such systems to be available when needed and to respond quickly than it is for them to be busy a large portion of the time. • The cost of making the system free of deadlocks is very high in real time systems. Note: Features of RTOS: • Permits multiple processes within an application. • Permits priorities to be assigned to processes. • Uses priority driven of deadline oriented scheduling. • Provides fault tolerance and graceful degradation capabilities. These two techniques ensure continuity of operation in case of fault. • VxWorks & QNX are well known real time operating systems. • The major issue in the design of real time system is the scheduling of jobs in such a way that maximum number jobs satisfy their deadlines. Types: Basis for classification: To take advantage of the features of the real time systems while achieving maximum cost effectiveness: 1. Hard real-time system: • Typically dedicated to processing real time applications and meets the response requirements of the application under all conditions. • I.e. guarantees that critical tasks be completed on time. • To meet this goal it is required that all delays system is bounded: like from the retrieval of stored data to the time it takes the OS to finish the request made of it. The OS kernel delays are also bounded. • The requirement of time actually dictates all the facilities that are available in the real time system. • Secondary storage is typically limited or missing, with data stored in short-term memory of ROM which is a non-volatile memory. No support for virtual memory. • Advanced OS features are absent because they tend to separate the user from the h/w, and that separation results in the uncertainty about the time the operation will take. • Not many general purpose OS support this kind of hard real time requirements. • Ex. Guidance and control applications fail if they cannot meet the response time requirement hence they are typically serviced using hard real time systems. 2. Soft real-time system: • A less restrictive type of real time system. Missing an occasional deadline is acceptable. • Such a system makes an effort to meet response requirements of the real time application but does not guarantee that will be able to meet under all conditions. • Typically it meets the response requirements in some probabilistic manner say 98% of the time. • Here typically a critical task gets priority over other tasks and retains that priority until it completes. • Even here the kernel delays are bounded. • Risky in industrial control and robotics.

Ex. Applications that aim to provide QOS like multimedia applications, virtual reality and applications like reservations and banking and advanced scientific projects like undersea explorations and planetary rovers. These applications do not have the notion of failure hence they are typically serviced by soft real time systems. In multimedia the picture quality may deteriorate occasionally but one can still watch the video. • Because of the expanded uses of the soft real time functionality it is finding its way in most current OS including versions of UNIX. • Ex. Sensors bring data to the computer. Computer analyzes the data and possibly adjusts the controls to modify the sensor inputs. This is used in systems that control scientific experiments, medical imaging systems, industrial control systems, certain display systems, automobile fuel injection systems, home-appliance controllers and missile guidance and weapon system. (Planetary rovers are unmanned vehicles equipped with cameras and a variety of scientific sensors used in space exploration) ***************************************************************************************** * Handheld System: Origin: The quest for smaller size PC has given way to a new type of systems called the handheld systems. The Newton MessagePad released by Apple Computers in 1993 heralded the era of handheld systems. Ex: PDAs (Personal Digital Assistants), Palm Pilots or cellular telephones with network or internet connectivity, Handheld Personal computers (HPC) and Pocket PC. Features: Limited size (ex. PDA typically is 5” in height and 3” in width), weigh less (one half pound), typically 512KB to 8MB of memory, smaller display screen ( typically 3” square), and slower processor (that use less power) . May use wireless technology like BlueTooth (ex. Cellular phones). Typical Applications: Word processing, spread-sheets, personal organizing, and calculations. Also does help to read e-mail, and web browsing. Drawbacks: (three issues of concern to developers of handheld devices): • Due to physical constraints designers are faced with contradiction on the requirements of managing the memory and processing power very efficiently, yet provide rich GUI. Memory: • Small memory so the OS and applications must manage the memory efficiently. (making sure all memory allocated is returned back to the memory manager if no longer used.) • Many handheld devices do not used virtual memory techniques thus forcing the programmers to work within the confines of limited physical memory. • Speed: • Processors run at a fraction of the speed of the PC processor. Faster processors require more power. Which means larger battery has to be incorporated. Physical constraints do not allow these requirements. OS and applications must not tax the processor. Display Screen: • Display screen size small typically 3”x 3”. Allow all application to manage within the screen size. Ex. To allow the display of the contents of the web pages web clipping is done where only a small subset of the web page is delivered and displayed.

14

15 Advantage: • Ability to synchronize with desktops. • Small size hence can be carried around easily. OS: The two most popular OS for handheld systems are Palm OS from PalmSource (ex. In a Palm Pilot) and Windows CE from Microsoft. Facts: • Windows also comes with scaled down version of Microsoft applications like Pocket Word, Pocket Excel, Pocket Power Point. • LINUX has also ported to handheld devices and many manufacturers have announced support for LINUX. • PDAs currently do not provide wireless access. To download data to the device first the data is got to a PC or workstation and then download to the PDA. Some PDAs allow direct copying of data through infra red link. • PDAs use continues to increase as network connections become more available and other options such as cameras and MP3 players expand their utility. Extra: Types of handheld device: 1. An information appliance (IA) is a device that focuses on handling a particular type of information and related tasks. Typical devices are smartphones and PDAs. 2. A smartphone is a full-featured mobile phone with PC like functionality. Most smartphones are cellphones that support full-featured capabilities with the functionality of a complete personal organizer. An important feature of most smartphones is that applications for enhanced data processing and connectivity can be installed on the device, by contrast to regular phones which support sandboxed applications. 3. Personal digital assistants (PDAs) are handheld computers that were originally designed as personal organizers, but became much more versatile over the years. PDAs are also known as pocket computers or palmtop computers. PDAs have many uses: calculation, use as a clock and calender, accessing the Internet, sending and receiving emails, video recording, and word processing, use as an address book , making and writing on spreadsheets, use as a radio or stereo, playing computer games, and Global Positioning System (GPS). Newer PDAs also have both color screens and audio capabilities, enabling them to be used as mobile phones (smartphones), web browsers, or portable media players. 4. Mobile Phone 5. Handheld Game Console 6. The Blackberry is a wireless handheld device introduced in which supports push e-mail (always “on” capability: mail server to client mail immediately when the mail arrives), mobile phone, text messaging, internet faxing, web browsing and other wireless information services. _________________________________________________________________________________________ _ Feature Migration: Idea: • The features once available on one type of machine that is subsequently adopted by various classes of computers is called feature migration.

• • • Ex.

16 It can also refer to the features developed on large mainframe system that has moved/migrated to microcomputers over time. Features in large operating systems being scaled down to fit PCs with the counter support of increasing the speed, power and complexity of hardware. With the PCs becoming powerful the line between mainframes and minicomputers has blurred.

The migration drive occurred with MULTICS (Multiplexed Information & Computing Services) OS. Developed at MIT as a computing utility and ran on a large mainframe computer. Ideas of MULTICS were used in Bell Labs in the design of UNIX for the PDP-11 minicomputer. Later the UNIX features became the basis for the UNIX like OS on a microcomputer. They were later included in later OSs like Windows NT, IBM OS/2 and Macintosh for the desktops. Computing Environments: 1. Traditional Computing: In today’s world the lines among many traditional computing are blurring. Say a “typical office environment”: Few years’ back it consisted of PCs connected to the network with servers providing file and print service. Remote access looked tough and portability was through laptop. Some companies attached terminal to mainframes with few remote access and portability option. Today the web technologies are stretching the boundaries of traditional computing. Companies have portals providing web access. Today network computers are terminals that understand the web based computing. Also hand held computers can synchronize with PCs to allow portability. They can also connect to wireless networks. Say a “home environment”: Few years back it used be a PC with a slow modem providing Internet connection. The cost of faster accessibility was very high. Today the fast data connection costs are very low, speeds are high. Today the fast data connections are allowing home computers to serve up web pages and to contain their own network with printers, client PCs, servers and firewalls for protection. 2. Web-Based Computing: Web based computing has become ubiquitous. More access by wider variety of devices. Other than PCs workstations, PDAs, and cell phones. Web computing has increased the emphasis on networking. Devices not previously networked have been wired or are wireless. The network connectivity is faster through improved network technology, and improved and optimized network management and implementation code. Web based computing has given rise to a new category of devices called load balancers which distribute network connections among a pool of similar servers. Windows 95 has evolved into Windows ME and Windows 2000which can act as web servers as well as clients. 3. Embedded Computing: They are very prevalent today. They run embedded real time OS. These devices are everywhere from car engines, microwaves to manufacturing robots VCRs etc. They are task specific. They lack advanced features and virtual memory and even disks. The OS provides limited features, and with little or no user interface. The embedded systems continue to expand. Ex. the entire house can be computerized.

Sign up to vote on this title
UsefulNot useful