Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
69 views
Operating System - I
Uploaded by
ibrahimnasimshaikh
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ☆Operating System - I For Later
Download
Save
Save ☆Operating System - I For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
69 views
Operating System - I
Uploaded by
ibrahimnasimshaikh
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ☆Operating System - I For Later
Carousel Previous
Carousel Next
Save
Save ☆Operating System - I For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 260
Search
Fullscreen
HH gyllals 4 Book OF OPERATING SYSTEMS - | For T.Y.B.Sc. Computer Science : Semester - V [Course Code CS 351: Credits - 2] ICBCS Pattern| As Per New Syllabus, Effective from June 2021 gone Dr. Ms. Manisha Bharambe M.Sc. (Comp. Sci.), M.Phil. Ph.D. (Comp. Sci.) Vice Principal, Associate Professor, Department of Computer Science MES's Abasaheb Garware College Pune Mrs. Veena Gandhi M.C.S, '4.Phil. (Computer Science), UGC-NET Héad, Department of BCA Science Abeda Inamdar Senior College Pune —_—_—— Price & z 395.00 cata SONIRAL! PRAKAS A| AN LOE N5861syllabus eee L Introduction to Operating Systems ae + Operating Systems Overview - System Overview and Functions of Operating 5 «What does an OS do? perating Systems «Operating System Operations + Operating System Structure + Protection and Security + Computing Environments - Traditional, Mobile, Distributed, Client/Server, Peer to Peer Computing + Open Source Operating System + Booting + Operating System Services + System Calls, Types of System Calls and their Working 2. Processes and Threads (6 Lectures) * Process Concept - The Processes, Process States, Process Control Block * Process Scheduling - Scheduling Queues,-Schedulers, Context Switch * Operations on Process - Process Creation with Program Using fork(), Process Termination * Thread Scheduling - Threads, Benefits, Multithreading Models, Thread Libraries 3. Process Scheduling (7 Lectures) * Basic Concept - CPU-I/O Burst Cycle, Scheduling Criteria, CPU Scheduler, Preemptive Scheduling, Dispatcher + Scheduling Algorithms - FCFS, SJF, Priority Scheduling, Round-Robin Scheduling, Multiple Queue Scheduling, Multilevel Feedback Queue Scheduling |. Synchronization (5 Lectures) * Background * Critical Section Problem * Semaphores: Usage, Implementation * Classic Problems of Synchronization: The Bounded Buffer Problem, The Reader Writer Problem, The Dining Philosopher Problem 5. Memory Management (12 Lectures) * Background - Basic Hardware, Address Binding, Logical Versus Physical Address Space, Dynamic Loading, Dynamic Linking and Shared Libraries > ‘Swapping Contiguous Memory Allocation - Memory Mapping and Protection, Memory Allocation, Fragmentation Paging - Basic Method, Hardware Support, Protection, Shared Pages Segmentation - Basic Concept, Hardware Virtual Memory Management - Background, Demand Paging, Performance of Demand Paging, Page Replacement - FIFO, Optimal, LRU, MFU 5Contents ... ——$—$— 1. Introduction to Operating Systems 2. Processes and Threads 3. Process Scheduling 4. Synchronization 5. Memory Management 11-154 2.1-2.49 3.1 - 3.60 4.1 - 4.30 5.1 - 5.68as as _ Introduction to Operating Systems Objectives ... To understand Basic Concepts of Operating System To learn Services and Functions of an Operating System To study various types of Operating Systems To learn Operating System Structure To study Operating System Operations and Operating System Components To understand Concept of Protection and Security To study different Computing Environments To learn Concept of System Calls and its Working To study different Types of System Calls To understand the Concept System Booting vvVVVVVVV¥ INTRODUCTION * An operating system acts as an interface between the user of a computer system and the computer hardware. + The purpose of an operating system is to provide an operating environment in which a user can execute programs in a convenient and efficient manner. * An operating system is the most essential system software that manages the operations of a computer. Without an operating system, it is not possible to use the computer. * An Operating System (OS) is a system program that acts as an intermediary between the user and the computer hardware and controls the execution of all kinds of programs. * The operating system provides certain services to programs and to the users of those programs in order to make their tasks easier. * The basic task of an operating system is to control and co-ordinate the use of hardware among the various application programs for various users. * In short, an operating system is a program which takes control of the operation of the computer system. ia)Tox Introduction to Operating System, Operating Systems -L in the i r ake the computer system operate way + The purpose of this control is to make | he comp ficient manner. i y er and ina systematic, re} jable a zi = . inten at operating systems are UNIX, a Do Bs Window, Qs/98MENIPIVista/7/9/10, Linux, Windows-NT/2000, 0s/2, Android, Windows Mobile, iOS, Symbian 0S, Mac 05, ZyNOS and so on. OPERATING SYSTEM OVERVIEW + An operating system is system software that is used to m: and overall operations of a computer system. + An operating system acts as an intermediary/inter! user of a computer and computer hardware. * The main task of an operating system is to col hardware to the all the users. + An operating system links the computer iuser and the computer within the computer system. ‘Operating | Computer User ‘System Hardware Fig. 1.1: Operating System Interface «The purpose of an operating system is to provide an environm execute programs in a convenient and efficient manner. + An operating system is an integrated set of specialized programs used to manage overall resources and operations of the computer. Role of Operating System: 1, To provide an environment in which the user is able to run application software. The applications that users run rely on services provided by the operating system to perform tasks while they execute. 2. To manage the functions of the computer hardware. It helps the user to assess various functions, running the applications programs, serving as an interface between the computer and the user and allocating computer resources to various functions. + The operating system creates an operating environment for the user’s application program to run properly and systematic in computer system. «An operating system is an integrated set of system programs whos major function is (0 manage resources (CPU, Memory etc.), control Input/Output ‘(1/0), schedule jobs: handle errors, provide security and protection and so on. ‘ ¢ An operating system is a set of programs which control all the computer's resources and provide an operational environment to a computer user to execute programs. + The objectives or goals of operating systems are listed below: 1. Convenience: An operating system is designed or constructed in such a way thatit makes the computer system more convenient to use. anage the various resources face (Refer Fig. 1.1) between the ntrol, co-ordinate and supervise of hardware and resides ent in which a user can 12Operating Systems <1 _ e used ating system allows the computer system resources to b ner Efficiency: An oper inan efficient mant 3. Ability to Evol AN operating system should be designed or constructed in such a Way that the test . development as well as addition of new system components could be performed effectively without interfering with existing services Operating systems are Slassified into following categories, depending on their capability of processing: 1. Single-user, sin designed to man, time. The palm single-user, sin, gle-tasking OS: As the name implies, this operating system is ‘age the computer so that one user can effectively do one thing at a OS for palm handheld Computers is a good example of a modern gle-task opera tin : i DOS and Windowees '§ System. Another example includes MS-DO: 2 Single-user, Nulti-tasking OS: This type of os which allows a single user to execute two or more tasks at a tim operating sy ©. Single-user, multi-tasking is the type of ystem most People use on th in cir desktop and laptop computers today. Both Windows 98 and the Macintosh 0S will let a single user have are exam a several programs in example includes Windows 2 iples of operating systems that Operation at a time. Another 000 and UNIX. Multi-user, Multi-tasking Os: in 4. Real Time Operating for real-time systems. The ms where a precise timing and reliability are the first priori is that a particular operati are referred to as soft real-time systems. Examples of real-time OS are QNX, RTLINUX etc, 5. Distributed Operating System: Distributed means data is stored and processed on multiple locations like in the network, In a distributed operating system, the users access remote resources including both hardware and software in same manner as they do local resources, Examples of distributed Operating systems include LOCUS Distributed OS (based on UNIX), OSF/1 OS, IRIX OS, Solaris ete, 6. Time Sharing OS: In time sharing OS, a number of simultaneous users are there and each user is given a trivial amount of time (a quantum/time slice) in which he/she processes interactively or conversationally. UNIX, Windows NT f operating system. XP are examples of this type o! 7, ae ramming OS: Multi-programming is a term given to a oar that may : have ace (multiple) processes in the ‘state of execution’ at the same time. 13 and Introduction to Operating SystemsOperating Systems -1 2. Operating systems are classified into Introduction to Operating Systems Efficiency: An operatin, in an efficient manner. Ability to Evolve: An operating system should be designed or constructed in such a way that the testing, development as well as addition of new system components could be performed effectively without interfering with existing services. 8 system allows the computer system resources to be used following categories, depending on their capability of processing: ae Pal Single-user, Single-tasking OS: 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. Another example includes MS-DOS and Windows 95, Single-user, Multi-tasking OS: This type of OS which allows a single user to execute two or more tasks at a time. Single-user, multi-tasking is the type of operating system most people use on their desktop and laptop computers today. Both Windows 98 and the Macintosh OS are examples of operating systems that will let a single user have several programs in operation at a time. Another example includes Windows 2000 and UNIX. 2 Multi-user, Multi-tasking OS: A multi-user operating system allows many different users to take advantage of the computer's resources simultaneously. UNIX, Linux, VMS (Virtual Memory System) are examy iples of multi-user operating systems. Real Time Operating System (RTOS); Real time operating system is used mainly for real-time systems. These OS used by systems where a precise timing and reliability are the first priority. RTOS is managing the resources of the computer so that a particular operation executes in precisely the same amount of time every time it occurs. The response time of a real-time operating system is very quick. The operating system which guarantees the maximum time for these operations are commonly referred to as hard real-time systems, while operating systems that can only guarantee a maximum of the time.are referred to as soft real-time systems. Examples of real-time OS are QNX, RTLINUX ete. Distributed Operating System: Distributed means data is stored and processed on multiple locations like in the network. In a distributed operating system, the users access remote resources including both hardware and software in same manner as they do local resources. Examples of distributed operating systems include LOCUS Distributed OS (based on UNIX), OSF/1 OS, IRIX OS, Solaris etc. Time Sharing OS: In time sharing OS, a number of simultaneous users are there and each user is given a trivial amount of time (a quantum/time slice) in which he/she processes interactively or conversationally. UNIX, Windows NT and Windows XP are examples of this type of operating system. Multi-programming OS: Multi-programming is a term given to a system that may have several (multiple) processes in the ‘state of execution’ at the same time. 13ircing Str’ Introduction to Operating System, 8. Batch-processing OS: In this type of OS, there is no direct eee between user and the computer. The user has to submit a job eae PH cards ° tape) tog computer operator. Then computer operator places a batch o! eo jobs on an input device. Jobs are hatched together by type of eee nomen Then a special program, the monitor, manages the execution of eact Program in the batch, The monitor is always in the main memory and available for execution, 9, Multithreading OS: It allows different parts of a single program to run concurrently, Multithreading operating systems allow different parts of a software program to run concurrently. Operating systems that would fall into this category are Linux, UNIX and Windows 2000. 10. Multi-processing OS: In a multi-processing OS, a single CPU has more than one processor. All these processors may or may not be equally powerful and may or may not prefer same operation, 11, Multi-tasking OS: It allows executing more than one task at the same time. An operating system that is capable of allowing multiple software processes to run at the same time. Some examples of multi-tasking operating systems are UNIX and Windows 2000 Windows XP, Windows 7, Windows Vista etc. 12. Network Operating System (NOS): A network operating system is a collection of software and associated a protocol that allows a set of autonomous computers, which are interconnected by a computer network to be used together in a convenient and cost-effective manner. Examples of network operating system are BSD (Berkeley System Distribution), MS LAN Manager, Windows-NT, UNIX, Microsoft Windows Server 2003, Novell's NetWare, Microsoft Windows Server 2008 and so on. 13. Embedded OS: Embedded operating systems are designed to work on semiconductor memory with limited processing power. This OS is embedded in a device in the ROM. They are specific to a device and are less resource intensive. Examples of embedded operating systems includes embedded Windows XP, embedded Linux etc. They are used in appliances like microwaves, washing machines, traffic control systems etc, in a eta aatenan Amabile pera System als called a mobile 08s mobile phones, smartphones, PDAs, ‘abt con tender ee such = " » a puters and other handheld devices. Examples of mobile operating systems include $1 i symbian Os, le iOS, Windows Phone and Google Android, ea al Definition of Operating System An operating system is defined as, "an organized collection of programs that controls the execution of the application programs and acts as interface between computer system and computer hardware". OR 14Operating Systems - 1 Introduction to Operating Systems An operating system is defined as, “a Program that acts as an intermediary between the user and the computer hardw: ‘are and controls the execution of all kinds of programs”. OR Operating system is a, "set of programs which control/manage all the computer's Tesources (hardware and software) and provide an operating environment in which users can executes programs", L12 Computer System Overview A computer system is a collection of hai Provide an effective tool for computatioi Hardware refers to the electrical, equipment) that make up the cor Provide services to the system, Fig. 1.2 shows the conceptual view of a rdware and software components designed to mn. , mechanical and electronic Parts (physical computing mputer. Software refers to the programs written to Compiler. Assembler Text editor ‘System and Application Programs eae sal Operating System Computer [——" Hardware Fig. 1.2: Conceptual View of Computer System Every computer system is divided into the hardware, system and application Programs, the operating system and users, The hardware consists of Central Processing Unit (CPU), (1/0) devices which are altogether used to provide the basi the computer system. An operating system is core software that controls Program and acts as an interface hardware. The operating system mainly coordinates the use of the hardware among the various system programs and application programs for various users, Application programs define the ways in which the system resources are used to solve the computing problems of the users (word processor, video games, spreadsheet etc.) memory and Input/Output ic computing resources for the execution of an application between the user of a computer and computer 15___Introductlon to Operating Systems - __ hg yy + System programs are the set of utility programs supplied with an operating system 7 provide basic services for the computer users (compilers, text editors, assembler on to * Users are the people (like system analyst, programmers, and operational users : who interact with the computer system. c) 1.13 Functions of Operating Systems + There are many functions those are performed by the operating system but the mai goal of operating system is provides the interface for working on the system by the user. + The various functions those are performed by the operating system are as explainey belo 1. Memory Management: An operating system deals with the allocation of main memory and other storage areas to the system programs as well as user programs and data. 2. Processor Management: An operating. system deals with the assignment of processor to different tasks being performed by the computer system. 3. Device Management: An operating system deals with the co-ordination and assignment of the different output and input device while one or more programs are being executed. Operating System manages device communication via their respective drivers. 4. File Management: An operating system deals with the storage of file of various storage devices to another. It also allows all files to be easily changed and modified through the use of text editors or some other files manipulation routines. 5. Error Detecting Aids: Production of dumps, traces, error messages and other debugging and error detecting aids. 6. Security: Computer security is a very important aspect of any operating system. The OS keeps the system and programs safe and secure through authentication. By means of password and similar other techniques, preventing unauthorized access to programs and data. 7. Control over System Performance: An OS performs recording delays between request for a service and response from the system. 8. Coordination between other Softwares and Users: Coordination and assignment of compilers, interpreters, assemblers and other software to the various users of the computer systems, 9. Job Accounting: An OS keeping the track of time and resources used by various jobs and users. Types of Operating Systems peewee * There are many operating systems those have been developed for performing the onetations (single operation and multiple operations at a time) those is requested by je user. Batch Operating System: * It is one of the oldest operating system. In batch operating system, jobs with similar ) need batched together by operator and run as a group on a computer system. 16Operating Systems - 1 Introduction to Operating Systems A batch i . atch, 1S a sequence of user jobs formed for the purpose of processing by a batch Processing operating system, Batch operating system j 'S one where programs and data are collected together in a batch before Processing st tarts, A job is predefined Sequence of commands, combined in to a single unit called job. Memory Management in batch two areas namely, programs, instructions and data that are system is very simple. Memory is usually divided into Operating system and user program area as shown in Fig. 1.3. Fig. 1.3: Memory Layout for a Simple Batch System Batch processing is implemented by the kernel (also called the batch monitor), which resides in one part of the computer's memory. The remaining memory is used for servicing a user job - the current job in the batch, When the operator gives a command or instruction to initiate the processing of a batch, the batch monitor sets up the processing of the first job of the batch. At the end of the job, it performs job termination processing and initiates execution of the next job. At the end of the hatch, it performs batch termination processing and awaits initiation of the next batch by the operator. Thus, the operator needs to intervene only at the start and end of a batch. Fig, 1.4 shows a schematic of a batch processing system. The batch consists of n jobs, joby, jobs, ..., job,, one of which is currently in execution. The Fig. 1.4 depicts a memory map showing the arrangement of the batch monitor and the current job of the batch in the computer's memory. The part of memory occupied by the batch monitor is called the System area, part occupied by the user job is called the User area. , and the 2 OL ~OF t Job, Job, Job, t e ‘Start of batch’ "End of batch’ “Current job card card of the batch. 17stpecileg yee Introduction to Operating Sy, my Advantages of Batch Operating System: 4, In batch operating system overhead per program got reduced which improves th system utilization. 4 2, Increased performance since it was possible for job to start as soon as the previgy, job finished. : 3. Inbatch operating system huge amount ofa data can be processed efficiently. 4, Inbatch operating system the execution of job becomes fast and well managed, Disadvantages of Batch Operating System: 1. No interaction is possible with the user while the job is being executed. 2. Batch systems are costly. 3. Itis difficult to,debug program in batch operating system. 4. Due to lack of protection scheme, one batch job can affect pending jobs. 5. As monitor needs to be in main memory, it results in certain wastage of memory. Concept of Spooling: * SPOOLing stands for Simultaneous Peripheral. Operation On Line. Spooling refers to putting data of various 1/0 jobs in a buffer. This buffer is a special area in memory or hard disk which is accessible to I/O devices. «Programs and data are punched on cards and cards being read from the card reader directly into memory. The location of card images is recorded in a table kept by operating system. * When job is executed, the operating system satisfies its requests for card reader input by reading from the disk. t + Similarly when job. requests the printer to output'a line that line is copied into a system buffer and is written to the disk. When. the job is completed, the output i actually printed. This form of processing is called as Spooling. Disk + | vo L f— ous Card reader Line printer Fig. 1.5: Concept of Spooling . * The most common spooling application is print spooling. In print spooling, documen’s are loaded into a buffer and then the printer pulls them off the buffer at its own rate. 18Operating Systems - 1 Introduction to Operating Systems * Because the document: can perform other o) background. * Spooling also lets we place each one to finish before Specifying the next one, + Spooling is also used for processing data at remote sites. The CPU sends the data via communication paths to remote printer, Advantage of Spooling: 1. The spooling Operation uses a disk asa very large buffer. : 2. Spooling is however capable of overlapping 1/0 operation for one job with Processor operations for another job. Disadvantages: 1. There is an extra overhead of maintaining table of card images. 2. An extreme of spooling is called as staging of tapes. To avoid the wear of the magnetic ape, it is copied onto the disk and CPU will access the disk and not the ape. Multiprogramming Operating System: * In multiprogramming operating system more than one program/job can be execute at the same time. * The term multiprogramming means a situation in which a single CPU divides its time between more than on job. In short multiprogramming operating systems allow concurrent execution of multiple programs or jobs. * In multiprogramming, more than one programs or jobs are present in the memory ata time. Multiprogramming means to maintain two or more jobs concurrently in execution. * The basic idea of multiprogramming is as follows: © The job pool consists of number of jobs. The operating system picks jobs from job pool. Many jobs are kept in memory simultaneously. © The number of jobs present in memory at a time is called degree of Multiprogramming, The operating system start execution of a job. (Only one job is executed at a time), © Ifa job requires I/O, then operating system switches to another job and executes it. CPU would not sit idle, When that job requires to wait for an 1/0, the operating system switches to another job and so on. * The Fig. 1.6 shows the multiprogramming system with job execution. Fig. 1.6 shows that job 1 started its execution and if it requires I/O then, operating system switch to job 2 which is executed next and CPU would not remain idle. * Fig. 1.7 shows that several jobs are ready to run, the system must keep them in memory at a time. * As there will always be several jobs in memory all the time, operating system requires some form of memory management. * If many jobs are ready to run, then operating system must select among them. Operating system has to perform some CPU scheduling to schedule only one job at a time. s are in a buffer where they can he accessed by the printer, we erations on the computer while the printing takes place in the a number of print jobs on a queue instead of waiting for 19Operating Systems -1 Job 3 uo Introduction to Operating Systems Operating system Program 1 (reading input) Program 2 (running) | __ Program 3 (writing input) ri ' ' ' CPU io +— cPvis busy ———> Fig. 1.6: Job Execution in Multiprogramming Advantages: 1. a % 4. 1. 2. 4. Efficient memory utilization. High CPU utilization as it is never idle. More CPU throughout. ‘Programn. | Protea Fig. 1.7: Memory Layout in Multiprogramming . Supports multiple simultaneous interactive user (terminals). Disadvantages: The user cannot interact with the job when it is being executed. The programmer cannot modify a program to. study its behavior while the program is being executed. |. Jobs may have different sizes, so some powerful memory management policy is desired to accommodate them in memory. CPU scheduling is must because now many jobs are ready to be run on the CPU. Difference between Batch Operating System and Multiprogramming Operating system: a Batch Operating System Multiprogramming Operating System 1. | In this OS, a batch of similar, jobs that | In this OS, multiple programs appear consist of instructions, data and system commands is submitted to the operator and one job is executed at a lime. run concurrently by rapidly switching the CPU between the programs. Access to files is serial/sequential, so simple file management is needed. A number of processes may attempt access a file at the same time. This demands for advanced protection and concurrency control methods. contd.Operating Systems - 1 Introduction to Operating Systems 3. | The jobs are executed in the order in Multiprogramming systems need more which they Were submitted, that is, | sophisticated scheduling algorithm, as FCFS (First-Come-First-Serve basis). multiple processes reside in the main memory at the same time. 4, | These systems do not tend to achieve | These systems ensure that the CPU has efficient CPU utilization. always something to execute, thus increasing the CPU utilization. Multitasking or Time Sharing Operating System: A running state of a program is called as a process or a task. A CPU handling multiple tasks at a time is known as multitasking, A multitasking operating system can handle multiple tasks together by applying multiprogramming technique. The time-sharing systems are also called multitasking systems. A multitasking operating system supports two or more active processes simultaneously. An instance of a program in execution is called a process or a task. Multitasking operating system supports two or more active processes simultaneously. In a multi tasking environment, operating system ensures that multiple tasks run on a single system by sharing the CPU time. Though they access the CPU one by one, it appears to the user that all the tasks are running simultaneously. For example, while one has opened multiple tabs in a single browser and whenever the user switches from one tab to another, operating system schedules the current process to access the CPU. However, user is never concerned and this is how multi tasking is achieved. The two most common methods for sharing the CPU time is either cooperative multitasking or preemptive multitasking. 1. Cooperative Multitasking: The cooperative multitasking lets the programs decide when they wish to let other tasks run. Early versions of the MacOS (uptil MacOS 8) and versions of Windows earlier than Win95/WinNT used cooperative multitasking (Win95 when running old apps). 2. Preemptive Multitasking: Preemptive multitasking moves the control of the CPU to the OS, letting each process run for a given amount of time (a time slice) and then switching to another task, This method prevents one process from taking complete control of the system and thereby making it seem as if it is crashed, Thre method is most common today, implemented by among others Os/2, wings/98 WinNT, Unix, Linux, BeOS, QNX, 0S9 and most mainframe Os, : Fig. 1.8 shows multitasking concept. The user gives instructions to system or to a program directly, and receives an immediate response, Operating system handles multitasking in the way that it can hi operations/ executes multiple programs at a time. 211 the operating andle multipleOperating Systems - “Wi Introduction to Operating syst, en Operating system ,+" Fig. 1.8: Multitasking Process A time shared operating system uses CPU scheduling and multiprogramming t provide each user with a small portion of a time-shared computer. Each user has at least one separate program in memory. A time shared operating system allows many users to share the computer simultaneously. ‘A time sharing system is one that allows a single computer system for a variety of applications at the time. Fig. 1.9 shows an example of time sharing system which a simultaneously share the computer resources. In the Fig. 1.9, the user 5 is active but user 1, user state whereas user 6 is in ready status. ‘As soon as the time slice of user 5 is completed, user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in wi state. The process continues in the same way and so on. number of different users to share the lows many users to 2, user 3, and user 4 are in waiting the control moves on to the next ready aiting state and user 1 is in ready Active link Fig. 1.9 112Operating Systems -1 : Introduction to Operating Systems Advantages of Multitasking Operating System: 1. Multitasking helps in iner ! § in increasing the overall productivity of the user by performing a number of tasks at the same time. , Z ” 2. Ithelps in increasing the 1 a Overall performance of th uter system. 3. Efficient CPU utilization, p ofthe computer syste Disadvantages of Multitas! ing Operating System: 1, It requires more system resources, For example, large amount of memory is Tequired to execute several programs at the same time. 2. To performing multiple tasks at a single time in multitasking, the CPU speed must be very high. Multiprocessor Operating System: + A multiprocessor operating system means the use of two or more processors within a single computer system. The term multiprocessing means multiple CPUs perform more than one job at one time, * Multiprocessing is the use of two or more Central Processing Units (CPUs) within a single computer system. The term multiprocessing also refers to the ability of a system to support more than one processor and/or the ability to allocate tasks between them. * _ The basic organization of multiprocessing system is shown in Fig. 1:10. ‘Types of Multiprocessor Systems: * The two types of multiprocessing system are explained below: 1, Asymmetric Multiprocessing: In this system, a specific task is assigned to each processor. The system has one master processor and others are slave processors. A master processor controls the system and slave processors follow the instructions of master or perform their predefined task. 2. Symmetric Multiprocessing: In symmetric multiprocessing, there is no master- slave concept used. All the processors are peer processors. They perform all tasks within the operating system. 1/0 Processors. VO Processors | po Unt Fig. 1.10 Advantages of Multiprocessor Operating Systems: 1. It increased throughput by increasing the number of processors, more work done ina shorter period of time. 1,13Operating Systems «1 Introduction to Operating ya, 2, Multiprocessors can also save money (cost) compared to multiple single Because the processors can share peripherals cabinets and power suppli 3, It increases reliability, if functions can be distributed properly among processors, then the failure of one processor will not halt the system, but r will only slow it down. 4. These systems provide higher performance due to parallel processing. Disadvantages of Multiprocessor Operating Systems: 1. If one processor fails then it will affect in the speed. 2. Multiprocessor systems are expensive. 3. Complex OS and large main memory is required. Real Time Operating System: + Real-time operating systems are the operating systems that are used in real- applications where the data processing must be done ina fixed interval of time. «Real time operating system is used in an environment where a large number of ev mostly external to the computer system, must be accepted and processed in 2 time or within stipulated deadline. «Areal time computer system may be defined as, “one which controls an environ: by receiving data, processing them and taking action or returning results very qui to affect the functioning of the environment at that time’. + Areal-time system is a data processing system in ‘which the time interval required © process and respond to inputs is so small that it controls the environment. «Examples of real time system include Nuclear Power Plant Control, Medical Imagin systems, Industrial Control Systems, Weapon Systems, Robots, Air Traffic Cont Systems, Space Navigation, and Flight Control System etc. + Real-time systems are used when there are rigid time requirements on the operatic of a processor or the flow of data and real-time systems can be used as a control de in a dedicated application. + Arealtime operating system must have well-defined, fixed time constraints, other the system wil fail. On Line Disk File | cPU Tele Type Terminal Trafic Sensors and Light Controller. OO Fig. 1.11 114Operating Systems -1 * Real time operating Systems are of two types ni soft real time operating systems. ¢ Hard real-time operating systems gu Introduction to Operating Systems amely, hard real time operating systems jarantee that critical tasks complete on time. In hard real time operating systems, the actions must be taken within the specified timeline. + In soft real time oper: ‘ating systems, it is not mandatory to meet the deadline. A critical real-time task gets priority over other tasks and retains the priority until it completes. Advantages: Useful for real time practical industrial applications. As user gates a higher degree of control the flexibility is setting up the priority of processes is greater. Fast response, the system is immediately updated, It offers better utilization of systems and produces more output from all the resources. Disadvantages: RTOSs are very complex and difficult to maintain. 2. Real Time Operating System (RTOS) is expensive because it is using heavy system ~ a. resources. Itis more difficult to backup these systems when they are in use. Sr. No. Time-Sharing Operating System _ Difference between Time Sharing System and a Real-Time Operating System: Real-Time Operating System - It is the logical extension of multiprogramming system that supports interactive users and is designed to provide a quick response time. This OS is designed for environments where a huge number of events must be processed within fixed time constraints. Round-robin scheduling is used to execute the programs. Most real-time’ systems use priority- based pre-emptive scheduling, This OS tends to reduce the CPU idle time by sharing it among multiple users. Effective resource utilization and user convenience are of secondary concern ina real-time system. More sophisticated memory management is needed in time-sharing OSs to provide separation and protection of multiple user programs. In these OSs, the programs remain in the main memory most of the time arid there is a little swapping of programs between main and secondary memory. Thus, memory Management is less demanding in real-time systems. Process deals with more than one application simultaneously. Process deals with single application at atime, 115Introduction to Operating Systems Operating Systems - Distributed Operating System: : ; © A distributed system is basically a computer network in which two or more autonomous computers are connected their hardware and software interconnections to facilitate communication. ¢ The computer in distributed system can be interconnected by telephone lines, fiber optic cables, coaxial cables, satellite links, and radio waves and so on. * A distributed system consists of a collection of autonomous computers, connected through a network and distribution middleware, which enables computers to coordinate their activities and to share the resources of the system + A distributed environment refers to a collection of autonomous systems, capable of communicating and cooperating with each other through the network, are connected “to each other through LAN/WAN. © Ina distributed operating system, the users access remote resources in the same manner‘as they do local resources. © Data and process migration from one site to another are under the control of the distributed operating system. * A distributed 0S is one that looks to its users like an ordinary centralized OS but runs “on multiple independent CPUs. * In distributed operating system, users are not be aware of where the programs are located and processed, that should all be handled automatically by the operating system. © A distributed system comprises a collection of autonomous computers, linked through a computer network and distribution middleware. « The middleware enables computers to coordinate their activities and to share the resources of the system, so that users perceive the system as a single, integrated computing facility. * Thus, middleware is the bridge that connects distributed applications across dissimilar physical locations, with dissimilar hardware platforms, network technologies, operating systems, and programming languages. Machine A Machine B Machine C Distributed Applications Middleware Service ; ql Network Fig. 1.12: Distributed systems 1.16Operating Systems - I Introduction to Operating Systems Advantages: 1. Reliability: A distributed system is more reliable than a single system. If one machine from system crashes, the rest of the computers remain unaffected. 2. Speed: A distributed system can have more computing power than a mainframe. Its speed makes it different than other systems. 3. Performance: The collection of processors in the system can provide higher performance than a centralized computer. 4, Sharing of Resources: As data or resources are shared in distributed system, it is essential for various applications like banking, ticket reservation system. Disadvantages: 1. Troubleshooting: Troubleshooting and diagnosing problems are the most important disadvantages of distributed system. 2, Networking: The underlying network in distributed system can cause several problems such as transmission problem, overloading, loss of messages. 3. Complexity: Typically, distributed systems are more complex than centralized systems. 4, Security: The easy distributed access in distributed system which increases the risk of security. Network Operating System: «A Network Operating System (NOS) runs on a server and provides the server the capability to manage data, users, groups, security, applications, and other networking functions. * The primary purpose of the network operating system is to allow shared file and printer access among multiple computers in a network, typically a local area network (LAN), and a private network or to other networks. «Examples of network operating systems include Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD. * Network operating systems are operated on a server and offer the facility of security, users, applications, data management, and other networking related functions. * Its objective is to permit file sharing and printer access among various computers in a network, ie., local area network (LAN), Private network, etc. * Network Operating System is a computer operating system that facilitates to connect and communicate various autonomous computers over a network. * Anautonomous computer is an independent computer that has its own local memory, hardware, and operating system. NOS can be specialized to serve as client-server operating system and peer-to-peer operating system. + Peer-to-peer NOS is an operating system in which all the nodes are functionally and operationally equal to each other. They all are capable to perform similar kinds of tasks. The nodes are directly connected with each other in the network. © In peer-to-peer NOS, all computer systems contain equal privileges for consuming the _all resources which are presented on the network. : 117Introduction to Operating Systems Operating Systems -1 © The advantages of the peer-to-peer NOS includes Easy z install and Sees 2 low, sharing of information and resources is fast and easy anor on. Disa antag so the peer-to-peer NOS includes less secure, no centralized storage sys , low soon. : . Ss NOS operate with a single server and multiple client computers in work (Refer Fig. 1.13). ae ° Scie Feet ean runs on the client machine, while the NOS is installed on the server machine. The server machine is a centralized hub for all the client machines. * The client machines generate a request for information or some resource and forward it to the server machine. The server machine, in turn, replies to the client machine by providing appropriate services. Print Server “LS ph chp taney * Client 4 Client 2 Client 3 Client 4 Fig. 1.13: Network Operating System (NOS) Advantages of Client-Server NOS: 1. Centralized servers are highly stable. 2. Security is server managed. 3. Upgrades to new technologies and hardware can be easily integrated into the system. 4, Remote access to servers is possible from different locations and types of systems. Disadvantages of Client-Server NOS: 1. High cost of buying and running a server, 2. Dependency on a central location for most operations. 3. Regular maintenance and updates are required. Difference hetween Network OS and Distributed 0S: sr. No. Network Operating System Distributed Operating System 1, | Network OS provides local services to Distributed OS manages the hardware remote clients, resources, 2. | Communication is file-based, shared Communication is message-based or folder based. . shared memory-based, contd. .-- 1.18operating Systems -I 3% Introduction to Operating Systems Network OS is highly scalable. A new machine can be added very easily, Distributed OS is less scalable. The Process to add new hardware is complex. Less fault tolerance as compared to distributed Os, Distributed OS has very high fault tolerance. Each machine can acts on its own thus autonomy is high. Distributed OS has a poor rate of autonomy. Network OS-based systems i e are easy to built and maintain, Distributed Os is difficult. implementation Network OS-based systems have their own copy of operating systems. Distributed OS-based nodes have the same copy of the operating system. Examples include Novell Netware, BSD, Microsoft Windows Server 2008 and so Examples include LOCUS, Amoeba, Chorus and so on. on. WHAT DOES AN OS DO * The operating system controls and coordinates the use of the hardware among the various application programs for the various users. + The operating system provides proper use of resources like hardware and software in the operation of the computer system. ; * An operating system is a software program that enables the computer hardware to communicate and operate with the computer software. Without a computer operating system a computer would be useless. * The primary objective of an operating system is to make the computer system convenient to use and utilize computer hardware in an efficient manner. * An Operating System (OS) does the following tasks: 1. The operating system schedules all the operations and manages all the computing resources. 2. The operating system provides the proper use of the recourses in the operations of the computer system. 3. OS provide an environment for running user programs. 4. An operating system supports operations and communication over network, 5. OS provide an interface to the user to communicate with the system hardware. 6. OS manages the computer system resources in an efficient manner. OS provide security - ensure that only authorize persons can access data and information or perform certain tasks on the computer system. 8._OS execute user programs and to make solving user problems easier. 119 services that requiredSS Operating Systems -1 Introduction to Operating Systems 9. OS provides file m manipulates stores 10. OS provide an over: 11. 0S provide memory primary memory. 42. It managing the processes 1. processor management for multitasking. ; 13. OS provide job accountability, which helps to track of all time and their resources, which are used by several tasks and multiple users. 14, o§ manages all /0 devices communication with their drivers respectively. 45, 0$ monitors the entire system to identify the errors and bugs and fix immediately without losing any type of data. OPERATING SYSTEM OPERATIONS The operating system sit idle if there no I/O devices to service, no users anagement which refers to the way that the operating system and retrieves data. ll control to the computer system. management functions like allocation and deallocation of e. assigning the processor to a process at a time. OS = Modern operating systems are interrupt driven. is no event occurs such as no processes to execute; to whom to respond and so on. «Events are almost always signaled by the occurrence of an interrupt oF a trap. A trap (or an exception) is a software-generated interrupt caused either by an error such as, division by zero or invalid memory access or by a specific request from a user program that an operating system service be performed. « For each type of interrupt, separate segments of code in the operating system determine what action should be taken. An Interrupt Service Routine (ISR) is provided to deal with the interrupt. * When an event occurs, the operating system analyzes the event and appropriate actions. * A properly designed operating system must ensure that an incorrect (or malicious) program can not cause other programs to execute incorrectly. © Incase of multi-programmed environment the computer resources are shared among several programs simultaneously. Though the sharing of resources improves the resource utilization, it also increases the problems. + Anerror in one user program can adversely affect the execution of other programs. It may also happen that the erroneous program modifies another program or data of another program or the operating system itself. - Mae Reece against such type of errors, only one process must be allowed ei at a time. However, to improve the resource utilization, it is necessary ( Se eee such a way that it should aera the operating system must be designed in Eacancentotloterl ventas (orltelcpeauneTesien i aaa a perating system itself. performs 1.20Operating Systems - I Introduction to Operating Systems 1.3.1 Dual-Mode Operation and Multimode Operation + The execution of oper ‘ating system code and user code must be separated in order to ensure the correct execution of the program. Two separate modes of operations are needed: 1, User mode, and 2, Kernel mode (System Mode/Supervisor Mode/Privileged Mode). A bit called mode bit is added to the hardware of the computer to indicate the current mode. For kernel, the bit is 0. For user, the bit is 1. The system is in user mode during execution of user application. The system is in kernel mode, when some function is performed by operating system. The Fig. 1.14 shows the switching between the users to kernel mode. The booting process starts in Kernel mode. Whenever, interrupt occurs, the hardware switches from user mode to kerriel mode. The system is in user mode when the operating system is running a user application such as handling a text editor. The transition from user mode to kernel mode occurs when the application requests the help of operating system or an interrupt or a system call occurs. The mode bit is set to 1 in the user mode. It is changed from 1 to 0 when switching from user mode to kernel mode. The system starts in kernel mode when it boots and after the operating system is loaded, it executes applications in user mode. There are some privileged instructions that can only be executed in kernel mode. These are interrupt instructions, input output management etc. If the privileged instructions are executed in user mode, it is illegal and a trap is generated. The mode bit is set to 0 in the kernel mode. It is changed from 0 to 1 when switching from kernel mode to user mode. User process User mode Iser process executing|—| lls system call | [Return from system call] | (ode bit = 1) a [ moenga ——* ZL Kernel Trap mode bit = 0 Return mode bit = 4 Kernel mode Execute system call (mode bit = 0) Fig. 1.14: Transition from User to Kernel Mode The concept of modes of operation in operating system can be extended beyond the dual mode. This is known as the multimode system. In those cases the more than 1 bit is used by the CPU to set and handle the mode. 121introduction to Operating Systen, Operating Systems -1 - en a i be described by the Pon : Jtimode system ca ree when the Vit An exam fee CU have a separate mode a Sreoftware Sena a Machine Manager (VMM) and the virtualization manag the system. + For these syst xernel mode. 1,3.2 Timer + If the user program goes in an infi return control to the operating syste! +A timer can be set to interrupt the timer can be fixed or variable. + For variable timer, operating system rate clock. + For each clock ticks, the counter is interrupt occurs and control is trans! OPERATING SYSTEM STRUCTURE «Fig. 1.15 shows the basic structure of an operating system which shows various parts of an operating system and each part consists of a number of programs. «Structure of an operating systems have a layered structure, with the bottoin most layer forming the hardware part of the computer and the outer most (top most) layer forming the User Interface (UD. In between these two layers are kernel layer and shell layer. «The kernel is the innermost layer and is the central controlling part of the operating system. The kernel is the core of the operating system and provides the basic services for all other parts of the operating system. + The services of a kernel are requested by other parts of the operating system or by application programs through a specified set of program interfaces, sometimes known as system calls. + A typical kernel contains programs that are used for the basic functions of an operating system like process management, input/output devices management. + Kernel manages all operati ara B ge operations of computer and hardware and ‘acts as a bridge yetween the user and the resources of the system by accessing various computer zesauces like the CPU, I/O devices and other resources. shell isthe next layer to the kernel. A shells soft ke . A shell is software thé i i ad wet of an ear system access the services of a Teale SE J shel i the layer of programming that unde : stands and ia enters, In some systems, the shell is called a command iaernrat SE Programs nthe use inetae preter rove Command Line In 1 a oo H i ce Interface (GUN to the user, These programs use f: i ee crae ae rig 's with programs in the User Interface (uD typically ities by shell. jl Tequest use of resources and services provided by the ‘eth the commen e system. + The hardware consists of Ce1 ntral Processi it devices, etc. provides the basic computing ae cease ale em, a 1,22 ivil de but les tems, the virtual mode has more privileges than user mot s than inite loop oF fail to call system services and never m then we use timer. f : ; computer after some specified period of time, 4 sets a counter to some initial value. It uses fixed d. When counter reaches to zero, an decremente operating system. ferred automatically to theOperating Systems - 1 Introduction to Operating Systems Fig. 1.15: Basic Structure of an Operating System * Operating system can be implemented with the help of various structures like simple structure, monolithic structure, layered structure, microkernel structure and so on. + Every operating system has its own structure like memory management, file management etc. and the entire performance of the system depends on its structure. * The structure of the OS depends mainly on how the various common components of the operating system are interconnected and blended into the kernel. * A system as large and complex as a modern operating system must be designed carefully if it is to function properly and be modified easily. 1. Simple Structure: : * In simple structure, the structure of operating systems was not well-defined. Such operating systems started small, simple and limited systems and then grew beyond their original scope. + Simple structure is the oldest of all the approaches used to design an operating system. MS-DOS is an example of simple structure operating system as shown in Fig. 1.16. x “Application program Fig: 1.16: MS-DOS Layer Structure 1.23 ‘Introduction to Operating Syste, stems “1 ; ee oneraing SY as a small-size and simple system, and with Timitey ed «Initially, MS-DOS was design na with ti , but grew beyond its scope . . ee ecigned with the idea of providing more r ided into modules. , twas not carefully divi : . sere MS-DOS has a limited structuring, there is no cl i interfé ces and level of functionality. . ; Sel “application programs can directly call the basic I/O routines 1, i on disk instead of going through a series of interfaces. . SS aan aes the MS-DOS system susceptible to malicious programs that may lead to system crash. Moreover, due to the Jack of hardware protection and dual-mod: operation in the Intel 8088 system (for which Ms-DOS system was developed), the base hardware was directly accessible to the application programs. — «The original UNIX operating system also has simple structure like MS-DOS. The UNIx OS consists of following two separable parts: (i) Systems programs, and (ii) The kernel. * Kernel consists of everything below the syst hardware. + Kernel provides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one level. «System calls define the API to UNIX; the set of system programs commonly available defines the user interface. The programmer and user interfaces define the context that the kernel must support. * The operating system has a much greater control over the computer and over the applications that make use of that computer. «Fig. 1.17 shows original UNIX system. functionality within loss spac, Jear separation between th, tem-call interface and above the physical ‘The users Shells and commands Compilers and interpreters System libraries System-call interface to the Kemel Signals terminal File system CPUS. ‘chedulin handling Swapping block /O Page roplacerent Character 1/0 system system Demand paging Terminal drivers Disk and tape drivers Virtual memory Kemel Kernel i terface to the hardware a controliors Device controllers Memory controllers lerminals disks and tapes physical memory Fig. 1.17: UNIX Structure 1.24Operating Systems 1 Introduction to Operating Systems 2. Layered Structure: «In the layered structure, the operating system is organized as a hierarchy of layers or levels with each layer built on the top of the layer below it, « The top-most layer (layer N) is the User Interface (UD), while the bottom-most layer (ayer 0) is the hardware. Each layer has a well defined function and comprises data structures and a set of routines, * The layers are constructed in such a manner that a typical layer (say, layer N) is able to invoke operations on its lower layers and the operations of layer N can be invoked by its higher layers. E * Fig. 1.18 shows layered structure of an operating system. Application | ||| | Application Program Program User Mode Kernel Mode ‘System Call Interface | at Layer N | Layer 1 ees Sea Layer 0 . I Hardware Fig. 1.18: Layered Structure of Operating System * A layered design was first used in the THE (Technische Hogeschool Eindhoven) operating system designed by a team led by Edsger W. Dijkstra, * Fig. 1.19 shows the structure of THE operating system. Layer5 s ‘The operator Layer 4, User program: Layer 3 Input / Output management ‘Layer 2 Operator process communication Layer 1 Memory and Drum management Layer 0 s Processor allocation and Multiprogramming Fig. 1.19: Layered Structure of THE Operating System 1.25Operating Systems - 1 Introduction to Operating Systems Fig. 1.19 shows t following layers of THE operating system: © Layer 0 deals with allocation of the processor, interrupts occurred or timers expired, © Above Layer 0, the system con: of sequential processes, each of which could be programmed without having to worry about th e fact that multiple Processes are Tunning on a single processor. Layer 0 provides the basic multi Programming of the CPU. switching between processes when © Layer 1 does the memory Management. It memory and on 512 K word drum used for which there was no room in main memory, © Above layer 1, processes did not have to worry about whether they are in memory or on the drum; the layer 1 software takes care of making sure that pages are brought into memory whenever they are needed, Layer 2 handles communication between each Process and the operator console. Above this layer each Process effectively had its own Operator console. Layers 3 take care of Managing the I/O devices and buffering the information streams to and from them. © Above Layer 3 each Process can deal with abstract I/O devices with nice properties instead or real devices with many peculiarities. Layer 4 is where the user Programs are found. They do not have to worry about Process memory, console or I/O management. © The system operator Process is located in Layer 5, * The layering scheme is Teally only a design aid, because all the ultimately linked together into a single object program. Advantages: allocates space for Processes in main holding parts of processes (pages) for Parts of the system are @ The layered structure gives modularity. (ii) Easy for debugging and system verification. (iii) Each layer in layered structure hides the existence of certain data structures, operations and hardware from higher level layers, Disadvantages: G) The layered structure requires careful definition of the |: (ii) The layered structure is less efficient than other types. 3. Microkernel Structure: E + The kernel is the core system software that behaves as a bridge between application software and hardware of the system. Kernel manages system resources, A microkernel is a piece of software or even code that contains the near-minimum amount of functions and features required to implement an Operating system. * Micro means small so a microkernel is a small kind of kernel in which only basic functionality of kernel is placed, « A microkernel contains only the core functionalities of the syste management, processor (CPU) scheduling, interprocess communic: layers, m such as memory ‘ation and so on.Operating Systems “1 Introduction to Operating Systems * As UNIX expanded, the kernel becomes large and it is difficult to manage. The microkernel approach is used by operating system, + In the mid-1980s, researchers at Carnegie Mellon University developed an operating system called Mach that modularized the kernel using the microkernel approach. + It structures the operating system by moving all non-essential components from the kernel and implementing them as system and user-level programs into user space. 5 er Ne Ox reign ed oS Se On many independent user-level processes, * Main function of micro- client program and v: by message passing + It provides minimal communication facility. + Examples of microkernel include Trué. time operating system). + Fig. 1.20 shows structure of a message passing. * In the Fig. 1.20 the microkernel contains basic requirements such as memory management, CPU scheduling and interprocess communication. The only software executing at the privileged level i.e. kernel mode is the microkernel, * The other functions of the operating system are removed from the kernel mode and run in the user mode. These functions may be device drivers, file servers, application program communication etc. Kernels is to provide communication facility between the ‘arious services running in user mode, communication is achieved Process and memory management, in addition to a 4 UNIX, Mac OS X kernel (Darwin), QNX (real- typical microkernel. Communication is provided by ‘Application | User program mode 4a Kemel mode + Microkernel ¥ Hardware Fig. 1.20: Structure of Microkernel Operating System Advantages: i : ; ; (The microkernel structure provides high security and reliability, Gi) Extending of operating system is easier, since all new services are added to user space and kernel modification is not required. (iit) The microkernel structure is portable due to small size of kernel, itis easy to port operating system from one hardware to other, 1.27B Sime ead preceraeeer Introduction to Operating Sy. Disadvantages: (Performance of micro-kernels suffers due to increased system function overhesy (ii) Micro kernel does not handle 1/0 communication directly, (iii) The execution of the microkernel is slower as compared to the monolithic kerne, Monolithic Structure: Monolithic structure is the oldest structure of the operating system. The monolith operating system is also known as the monolithic kernel. Amonolithic kernel is an operating system structure where the entire ope: system is working in kernel space. The kernel can access all the resources present | ting In the monolithic systems, each component of the operating system is containe: within the kernel. + All the basic services of OS like process management, file management, me! management, exception handling, process communication etc. are all present insi the kernel only. Monolithic operating system example includes Linux, BSD, 05/360, Open VMS, xT 400, z/TPF and so on. Fig. 1.21 shows the monolithic structure. ‘Application program Hardware Fig. 1.21: Structure of Monolithic Operating System Advantages: () Simple and easy structure to implementation. Gi) The execution of the monolithic kernel is quite fast due to direct access to all thé services. Disadvantages: @ If any service fails in the monolithic kernel, it leads to the failure of the entt® system. 1.28Operating Systems +I i Introduction to Operating Systems (ii) To add any new service, the entire operating system needs to be modified by the user. (iii) Security issues are always there because there is no isol: present in the kernel, 1.5 | PROTECTION AND SECURITY + Protection and security are the important things in the operating system to prevent interference with use of computer resources, * Protection involves ensuring controlled access to the system resources. Security involves protecting the system from unauthorized users. If a computer system has multiple users and multiple processes, then protection mechanism is required to protect one from the others activities. + There was need of Protecting monitor memory being accessed by user as well as one user accessing memory or data of the other users, Protection is a mechanism for controlling the access of programs, Processes, or users to the resources defined by a computer system. This mechanism must provide a means for specification of the controls to be imposed, as well as a means of enforcement. * Security protects the information stored in the system (both data and code), as well as. the physical resources of the computer system, from unauthorized access, malicious destruction or alteration, and accidental introduction of. inconsistency. * System protection refers to the mechanism for controlling the access to computer Tesources by various users and processes, Many kinds of protection are provided such as: 1. YO Protection: One user cannot read/write the data of another user. 2. Memory Protection: Since in multiuser system, many program reside in the main memory. Each program is enclosed in two special fence registers, lower bound register and upper bound registers, 3. CPU Protection: The program should not go in the infinite loop. So timer/counter is set. * For protection and security, ‘most operating system maintain a list of user names associated with unique user identifier. In Windows Vista, Security 1D (SID) is used, which is unique. When the user logs in, the id is determined for authentication, [6 [ComPUTING ENVIRONMENTS * Operating systems are used in a variety of computing environments. A computing environment consists of a computer system, its interfaces with other systems and the Services provided by its operating system to its users and their programs. lea Traditional Computing lation among various A few years ago, the computer is connected to network, with servers. Mainframes are Used with number of terminals attached. * Today, web technology is used with traditional computing. Companies are establishing Portals, blogs etc. provide web accessibility to their internal servers. 1.29
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6127)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brene Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (932)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8215)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2923)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Tóibín
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
Blockchain Technology
PDF
No ratings yet
Blockchain Technology
137 pages
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2542)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
Chp3 4 M1
PDF
No ratings yet
Chp3 4 M1
42 pages
JAVA1 - Solution - Oct 22 - NSGAcademy
PDF
No ratings yet
JAVA1 - Solution - Oct 22 - NSGAcademy
14 pages
JAVA1 - Solution - Apr 22 - NSGAcademy
PDF
No ratings yet
JAVA1 - Solution - Apr 22 - NSGAcademy
13 pages
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Steve Jobs
From Everand
Steve Jobs
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Blockchain Technology
PDF
Blockchain Technology
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
Chp3 4 M1
PDF
Chp3 4 M1
JAVA1 - Solution - Oct 22 - NSGAcademy
PDF
JAVA1 - Solution - Oct 22 - NSGAcademy
JAVA1 - Solution - Apr 22 - NSGAcademy
PDF
JAVA1 - Solution - Apr 22 - NSGAcademy
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel