1.1.1 - 1.1.4 CHAPTER 1 - INTRODUCTION TO OPERATING SYSTEM.pdf
Document Details
Uploaded by EloquentMatrix
Politeknik Sultan Idris Shah
Tags
Full Transcript
CHAPTER 1 INTRODUCTION TO OPERATING SYSTEM DFC10273 OPERATING SYSTEM PREPARED BY: PN. NOOR AISHAH ZAINIAR DEPARTMENT OF INFORMATION & COMMUNICATION TECHNOLOGY LEARNING OUTCOME PLO: Explain concepts, principles and theories relating to Information Technology CLO: Explain the environment, process,...
CHAPTER 1 INTRODUCTION TO OPERATING SYSTEM DFC10273 OPERATING SYSTEM PREPARED BY: PN. NOOR AISHAH ZAINIAR DEPARTMENT OF INFORMATION & COMMUNICATION TECHNOLOGY LEARNING OUTCOME PLO: Explain concepts, principles and theories relating to Information Technology CLO: Explain the environment, process, techniques and technologies in operating system (C2, PLO1) 1.1 EXPLAIN THE OPERATING SYSTEM ENVIRONMENT A program that acts as and intermediary between a user of a computer and the computer hardware Chapter 1.1.1 Describe the definition of operating system DEFINITION OF OPERATING SYSTEM OS simplifies and An operating system is Execute user programs manages the complexity software that manages and make solving user of running application a computer's hardware problems easier programs efficiently The components of the computer system Computer system can be divided into four (4) components: Hardware Provides basic computing resources. Operating System Controls and coordinates the use of hardware among application programs. Application Programs Solve computing problems of users. Users People, machines, other computers The components of user the computer system Program OS Hardware The components of the computer system Chapter 1.1.2 Identify the basic functions of operating system Basic Functions Ease of use Resource Allocator of OS individual user can use OS involved intimately the OS with ease and with the hardware easy to understand Maximize resource Control Program utilization to assure that all manages the execution resources are available of user programs to for CPU time, memory prevent errors and and I/O are used improper use of the efficiently, no computer individual users take more than his/her fair share The core software components of an operating system Main component of most computer operating system Bridge between applications and the actual data processing done at Kernel a the hardware level The kernel has unrestricted access to all of the resources on the system Kernel Let us understand some points of importance with respect to a kernel: As a manager of the computer system, it manages the hardware and software operations and acts as an interface or a bridge between the user applications and the hardware. After the boot loader, it is one of the initial programs to be loaded into memory. The functions of the kernel are: Process management, Memory management, Device management, I/O communication, and Interrupt handling. It has a separate space in memory that is not accessible by any other application programme. This space is termed ‘kernel space’. The specific code pertaining to the kernel is loaded into this kernel space. Chapter 1.1.3 Describe the various type of operating system structure Various type of OS Structure Monolithic Layered Microkernel Networked Distributed OS Structure Today's OS tend to be complex because: They provide many services Support variety of hardware and software resources OS architecture can help designers manage this complexity Organize OS components Specify the privilege with which each components executes MONOLITHIC STRUCTURE A monolithic is a type of kernel in OS where the entire operating system works in the kernel space The earliest and most common OS Each component of the OS is contained within the kernel The kernel can access all the resources present in the system Communicate directly with any other component Have unrestricted system access OS become very highly efficient Perform small tasks like batch processing Monolithic and time-sharing tasks in banks Acts as a virtual machine that controls all Structure hardware parts Features of Monolithic Structure Simple structure All the components needed for processing are embedded into the kernel. Works for smaller tasks It works better for performing smaller tasks as it can handle limited resources. Communication between components All the components can directly communicate with each other and also with the kernel Fast operating system The code to make a monolithic kernel is very fast and robust. Monolithic Structure ADVANTAGES DISADVANTAGES The execution is quite fast as the services As monolithic kernels group components together, such as memory management, file therefore difficult to isolate the source of bugs & other errors. management, process scheduling, etc., are Systems with monolithic kernels tend to damage by implemented under the same address erroneous code due to all codes executes with space. unrestricted access to the system. A process runs completely in single address If any service fails in the monolithic, it leads to the space. failure of the entire system. Static single binary file. The entire operating system needs to be modified by the user to add any new service. Simple and easy to implement structure. The addition of new features or removal of obsolete features is very difficult. Security issues are always there because there is no isolation among various servers present in the kernel. Self Review What is a Why monolithic What is the characteristic of a tend to be weakness of monolithic OS? efficient? monolithic OS? LAYERED STRUCTURE A tightly coupled system because changes to one part of the system can have wide-ranging effects on other parts OS become larger and more complex Layered works by grouping components that perform similar functions into layers Each layer only communicate to its immediate upper and lower layer The bottom layer (layer 0), is the H/W. The highest (layer N) is the UI A layer is an implementation of an abstract object consists of data structure and a set of routines that can be invokes by higher-level layers Layered More modular than Monolithic OS The implementation of each layer can be Structure modified without requiring any modification to other layers Layered Structure This layer interacts with the system hardware and coordinates with all the peripheral Hardware devices used such as a printer, mouse, keyboard, scanner, etc. The hardware layer is the lowest layer in the layered operating system architecture. This layer deals with scheduling the processes for the CPU. There are many scheduling CPU queues that are used to handle processes. When the processes enter the system, they are put into the job queue. The processes that are ready to execute in the main memory are Scheduling kept in the ready queue. Memory Memory management deals with memory and the moving of processes from disk to primary memory for execution and back again. This is handled by the third layer of the Management operating system. This layer is responsible for managing the processes i.e assigning the processor to a Process process at a time. This is known as process scheduling. The different algorithms used for process scheduling are FCFS (first come first served), SJF (shortest job first), priority Management scheduling, round-robin scheduling, etc. I/O devices are very important in computer systems. They provide users with the means of interacting with the system. This layer handles the buffers for the I/O devices and makes I/O Buffer sure that they work correctly. This is the highest layer in the layered operating system. This layer deals with the many User user programs and applications that run in an operating system such as word processors, games, browsers etc. Program FEATURES OF LAYERED STRUCTURE Layered structure overcome monolithic structure by: Grouping components Each layer communicates Lower layer provide that perform similar ONLY to its nearest upper service to higher-level functions into layers and lower layer using interface that hides their implementation Layered Structure is MODULAR Modular: is an approach that subdivides a system into smaller parts (modules) that can be independently created and then used in different systems to drive multiple functionalities. Each layer communicates ONLY to its nearest upper and lower layer. The modularity of layered OS allows the implementation of each layer to be modified without requiring any modification to adjacent layers. Layered Structure ADVANTAGES DISADVANTAGES Modularity: This design promotes modularity Slower in execution: A user as each layer performs only the tasks it is process's request may need to pass scheduled to perform. through many layers before its service. Easy debugging: As the layers are discrete so it is easy to debug. Developers can fix errors by Performance degradation: only searching the particular layer to debug. Performance degrades compare to Easy update: A modification made in a monolithic, which require only a single particular layer will not affect the other layers. call to service a similar request. No direct access to hardware: The user can Complex: Tend to damage due to use the services of hardware but cannot errorneous code because all layers directly modify/access to it. Abstraction: Every layer is concerned with its have unrestricted access to the system. own functions. So the functions and implementation of the other layers are abstract to it. Self Review How layered Why do layered Define term architecture are tend to be less 'modular' in more modular efficient than layered than monolithic? monolithic? architecture. MICROKERNEL STRUCTURE Removing all non-essential components from the kernel and implementing them as user-level programs that reside in separate address spaces. Includes only a very small number of services within the kernel and scalable. The services typically include low-level memory management, inter-process communication, and basic process. Synchronization to enable processes to cooperate. Most operating system components, such as process management and Microkernel device management, execute outside the kernel with a lower level of system Structure access. FEATURES OF MICROKERNEL STRUCTURE One or more components Highly modular, making can fail, without causing the them extensible, OS damage because Increased level of inter- portable and scalable microkernel does not rely on module communication each component to execute Microkernel Structure ADVANTAGES DISADVANTAGES Microkernel architecture is small and isolated therefore it can function better. Providing services in a microkernel Microkernels are secure because only those components are system are expensive compared to included that disrupt the functionality of the system otherwise. The expansion of the system is more accessible, so it can be the normal monolithic system. added to the system application without disturbing the Kernel. Microkernels are modular, and the different modules can be Context switch or a function call replaced, reloaded, modified without even touching the Kernel. needed when the drivers are Fewer system crashes when compared with monolithic systems. Microkernel interface helps you to enforce a more modular implemented as procedures or system structure. Without recompiling, add new features. processes, respectively. Server malfunction is also isolated as any other user program’s The performance of a microkernel malfunction. Microkernel system is flexible, so different strategies and APIs, system can be indifferent and may implemented by different servers, can coexist in the system. Increased security and stability will result in a decreased amount lead to some problems. of code which runs on kernel mode. Self Review What is the What is the difference What is the difference between disatvantage of between layered monolithic and microkernel? and microkernel? microkernel? NETWORKED STRUCTURE Enables its process to access resources (e.g., files) that reside on other independent computers on a network. Enables its process to access resources (e.g., files) that reside on other independent computers on a network. The structure of many networked and distributed OS based on client/server model. Network File Systems (NFS) is an important component of the networked OS. Allowing a user on a client computer Networked to access files over a network Example: Sun's Network File System Structure DISTRIBUTED STRUCTURE The logical aggregation of OS software over a collection of independent, networked, communicating, and spatially distributing computational nodes. A single OS that manages resources on more than one OS. Provide the illusion that multiple PC is a single powerful computer. Hence, a process can access all of the systems' resources regardless of where the location is. Difficult to implement and require complicated algorithms to enable the process to communicate and share data. Examples: Distributed MITS's Chord OS Amoeba OS from Vriie Universiteit (VU) in Structure Amsterdam. The logical aggregation of OS software over a collection of independent, networked, communicating, and spatially distributing computational nodes. Individual system nodes each hold a discrete Features of software subset of the global aggregate OS. Distributed Each node-level software subset is a composition Structure of two distinct service provider. Processing is carried out independently in more than one location, but with shared and controlled access to some common facilities Networked vs Distributed A Network OS controls one computer but cooperates with other computers on the network. In Distributed OS, one operating system controls many computers in a network. Self Review What is the major What is the difference Give advantages challenge to between of a distributed design the networked & OS? distributed OS? distributed OS? Chapter 1.1.4 Describe various architecture of operating systems used in different platforms OS Architectures Single Multiprocessor Clustered Processer System System System Definition: Only one process can run at a time; any others must wait until the CPU is free and can be rescheduled. Uniprocessor systems have only a single processor. For a single-processor system, there Single will never be more than one running Processor process. System Definition: Many processes can run simultaneously. A multiprocessor system allows processes and resources (i.e.: memory) to be shared dynamically among the various processors. Multiprocessing has many CPUs to increase computing power. Multiprocessor Example: Sun's OS SunOS Version System 4 & Version 5 (Solaris). Definition: It uses multiple CPUs to complete a task (same as a multiprocessor). It differs from a multiprocessor system because the clustered computers share storage and are closely linked via a local- area network (LAN). To provide high availability (service will continue even if one or more systems in the cluster fail). The monitoring machine can also restart applications that were running on the failed Clustered machine. The failed machine can remain down but the users will see a brief of the System service. Define an operating system. State TWO (2) basic functions of operating system. State ONE (1) advantage of using monolithic structure. THANK YOU PREPARED BY: PN. NOOR AISHAH ZAINIAR DEPARTMENT OF INFORMATION & COMMUNICATION TECHNOLOGY