Operating System Design and Programming Operating System Design and Programming
Total Page:16
File Type:pdf, Size:1020Kb
NATIONAL OPEN UNIVERSITY OF NIGERIA SCHOOL OF SCIENCE AND TECHNOLOGY COURSE CODE: CIT 723 COURSE TITLE: OPERATING SYSTEM DESIGN AND PROGRAMMING OPERATING SYSTEM DESIGN AND PROGRAMMING MODULE ONE OPERATING SYSTEM FUNDAMENTAL Unit 1: Introduction to operating system Unit 2: Objectives of Operating System Unit 3: Graphical User interface UNIT ONE INTRODUCTION TO OPERATING SYSTEM TABLE OF CONTENTS 1.0 Introduction 2.0 Objectives 3.0 Main content 3.1 What is Operating System 3.2 Types of Operating System 3.3 Views of Operating System 3.4 Qualities of an Operating System 4.0 Conclusion 5.0 Summary 6.0 Tutor Marked Assignment 7.0 References 1.0 INTRODUCTION In this unit you will learn about the definition of operating system as well as fundamentals of operating system. 2.0 OBJECTIVES At the end of this unit, you should be able to: • Define an operating system • Explain types and views of operating system • Identify the qualities of an operating system 3.0 MAIN CONTENT 3.1 WHAT IS AN OPERATING SYSTEM? The 1960’s definition of an operating system is the software that controls the hardware. However, today, due to microcode we need a better definition. We see operating system as the programs that make the hardware useable. In brief, an operating system is the set of programs that controls computer hardware. It is a program that acts as an intermediary between a user and the computer hardware. The purpose of an operating system is to provide an environment in which a user can execute programs in a convenient and efficient manner. The operating system must ensure the correct operation of the computer system. To prevent user programs from interfering with the proper operation of the system, the hardware must provide appropriate mechanism to ensure proper behavior. Some examples of operating systems are UNIX, Mach, MS-DOS, MS-Windows, Windows/NT, Chicago, O/S2, MacOS, VMS, MVS, and VM. Controlling the computer involves software at several levels. We will differentiate kernel services, library services and application-level services, all of which are part of the operating system. Processes run applications, which are linked together with libraries that perform standard services. The kernel supports the processes by providing a path to the peripheral devices. The kernel responds to service calls from the processes and interrupts from the devices. Operating system are resource managers. The main resource is computer hardware in the form of processors, storage, input/output, communication devices and data. Some of the operating system functions are: implementing the user interface, sharing hardware among users, allowing users to share data among themselves, preventing users from interfering with one another, scheduling resources among users, facilitating input/output, recovering from errors, accounting for resource usage, facilitating parallel operations, organizing data for secure and rapid access, and handling network communications. 3.2 TYPES OF OPERATING SYSTEM Within the broad category of operating systems, there are in general four types, classified based on the types of computers they control and the kind of application they support. The broad categories are: Real-Time Operating System (RTOS): Is commonly used to control machinery, scientific instruments and industrial systems. An RTOS typically has very little user interface capability, and no end-user utilities, since the system will be a “sealed box” when delivered for use. Single-user, single-tasking: As the name implies, this operating system is designed to manage the computer so that one user can effectively do one thing at a time. The palm OS for palm handheld computers is a good example of a modern single user, single task operating system. Single-user, Multi-tasking: This is the type of operating system most people use on their desktop and laptop computers today. Microsoft’s windows and Apple’s MacOS platforms are both examples of operating systems that will let a single user have several programs in operation at the same time. For example, it’s entirely possible for a windows user to be writing a note in a word processor while downloading a file from the internet while printing the text of an e-mail message. Multi-User: A multi-user operating system allows many different users to take the advantages of the computer’s resources simultaneously. The operating system must make sure that the requirements of the various users are balanced, and that each of the programs they are using has sufficient and separate resources so that a problem with one user doesn’t affect the entire community of users. UNIX, VMS, and mainframe operating systems, such as MVS, are examples of multi-user operating systems. 3.3 VIEWS OF OPERATING SYSTEM Operating system is a hard term to define. What you consider an operating system depends on your view of the system. As a scheduler/resource allocator: The operating system has resources for which it is in charge, responsible for handling them out (and later recovering them). Resources include CPU, memory, I/O devices, and disk space. As a virtual machine: Operating system provides a “new” machine. This machine could be the same as the underlying machine. Permits many users to believe they have an entire piece of hardware to themselves. As a multiplexor: Allows sharing of resources, and provides protection from interference and provides for a level of cooperation between users. 3.4 QUALITIES OF AN OPERATING SYSTEM What are the desirable qualities of an operating system? We can discuss them in terms of: Usability, Facilities, Cost, and Adaptability. USABILITY 1. Robustness: accept all valid input without error, and gracefully handle all invalid inputs 2. Proportionality: Simple, cheap and frequent things are easy. Also, expensive and disastrous things are hard. 3. Forgiving: Errors can be recovered from. 4. Convenient: Not necessary to repeat things, or do awkward procedures to accomplish things. 5. Powerful: Has high level facilities. FACILITIES 1. Sufficient for intended use 2. Complete: Don’t leave out part of a facility 3. Appropriate: Do not use fixed-width field input from terminal. COST 1. Want low cost and efficient services 2. Good algorithms: Make use of space/time tradeoffs, special hardware. 3. Low overhead: cost of doing nothing should be low. e.g. idle time at a terminal ADAPTABILITY 1. Tailored to the environment: Support necessary activities. Do not impose unnecessary restrictions. What are the things people do most - make them easy. 2. Changeable over time: Adapt as needs and resources change. e.g. expanding memory and new devices of new user population. 3. Extendible-Extensible: Adding new facilities and features 4.0 CONCLUSION You have learned about the definition of operating system as well as fundamentals of operating system. ACTIVITY B 1. State the features of operating system. 5.0 SUMMARY What you have learned in this unit borders on the definition of operating system as well as fundamentals of operating system. 6.0 TUTOR MARKED ASSIGNMENT 1. What is an operating system? 2. Explain briefly the types of operating system 3. Discuss the qualities of an operating system 7.0 REFERENCES/FUTHER READINGS 1. Lecture notes on operating system by Jelena Mamcenko, Vilinus Gediminas Technical University, 2010. 2. Dictionary of Computing, Fourth Ed. (Oxford: Oxford University Press, 1996). 3. History of Operating Systems by Ayman Moumina, 2001 4. A short introduction to operating system by Mark Burgess, 2002. 5. Operating system handbook by Bob Ducharme- McGraw-Hill, 1994. UNIT TWO OBJECTIVES OF OPERATING SYSTEM TABLE OF CONTENTS 1.0 Introduction 2.0 Objectives 3.0 Main content 3.1 History of Operating System 3.2 Objectives of Operating System 3.3 Operating System Services 4.0 Conclusion 5.0 Summary 6.0 Tutor Marked Assignment 7.0 References 1.0 INTRODUCTION In this unit you will learn about the history of operating system, the objectives of operating system and operating system services. 2.0 OBJECTIVES At the end of this unit, you should be able to: • Describe the generations of computers • Explain the objectives of operating system • Explain operating system services 3.0 MAIN CONTENT 3.1 HISTORY OF OPERATING SYSTEMS Historically, operating systems have been highly related to the computer architecture. It is good idea to study the history of operating system from the architecture of the computers on which they run. FIRST GENERATION The earliest electronic digital computers had no operating systems. Machines of the time were so primitive that programs were often entered one bit at a time on rows of mechanical switches (plug boards). Programming languages were unknown (not even assembly languages). Operating systems were unheard of. SECOND GENERATION By the early 1950’s, the routine has improved somewhat with the introduction of punch cards. The system of the 50’s generally ran one job at a time. These were called single-stream batch processing systems because programs and data were submitted in groups or batches. THIRD GENERATION The systems of the 1960’s were also batch processing systems, but they were able to take better advantage of the computer’s resources by running several jobs at once. So, operating system designers developed the concept of multiprogramming in which several jobs are in main memory at once, a processor is switched from job to job as needed to keep several jobs advancing while keeping the peripheral device in use. For example, on the system with no multiprogramming, when the current job paused to wait for other I/O operation to complete, the CPU simply sat idle until the I/O is finished. The solution for this problem that evolved was to partition the memory into several pieces, with a different job in each partition. While one job was waiting for I/O to complete, another job could be using the CPU.