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

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

Document Details

GlisteningPoincare

Uploaded by GlisteningPoincare

CIC - Canadian International College

2024

Tags

operating systems computer science system architecture

Full Transcript

CSC 352: Operating System Lecture 1: Introduction to Operating System (OS) Dr.. Tarek Abd EL Rahman Classroom Code Btp7xge Summer 2024 Operating System CSC 353 Operating System (CSC 352) Grading Method: ▪ Midterm Exam 20 ▪ lab...

CSC 352: Operating System Lecture 1: Introduction to Operating System (OS) Dr.. Tarek Abd EL Rahman Classroom Code Btp7xge Summer 2024 Operating System CSC 353 Operating System (CSC 352) Grading Method: ▪ Midterm Exam 20 ▪ lab 15 ▪ Lec. Quizzes 5 ▪ Lec. Attendance 5 ▪ Lec. Project 5 ▪ Final Exam 50 Text Book: Operating system Concepts, 9th Edition byAbraham Silberschatz, Peter Galvin, Greg Gagne, (available online). Introduction ◼ Computer-system Organization Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Introduction ◼ Computer system can be divided into four components: ⚫ Hardware – provides basic computing resources  CPU, memory, I/O devices ⚫ Application programs – define the ways in which the system resources are used to solve the computing problems of the users  Word processors, compilers, web browsers, database systems, video games ⚫ Users  People, machines, other computers Silberschatz, Galvin and Gagne©2013 ⚫ Operating system  Controls and coordinates use of hardware among various applications and users Operating System Concepts – 9th Edition What is an Operating System? ◼ Operating System (OS) is a program that acts as an intermediary between a user of a computer and the computer hardware ◼ Operating system goals: ⚫ Execute user programs and make solving user problems easier ⚫ Make the computer system convenient to use ⚫ Use the computer hardware in an efficient manner ◼ OS is a resource allocator ⚫ Manages all resources ⚫ Decides between conflicting requests for efficient and fair resource use ◼ OS is a control program ⚫ Controls execution of programs to prevent errors and Silberschatz, Galvin and Gagne©2013 improper use of the computer Operating System Concepts – 9th Edition History and Examples of Operating System MS-DOS Windows Mac OS Linux Solaris Android Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Microsoft DOS DOS stands for Disk Operating System. Developed by Microsoft Inc. Using command line interface. It does not support multiple users and multitasking. First version: MS-DOS 1.0 (1981) Final version: MS-DOS 7.0 (1995) Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Windows Produced by Microsoft, Using graphical user interface (GUI). Support multitasking and multiuser. First version: Windows 1.0 (1985) Latest version: Windows 11 Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Mac OS The official name of the Macintosh Operating System. Created by Apple Inc. Operating System for Apple Macintosh computer. First version: Mac System 1 (1984) Latest version: Mac OS 10.14.6 Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Linux A freely-distributable open source operating system that runs on a number of hardware platforms. Linux has become an extremely popular alternative to proprietary operating systems. First version: Linux (1992) Latest version: Linux 5.14.10 Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Solaris Solaris is a Unix operating system originally developed by Sun Microsystems Solaris can be installed from physical media or a network for use on a desktop or server Used on server and workstation First version: Solaris 1 (1991) Latest version: SunOS 11.4 Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Android Android is a Linux-based operating system for mobile devices such as smartphones and tablet computers It is developed by the Open Handset Alliance, led by Google, and other companies First version: Android 1.0 (2008) Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Examples of Operating System with Market Share Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Functions of Operating System ◼ Some typical operating system functions may include managing memory, files, processes, I/O system & devices, security, etc. ◼ Below are the main functions of Operating System: Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Functions of Operating System, Cont. ◼ Process management:- Process management helps OS to create and delete processes. It also provides mechanisms for synchronization and communication among processes. ◼ Memory management:- Memory management module performs the task of allocation and de-allocation of memory space to programs in need of this resources. ◼ Secondary-Storage Management: Systems have several levels of storage which includes primary storage, secondary storage, and cache storage. Instructions and data must be stored in primary storage or cache so that a running program can reference it. ◼ Device Management: Device management keeps tracks of all devices. This module also responsible for this task is known as the I/O controller. It also performs the task of allocation and de-allocation of the devices. ◼ I/O System Management: One of the main objects of any OS is to manage the communication between Silberschatz, Galvin and Gagne©2013 user and device drivers Operating System Concepts – 9th Edition Functions of Operating System, Cont. ◼ File management:- It manages all the file-related activities such as organization storage, retrieval, naming, sharing, and protection of files. ◼ Security: Security module protects the data and information of a computer system against malware threat and authorized access. ◼ Command interpretation: This module is interpreting commands given by the and acting system resources to process that commands. ◼ Networking: A distributed system is a group of processors which do not share memory, hardware devices, or a clock. The processors communicate with one another through the network. ◼ Job accounting: Keeping track of time & resource used by various job and users. ◼ Communication management: Coordination and assignment of compilers, interpreters, and another software resource of the various users of the computer systems. Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Operating System Structure ◼ Multi-Tasking/Time-sharing operating system is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing ⚫ Response time should be < 1 second ⚫ Each user has at least one program executing in memory Process ⚫ If several jobs ready to run at the same time CPU scheduling ⚫ If processes don’t fit in memory, Swapping moves them in and out to run ⚫ Virtual memory allows execution of processes not completely in memory Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Virtualization? What is virtualization?, Cont. ◼ Virtualization is technology that allows you to create multiple simulated environments or dedicated resources from a single, physical hardware system. Software called a hypervisor connects directly to that hardware and allows you to split 1 system into separate, distinct, and secure environments known as virtual machines (VMs). Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition What is virtualization?, Cont. ◼ A virtual machine (VM) is a virtual environment that functions as a virtual computer system with its own CPU, memory, network interface, and storage, created on a physical hardware system (located off- or on-premises). ◼ The physical machines, equipped with a hypervisor such as Kernel-based Virtual Machine (KVM), is called the host machine, host computer, host operating system, or simply host. The hypervisor treats compute resources—like CPU, memory, and storage—as a pool of resources that can easily be relocated between existing guests or to new virtual machines. Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Why use a VM?, Cont. ◼ Server consolidation is a top reason to use VMs. Most operating system and application deployments only use a small amount of the physical resources available. By virtualizing your servers, you can place many virtual servers onto each physical server to improve hardware utilization. ◼ This keeps you from needing to purchase additional physical resources, like hard drives or hard disks, as well as reducing the need for power, space, and cooling in the datacenter. VMs provide additional disaster recovery options by enabling failover and redundancy that could previously only be achieved through additional hardware. Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Why use a VM? ◼ A VM provides an environment that is isolated from the rest of a system, so whatever is running inside a VM won’t interfere with anything else running on the host hardware. ◼ Because VMs are isolated, they are a good option for testing new applications or setting up a production environment. You can also run a single purpose VM to support a specific process. ◼ VMs allow multiple different operating systems to run simultaneously on a single computer—like a Linux® distro on a MacOS laptop. ◼ VMs are isolated from the rest of the system, and multiple VMs can exist on a single piece of hardware, like a server. They can be moved between host servers depending on demand or to use resources more efficiently. Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition Cloud Computing ◼ Delivers computing, storage, even apps as a service across a network ◼ Logical extension of virtualization because it uses virtualization as the base for it functionality. Silberschatz, Galvin and Gagne ©2013 Cloud Computing ◼ Cloud Computing types ⚫ Public cloud – available via Internet to anyone willing to pay ⚫ Private cloud – run by a company for the company’s own use ⚫ Hybrid cloud – includes both public and private cloud components ⚫ Software as a Service (SaaS) – one or more applications available via the Internet (i.e., word processor) ⚫ Platform as a Service (PaaS) – software stack ready for application use via the Internet (i.e., a database server) ⚫ Infrastructure as a Service (IaaS) – servers or storage available over Internet (i.e., storage available for backup use) Silberschatz, Galvin and Gagne©2013 Operating System Concepts – 9th Edition RedHat, Inc. is an American IBM subsidiary software company that provides open-source software products to enterprises. Red Hat has become associated to a large extent with its enterprise operating system Red Hat Enterprise Linux. Red Hat is the world’s leading provider of enterprise open source solutions, using a community- powered approach to deliver high-performing Linux cloud technologies. Advantages of Linux Top Benefits of Linux: 1. Free and Open-source Linux is freely available for community use, unlike macOS & Microsoft Windows. The Linux source code is easily available. 2. Secure and less vulnerable to malware & viruses Linux provides a safer and more secure environment for the users to work on. That’s why Linux is the first choice of developers. 3. Linux Distributions: Different flavors of Linux There are so many Linux distributions also called Linux distros available for the community to choose from and use. All of these Linux distributions describe the different flavors of the Linux operating system. Following are some of the popular Linux distributions: Ubuntu, Fedora, CentOS, etc... 4. Lightweight and requires very few system resources Linux is lightweight and requires very few system resources including RAM and Hard disk space to run. Advantages of Linux, Cont. Top Benefits of Linux: 5. Stable and high performance Linux operating system is very stable because it’s lightweight. Linux systems rarely hang up/slow down while using it. Hence Linux users need not reboot their system again and again to maintain its stability and performance. Linux supports multiple users very effectively and efficiently. It is an ideal operating system for multitasking that can easily handle multiple tasks at the same time because Linux is very reliable in process management. It can be used to handle a large number of networks and workstations without affecting their efficiency. 6. Fast, easy, and safe Software updates It is one of the most favorable features of Linux operating systems. There is a vast library of Linux software that a user can easily install. In Linux, all the software and system updates are in user control. These software updates can be downloaded directly from the web and installed on the system very fast without generating any issues. 7. Excellent community support If we encounter any errors or issues while using a Linux system then the troubleshooting becomes very easy because of the vast community support available for Linux users. Practical Outlines Red Hat System Administration: ❑ Get started with Red Hat Enterprise Linux ❑ Access the command line ❑ Manage files from the command line ❑ Get help in Red Hat Enterprise Linux ❑ Create, view, and edit text files ❑ Manage local users and groups ❑ Control access to files ❑ Monitor and manage Linux processes ❑ Manage networking ❑ Configure and secure SSH ❑ Archive and transfer files ❑ Install and update software packages Red Hat Certifications Value of Red Hat certification The Red Hat Certified Systems Administrator (RHCSA), for example, is Red Hat’s basic certification which guarantees that an administrator knows how to configure local storage, work with the system security controls such as SELinux, Firewalls, and Access controls, and manage its file systems and user base. Process Concept Introduction and overview Early computer systems allowed only one program to be executed at a time. This program had complete control of the system and had access to all the system's resources. In contrast, current-day computer systems allow multiple programs to be loaded into memory and executed concurrently. This evolution required firmer control and more division of the various programs; and these needs resulted in the notion of a process. Program is passive entity stored on disk (executable file), process is active. Program becomes process when executable file loaded into memory. Execution of program started via GUI mouse clicks, command line entry of its name, etc. One program can be several processes Consider multiple users executing the same program Process Concept ❑ Process – A program in execution; A process is defined as an entity which represents the basic unit of work to be implemented in the system; Such as a compiler is a process; A system task, such as sending output to a printer, can also be a process (or at least part of one). A process needs certain resources-including CPU time, memory, files, and I/O devices to accomplish its task. These resources are either given to the process when it is created or- allocated to it while it is running. For example, consider a process whose function is to display the status of a file on the screen. The process will be given as an input the name of the file and will execute the appropriate instructions and system calls to obtain and display on the terminal the desired information. Process State As a process executes, it changes state new: The process is being created ready: The process is waiting to be assigned to a processor running: Instructions are being executed waiting: The process is waiting for some event to occur terminated: The process has finished execution Scheduling Algorithm Optimization Criteria ◼ CPU utilization – keep the CPU as busy as possible (Max CPU utilization) ◼ Throughput – number of processes that complete their execution per time unit (Max throughput) ◼ Turnaround time – amount of time to execute a particular process (Min turnaround time) ◼ Waiting time – amount of time a process has been waiting in the ready queue (Min waiting time) ◼ Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment) (Min response time) Operating System Concepts – 9th Edition 6.14 Silberschatz, Galvin and Gagne ©2013 First- Come, First-Served (FCFS) Scheduling Jobs are executed on first come, first serve basis. Easy to understand and implement. Its implementation is based on FIFO queue. Poor in performance as average wait time is high. Operating System Concepts – 9th Edition 6.16 Silberschatz, Galvin and Gagne ©2013 Example of FCFS - no.1 Consider the following set of processes that arrive at time 0 in the order: P1 , P2 , P3 , the length of the CPU burst time given in milliseconds. Process Burst Time P1 24 P2 3 P3 3 Operating System Concepts – 9th Edition 6.17 Silberschatz, Galvin and Gagne ©2013 Example of FCFS - no.1 (Answer) Consider the following set of processes that arrive at time 0 in the order: P1 , P2 , P3 , the length of the CPU burst time given in milliseconds. Process Burst Time P1 24 P2 3 P3 3 ◼ The Gantt Chart for the schedule is: P1 P2 P3 0 24 27 30 ◼ Waiting time for P1 = 0; P2 = 24; P3 = 27 ◼ Average waiting time: (0 + 24 + 27)/3 = 17 Operating System Concepts – 9th Edition 6.18 Silberschatz, Galvin and Gagne ©2013 Example of FCFS - no.2 Suppose that the processes in previous example arrive in the order: P2 , P3 ,P1 Operating System Concepts – 9th Edition 6.19 Silberschatz, Galvin and Gagne ©2013 Example of FCFS - no.2 (Answer) Suppose that the processes in previous example arrive in the order: P2 , P3 , P1 ◼ The Gantt chart for the schedule is: P2 P3 P1 0 3 6 30 ◼ Waiting time for P1 = 6; P2 = 0; P3 =3 ◼ Average waiting time: (6 + 0 + 3)/3 = 3 ◼ Much better than previous case Operating System Concepts – 9th Edition 6.20 Silberschatz, Galvin and Gagne ©2013

Use Quizgecko on...
Browser
Browser