🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

operating system lecture note 1.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

Learn and www.lmu.edu.ng Live COM 306 OPERATING SYSTEMS Lecture Note 1 Lecturer: Akande Noah O. (Ph. D.) Operating Systems ▪ An OS is a system software that serves as an interface between the computer’s hardware...

Learn and www.lmu.edu.ng Live COM 306 OPERATING SYSTEMS Lecture Note 1 Lecturer: Akande Noah O. (Ph. D.) Operating Systems ▪ An OS is a system software that serves as an interface between the computer’s hardware components and the end-user. ▪ Each computer system, whether it is desktop, laptop, tablet, or smartphone, all must have at least one OS to provide its basic functionalities ▪ Some widely used operating systems are Windows, Linux, MacOS, Android, iOS, etc. 2 Operating Systems ▪ Your computer's operating system (OS) manages all of the software and hardware on the computer. ▪ Most of the time, there are several different computer programs running at the same time, and they all need to access your computer's central processing unit (CPU), memory, and storage. ▪ The operating system coordinates all of this to make sure each program gets what it needs. 3 Course Outline for Lecture One 4 Operating System Kernel ▪ OS Kernel is the central component of an operating system that manages the communication between the software and the hardware. ▪ Each operation of hardware and software is managed and administrated by the kernel. ▪ It acts as a bridge between applications and data processing done at the hardware level. 5 Operating System Kernel ▪ It is the part of the OS that always resides in computer memory and enables the communication between software and hardware components. ▪ Whenever a system starts, the Kernel is the first program that is loaded after the bootloader because the Kernel has to handle the operations of the Operating System. ▪ The Kernel remains in the memory until the Operating System is shut-down. 6 Operating System Kernel ▪ It also manages memory, peripheral, and I/O requests from software. ▪ Moreover, it translates all I/O requests into data processing instructions for the CPU. ▪ It manages other tasks also such as memory management, task management, and disk management. 7 Operating System Kernel ▪ A kernel is kept and usually loaded into separate memory space, known as protected Kernel space. ▪ It is protected from being accessed by application programs or less important parts of OS. ▪ Other application programs such as browser, word processor, audio & video player use separate memory space known as user-space. ▪ Due to these two separate spaces, user data and kernel data don't interfere with each other and do not cause any instability and slowness. 8 Types of Kennels- Monolithic Kernels ▪ Monolithic Kernels are those Kernels where the user services and the kernel services are implemented in the same memory space i.e. different memory are not used for user and kernel services. ▪ By doing so, the size of the Kernel is increased and this, in turn, increases the size of the Operating System. ▪ As there is no separate User Space and Kernel Space, so the execution of the process will be faster in Monolithic Kernels. ▪ Examples of Monolithic Kernels are Unix, Linux, Open VMS, XTS-400, etc. 9 Types of Kennels- Microkernel ▪ A Microkernel is different from Monolithic kernel because in a Microkernel, the user services and kernel services are implemented into different spaces i.e. we use User Space and Kernel Space in case of Microkernels. ▪ As we are using User Space and Kernel Space separately, the size of the Kernel reduces and this, in turn, reduces the size of Operating System. ▪ Examples of Microkernel are L4, AmigaOS, Minix, K42, etc. 10 3. Hybrid Kernel ▪ A Hybrid Kernel is a combination of both Monolithic Kernel and Microkernel. ▪ It makes the use of the speed of Monolithic Kernel and the modularity of Microkernel. ▪ Hybrid kernels are micro kernels that have some "non- essential" code in kernel-space in order for the code to run more quickly than it would be in user-space. ▪ So, some services such as network stack or filesystem are run in Kernel space to reduce the performance overhead, but still, it runs kernel code as servers in the user-space. 11 Components of an Operating System 12 Learn and Live www.lmu.edu.ng COM 306 TYPES OF OPERATING SYSTEM Lecture Note 2 Lecturer: Akande Noah O. (Ph. D.) 14 1. Real Time Operating System (RTOS) ▪ Real-time operating system (RTOS) is an operating system designed to manage real time application that process data as it comes in ▪ In a RTOS, processing time requirement are calculated in tenths of seconds increments of time. 15 Types of RTOS- Hard Real Time ▪ In Hard RTOS, the deadline is handled very strictly which means that given task must start executing on specified scheduled time, and must be completed within the assigned time duration. ▪ Time constraint is very short and strict therefore, a second of delay is not acceptable ▪ Example: Medical critical care system, Aircraft systems, etc. 16 Types of RTOS- Firm Real Time ▪ These type of RTOS also need to follow the deadlines. However, missing a deadline may not have big impact but could cause undesired affects, like a huge reduction in quality of a product. ▪ Example: financial forecast systems, robotic assembly lines 17 Types of RTOS- Soft Real Time ▪ Soft Real time RTOS accepts some delays by the Operating system. ▪ In this type of RTOS, there is a deadline assigned for a specific job, but a delay for a small amount of time is acceptable. ▪ So, deadlines are handled softly by this type of RTOS. ▪ Example: Online Transaction system and Livestock price quotation System. 18 Hard VS Soft Real Time OS S/N Hard Real-Time System Soft Real-Time System ▪ These systems have to follow the These systems do not have fewer 1. deadline very strictly. restrictions on the deadline. 2. The response time is in Comparatively, the response time milliseconds. is higher. 3. They are used in safety critical Safety is not so strict in these environment. systems. 4. Examples are satellite launch Examples are computer games, systems, missile launch systems, online transaction systems, etc. Railway systems, etc 19 Hard VS Soft Real Time OS S/N Firm Real-Time System Soft Real-Time System ▪ The system is expected to The system is expected to 1. complete the task before the complete the task within the deadline. deadline but, not strictly. 2. Results generated after the Results generated after the deadline has no value and is deadline are note considered termed incorrect incorrect but its value decreases. 3. Examples are financial forecast Examples are computer games, systems, robotic assembly lines online transaction systems, etc. 20 Components of RTOS 21 Components of a RTOS ▪ The Scheduler: it decides the order in which tasks will be executed; the order of execution will be based on the given priority ▪ Symmetric Multiprocessing (SMP): specifies the number of tasks that can be handled by the RTOS so that parallel processing can be done. ▪ Function Library: this acts as an interface that helps you to connect kernel and application code. 22 Components of a RTOS ▪ Memory Management: this element is needed in the system to allocate memory to every program ▪ Fast dispatch latency: tracks the time interval between the termination of one task and the execution of another task in the ‘ready’ state ▪ User-defined data objects and classes: these are programming constructs that allow developers to create custom data types and structures that can be used to store and manipulate data in their programs. 23 Terms used in RTOS ▪ Task – a task is a unit of work that is executed by the operating system. – It is a piece of code that performs a specific function and can be scheduled to run at a specific time or in response to an event. ▪ Job – a job is a higher-level concept that is used to describe a set of tasks that are related to each other and need to be executed together. ▪ In summary, tasks are individual units of work that are executed by the operating system, while jobs are collections of tasks that are related to each other and need to be executed together. ▪ Release time of a job – It's a time of a job at which job becomes ready for execution. ▪ Execution time of a job: It is time taken by job to finish its execution. ▪ Deadline of a job: It's time by which a job should finish its execution. 24 2. Multi-User VS Single User OS ▪ A multi user operating system allows multiple users to access the computer at the same time. ▪ The users interact with it through terminals or computers that gave them access to the system through a network or machines such as printers. ▪ The operating system manages the memory and resources among the various users according to their requirements. ▪ The task of one user does not affect the task of other users ▪ But in a single-user OS, only one user can interact with the computer at any given point in time. 25 Single-user OS Multi-user OS In the single-user OS, only one user can 2. Multi-User VS Single User OS access the resources and perform its In the multi-user OS, multiple users can access the resources simultaneously. tasks. ▪ A superuser gets all the powers of Superuser does not exist for a multi-user OS as maintaining the system and making each entity has control over their working. changes to ensure the system runs smoothly. The bootloader loads all the resources of The bootloader distributes the resources of the the CPU in the profile of a single CPU based on the priority of the users. superuser. Single-User OS is simple and easy to The Multi-User OS are complicated as they have design. to apply complex techniques to share the resources among various users MS-DOS, Windows 95, Windows NT, Mainframes, IBM AS400, Linux & Unix Distributed Windows 2000, Personal Computers, etc. OS,26etc. ▪ 27 Single-User Single-Task OS ▪ Single-User Single-Task Osnare used to support systems where only one user is expected to carry out a single task at a time. ▪ Example of such system is ATM machines, dumb/feature phones 28 Single-User Multi-Task OS ▪ Single-User Multi-Tasking operating system is developed especially for one user, but this single user can perform multiple tasks simultaneously. ▪ For example, you can write any text while surfing the internet, downloading images, watching movies, etc., on Windows, Linux, Mac O/S. ▪ Example of such systems are smart mobile devices, 29 Distributed System Time – sliced Multi-User System OS Multi-processor system 30 Distributed Multi-User Operating System ▪ A Distributed OS is used to manage multiple systems that may or may not be located in the same geographic location. ▪ Therefore, a Distributed OS is not installed on a single machine, it is divided into parts, and these parts are loaded on different machines. ▪ The portion of this OS installed on the systems facilitates communication as they must resolve a variety of networking protocols 31 Distributed Multi-User Operating System ▪ Electronic banking Mobile Apps, multiplayer online games are hosted on Distributed OS. ▪ Users can conduct numerous transactions using a single network from the comfort of their homes. 32 Time Sliced System ▪ It's a system in which each user's job gets a specific amount of CPU time. ▪ In other words, each work is assigned to a specific time period. ▪ An internal component known as the 'Scheduler’ determines the order in which user requests will be executed based on their priority. 33 Multiprocessor Multiuser Operating System ▪ Multiprocessor system is the one where the system uses more than one processor at the same time. ▪ Multiple CPUs are linked together so that a job can be divided and executed more quickly. ▪ When a job is completed, the results from all CPUs are compiled to provide the final output. ▪ If one of the processors in this system fails, the other processor is responsible for completing its assigned task. 34 Multiprocessor Multiuser Operating System ▪ Multiprocessor operating system is classified into six different categories: – Symmetric Multiprocessor – Asymmetric Multiprocessor – Shared Memory Multiprocessor – Distributed Memory Multiprocessor – UMA Multiprocessor, and – NUMA Multiprocessor. 35 Multiprocessor Multiuser Operating System ▪ Symmetric Multiprocessor OS: the processors share the same memory, input/output (I/O) bus or data path ▪ Asymmetric Multiprocessor OS: every processor is allotted predefined tasks, and the master processor can control the entire system. – The processor have a master- slave relationship. 36 Multiprocessor Multiuser Operating System ▪ Shared Memory Multiprocessor: In this system, each CPU contains sharable common memory. – SMP is used when an embedded application needs more CPU power to manage its workload ▪ Distributed Memory Multiprocessor: In this system, all types of processors have their own private memory. 37 Multiprocessor Multiuser Operating System 38 Multiprocessor Multiuser Operating System ▪ Uniform Memory Access Multiprocessor OS: all processor access all memory at a uniform speed rate ▪ Non Uniform Memory Access Multiprocessor OS: some processors can access memory at a faster rate while others access memory at a fixed rate 39 FEATURES OF MULTI-USER OPERATING SYSTEM 1. Multiple processing: 2. Sharing of resources: 3. Processing of data at the back end: 4. Invisibility: Many functions of the multi-user operating system is invisible to the users. 40 Multitasking Operating Systems 41 Multitasking Operating Systems ▪ Multitasking OS supports simultaneous execution of multiple task ▪ The CPU switches between many tasks so as to execute them, therefore, multiple programs can be executed without interfering with one another ▪ Multitasking OS could be Preemptive, Cooperative and True Multitasking 42 Preemptive Multitasking ▪ In preemptive multitasking, the OS determines the amount of time a CPU will use to execute a particular task before another task is assigned to it ▪ The OS notifies the program when another application is about to take over the CPU from it ▪ UNIX was the first OS to implement multitasking technique while Windows NT and 95 were the first versions of windows to implement mutitasking 43 Preemptive Multitasking ▪ Processes under this category can be grouped into two categories at any specific time: – Those that are waiting for input or output, which are referred to “I/O bound”. – Those which are fully utilizing the CPU, these are referred to “CPU bound”. 44 Cooperative Multitasking ▪ Cooperative multitasking is a technique, which allows two or more programs to cooperatively share the processing time and resources of the host processor. ▪ In cooperative multitasking also known as “time- sharing multitasking”, programs in the processing queue must equally allocate the processors resources among each other. 45 True Multitasking ▪ True Multitasking OS allows multiple tasks to be processed and executed simultaneously without delay instead of switching work from one processor to another 46 Characteristics of a Multi Task Operating System 1. Hardware Interruption 2. Context Switch 3. Time-Sharing 4. Process Allocation 5. Multiprocessing 6. Memory Swapping 7. Memory Protection 47 Disadvantages of a Multi Task Operating System ▪ Slow execution of tasks if processor speed is low ▪ CPU Heat Up: More heat will be generated since many processors are used consecutively ▪ Memory Overloading 48 Network Operating System ▪ Similarly, a Network Operating System (NOS) is software that supports systems that connects multiple devices and computers on the network and allows them to share resources on the network. ▪ The individual machines that are part of the Network have their operating system, and the Network Operating System resides on the top of the individual machines. 49 Types of Network Operating System ▪ Peer to Peer –A peer-to-peer (P2P) network is a type of computer network in which each computer or node in the network can act as both a client and a server. –This means that each node can share resources, such as files, with other nodes in the network without the need for a centralized server –A P2P network operating system is an operating system that is designed to support P2P networking. –It provides the necessary tools and services to enable nodes in the network to communicate with each other and share resources. 50 Client-Server Network Operating System ▪ Client-Server Network Operating System is a server-based Network in which storage and processing workload is shared among clients and servers. ▪ In Client-Server systems, the server is called the backend system while the client is called the frontend system ▪ The client systems make request for services such as printing, document storage etc while the server makes these services available to all clients on the network. 51 Client-Server Network Operating System – A common application of Client-Server application involves a database that many computers on a network can access. – The database is stored on the server, and the database queries are sent from clients and processed by the server. – The result of queries is then sent across the Network back to the clients. 52 Examples of Network Operating System ▪ Following are the examples of network operating systems. – Microsoft Windows Server – UNIX/Linux – Artisoft’s LANtastic – Banyan’s VINES 53 Mobile Operating System ▪ A mobile operating system (OS) is the software that allows mobile devices like phones, tablets and other smart devices like wearable technology to run applications and other programs. ▪ Most mobile operating systems only work on specific hardware. – For example, iOS is for iPhones only, blackberryOS is for blackberry phones alone etc 54 Types of Mobile Operating System – iOS – Android – PalmOS – webOS – HarmonyOS – Windows Mobile – FireOS 55

Use Quizgecko on...
Browser
Browser