ebook img

Operating System. DCAP403 PDF

326 Pages·4.401 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Operating System. DCAP403

Operating System DCAP403 Editor Dr. Pooja Gupta nil Sharma www.lpude.in DIRECTORATE OF DISTANCE EDUCATION OPERATING SYSTEM Edited By Dr. Pooja Gupta ISBN: 978-93-87034-83-9 Printed by EXCEL BOOKS PRIVATE LIMITED Regd. Office: E-77, South Ext. Part-I, Delhi-110049 Corporate Office: 1E/14, Jhandewalan Extension, New Delhi-110055 +91-8800697053, +91-011-47520129 [email protected]/[email protected] [email protected] www.excelbooks.com for Lovely Professional University Phagwara CONTENTS Unit 1: Introduction to Operating System 1 Sarabjit Kumar, Lovely Professional University Unit 2: Operation and Function of Operating System 14 Pooja Gupta, Lovely Professional University Unit 3: Operating System Structure 29 Deepak Mehta, Lovely Professional University Unit 4: Process Management 48 Mithilesh Kumar Dubey, Lovely Professional University Unit 5: Scheduling 70 Sahil Rampal, Lovely Professional University Unit 6: Process Synchronization 96 Pooja Gupta, Lovely Professional University Unit 7: Memory Management 119 Pawan Kumar, Lovely Professional University Unit 8: File Management 139 Mithilesh Kumar Dubey, Lovely Professional University Unit 9: I/O & Secondary Storage Structure 159 Ramandeep Kaur, Lovely Professional University Unit 10: System Protection 182 Sarabjit Kumar, Lovely Professional University Unit 11: System Security 200 Mandeep Kaur, Lovely Professional University Unit 12: Security Solution 225 Ramandeep Kaur, Lovely Professional University Unit 13: Case Study: Linux 241 Yadwinder Singh, Lovely Professional University Unit 14: Windows 2000 300 Pooja Gupta, Lovely Professional University SYLLABUS Operating System Objectives: In order to meet the ever increasing need of computers, study of operating system is compulsory. This is core technology subject and the knowledge of which is absolutely essential for Computer Engineers. It familiarizes the students with the concepts and functions of operating system. This subject provides knowledge to develop systems using advanced operating system concepts. (cid:122) To learn the evolution of Operating systems. (cid:122) To study the operations performed by Operating System as a resource manager. (cid:122) To study computer security issues and Operating System tools. 1. Introduction: Operating system Meaning, Supervisor & User mode, operating system operations & Functions, Types of OS: Single-processor system, multiprogramming, Multiprocessing, Multitasking, Parallel, Distributed, RTOS etc. 2. Operating System Structure: OS Services, System Calls, System Programs, OS Structures, layered structure Virtual machines, 3. Processes: Process Concept, PCB, Operation on Processes, Cooperating Processes, Inter process Communication, Process Communication in Client Server Environment. Threads: Concept of Thread, Kernel level & User level threads, Multithreading, Thread Libraries, Threading Issues 4. Scheduling: scheduling criteria, scheduling algorithms, Type of Scheduling: Long term, Short term & Medium term scheduling, multi-processor scheduling algorithm, thread scheduling, 5. Process Synchronization: Critical Section problem, semaphores, monitors, Deadlock characterization, Handling of deadlocks - deadlock prevention, avoidance, detection, recovery from deadlock. 6. Memory Management: Logical & Physical Address space, Swapping, Contiguous memory allocation, paging, segmentation, Virtual memory, demand paging, Page replacement & Page Allocation algorithms, thrashing, Performance issues 7. File Management: File concepts, access methods, directory structure, fi le system mounting, fi le sharing, protection, Allocation methods, Free space Mgt., Directory Implementation. 8. I/O & Secondary Storage Structure: I/O H/W, Application I/O Interface, Kernel I/O subsystem, Disk Scheduling, disk management, swap-space management, RAID structure. 9. System Protection: Goals of protection, Access matrix and its implementation, Access control and revocation of access rights, capability-based systems 10. System Security: Security problem, program threats, system and network threats, cryptography as a security tools, user authentication, implementing security defenses, fi rewalling to protect systems and networks. Case studies Windows OS, Linux or any other OS Sarabjit Kumar, Lovely Professional University Unit 1: Introduction to Operating System Unit 1: Introduction to Operating System Notes CONTENTS Objectives Introduction 1.1 Operating System: Meaning 1.2 History of Computer Operating Systems 1.3 Supervisor and User Mode 1.4 Goals of an Operating System 1.5 Generations of Operating Systems 1.5.1 0th Generation 1.5.2 First Generation (1951-1956) 1.5.3 Second Generation (1956-1964) 1.5.4 Third Generation (1964-1979) 1.5.5 Fourth Generation (1979 – Present) 1.6 Summary 1.7 Keywords 1.8 Self Assessment 1.9 Review Questions 1.10 Further Readings Objectives After studying this unit, you will be able to: (cid:122) Defi ne operating system (cid:122) Know supervisor and user mode (cid:122) Explain various goals of an operating system (cid:122) Describe generation of operating systems Introduction An Operating System (OS) is a collection of programs that acts as an interface between a user of a computer and the computer hardware. The purpose of an operating system is to provide an environment in which a user may execute the programs. Operating Systems are viewed as resource managers. The main resource is the computer hardware in the form of processors, storage, input/output devices, 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, organising data for secure and rapid access, and handling network communications. LOVELY PROFESSIONAL UNIVERSITY 1 Operating System Notes 1.1 Operating System: Meaning An operating system (sometimes abbreviated as “OS”) is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer. The other programs are called applications or application programs. The application programs make use of the operating system by making requests for services through a defi ned Application Program Interface (API). In addition, users can interact directly with the operating system through a user interface such as a command language or a Graphical User Interface (GUI). Figure 1.1: Operating System Interface Hard Drive Computer Mouse Operating System Monitor Video Card Sound Card Keyboard Speakers In a computer system, you fi nd four main components: the hardware, the operating system, the application software and the users. In a computer system, the hardware provides the basic computing resources. The applications programs defi ne the way in which these resources are used to solve the computing problems of the users. The operating system controls and coordinates the use of the hardware among the various systems programs and application programs for the various users. You can view an operating system as a resource allocator. A computer system has many resources (hardware and software) that may be required to solve a problem: CPU time, memory space, fi les storage space, input/output devices etc. The operating system acts as the manager of these resources and allocates them to specifi c programs and users as necessary for their tasks. Since there may be many, possibly confl icting, requests for resources, the operating system must decide which requests are allocated resources to operate the computer system fairly and effi ciently. An operating system is a control program. This program controls the execution of user programs to prevent errors and improper use of the computer. Operating systems exist because: they are a reasonable way to solve the problem of creating a usable computing system. The fundamental goal of a computer system is to execute user programs and solve user problems. While there is no universally agreed upon defi nition of the concept of an operating system, the following is a reasonable starting point: A computer’s operating system is a group of programs designed to serve two basic purposes: 1. To control the allocation and use of the computing system’s resources among the various users and tasks, and 2. To provide an interface between the computer hardware and the programmer that simplifi es and makes feasible the creation, coding, debugging, and maintenance of application programs. 2 LOVELY PROFESSIONAL UNIVERSITY Unit 1: Introduction to Operating System An effective operating system should accomplish the following functions: Notes 1. Should act as a command interpreter by providing a user friendly environment. 2. Should facilitate communication with other users. 3. Facilitate the directory/fi le creation along with the security option. 4. Provide routines that handle the intricate details of I/O programming. 5. Provide access to compilers to translate programs from high-level languages to machine language. 6. Provide a loader program to move the compiled program code to the computer’s memory for execution. 7. Assure that when there are several active processes in the computer, each will get fair and non-interfering access to the central processing unit for execution. 8. Take care of storage and device allocation. 9. Provide for long term storage of user information in the form of fi les. 10. Permit system resources to be shared among users when appropriate, and be protected from unauthorised or mischievous intervention as necessary. Figure 1.2: Abstract View of the Components of a Computer System User 1 User 2 User 3 User n Compiler Assembler Text editor Database system Application programs Operating System Computer hardware Though systems programs such as editors and translators and the various utility programs (such as sort and fi le transfer program) are not usually considered part of the operating system, the operating system is responsible for providing access to these system resources. The abstract view of the components of a computer system and the positioning of OS is shown in the Figure 1.2. Task “Operating system is a hardware or software”. Discuss. 1.2 History of Computer Operating Systems Early computers lacked any form of operating system. The user had sole use of the machine and would arrive armed with program and data, often on punched paper and tape. The program would be loaded into the machine, and the machine would be set to work until the program completed or crashed. Programs could generally be debugged via a front panel using switches and lights. It is said that Alan Turing was a master of this on the early Manchester Mark I machine, LOVELY PROFESSIONAL UNIVERSITY 3

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.