Tcss 422: Operating Systems Objectives – 4/7

Total Page:16

File Type:pdf, Size:1020Kb

Tcss 422: Operating Systems Objectives – 4/7 TCSS 422 A – Spring 2020 4/7/2020 School of Engineering and Technology TCSS 422: OPERATING SYSTEMS OBJECTIVES – 4/7 Questions from 4/2 Chapter 4: Processes INTRODUCTION TO . Kernel data structures for processes and threads OPERATING SYSTEMS, Chapter 5: Process API PROCESSES . fork(), wait(), exec() Assignment 0 Chapter 6: Limited Direct Execution Wes J. Lloyd . Direct execution School of Engineering and Technology . Limited direct execution University of Washington - Tacoma . CPU modes . System calls and traps . Cooperative multi-tasking . Context switching and preemptive multi-tasking TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 April 7, 2020 L3.2 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 1 2 MATERIAL / PACE FEEDBACK FROM 4/2 Please classify your perspective on material covered in On Chapter 2: today’s class (60 respondents): “I feel like I got lost at points but I can't drill down 1-mostly review, 5-equal new/review, 10-mostly new exactly what the issue was or what I was missing to fully understand what you were showing us. I just recall you Average – 7.03 ( from 5.83) saying this was an intro instead of a deep dive into the material” Please rate the pace of today’s class: YES! Chapter 2 provides a broad survey of the “three easy 1-slow, 5-just right, 10-fast pieces” all in one lecture. We will revisit everything in Average – 5.76 ( from 5.17) more detail as we go along… I also introduced “context switches” ahead of time with the mem.c example. We’ll go over this again today in Ch. 6 TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.3 April 7, 2020 L3.4 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 3 4 FEEDBACK - 2 FEEDBACK - 3 Processes have their own address space (i.e. memory), The overall process of concurrency is still a bit unclear to me. threads do not. A process crashing won't affect another process. Concurrency simply means doing multiple things at the same time on a computer. i.e. Chrome tabs are processes, and a crashed tab does not crash the entire browser Today’s computer have multiple processing ** Are there any other differences between threads and cores processes? (i.e. CPU cores) Linux threads have a smaller data structure than processes Each core can perform a different independent Threads are owned by processes task “concurrently” Creating a new thread is faster than creating a new process at the same time Threads share memory, and can communicate through RAM Check how many CPU Inter-process communication involves opening a file or cores in Ubuntu with network stream (pipe) between processes “lscpu” (covered in TCSS 430) TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.5 April 7, 2020 L3.6 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 5 6 Slides by Wes J. Lloyd L3.1 TCSS 422 A – Spring 2020 4/7/2020 School of Engineering and Technology FEEDBACK - 4 FEEDBACK - 5 Why is it best for the CPU to perform a context Another student suggested that a single program switch when a thread is blocked? that didn't have any concurrency would be able to run without an OS, however I am having trouble Deschedule Which states is the Running d Ready imagining a computer without an OS. process (job) idle? Scheduled In a sense, sort of, yes What are the I/O: initiate I/O: done We talk about DIRECT EXECUTION today as part of consequences of suspending an Chapter 6, which is a bit like a computer without idle process? Blocked an OS. a running process? TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.7 April 7, 2020 L3.8 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 7 8 MOTIVATION FOR LINUX MOTIVATION FOR LINUX - 2 It is worth noting the importance of Linux for today’s Consider an example where you’re asked to develop a web developers and computer scientists. services backend that requires 10 x 8-CPU-core virtual servers The CLOUD runs many virtual machines, recently in 2019 a key Your organization investigates hosting costs on Amazon cloud milestone was reached. 8-core VM is “c5d.2xlarge” Even on Microsoft Azure (the Microsoft Cloud), there were more Linux Virtual Machines (> 50%) than Windows. https://www.zdnet.com/article/microsoft-developer-reveals- linux-is-now-more-used-on-azure-than-windows-server/ https://www.zdnet.com/article/it-runs-on-the-cloud-and-the- cloud-runs-on-linux-any-questions/ The majority of application back-ends (server-side), cloud or Windows hourly price 75.2 not, run on Linux. Linux hourly price 38.4 This is due to licensing costs, example: See: https://www.ec2instances.info/ TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.9 April 7, 2020 L3.10 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 9 10 “QUIZ” 0 – C PROGRAMMING MOTIVATION FOR LINUX - 2 BACKGROUND SURVEY Consider an example where you’re asked to develop a web Available via Canvas System servicesOne year backend cloud that hosting requires cost:10 x 8-CPU-core virtual servers Your organization investigates hosting costs on Amazon cloud 8-coreWINDOWS VM is “c5d.2xlarge” Under: 10 VMs x 8,760 hours x $.752 = $65,875.20 Assignments Tutorials/Quizzes/In-class Activities Linux Please disregard grade assigned by Canvas 10 VMs x 8,760 hours x $.384 = $33,638.40 All submissions will receive 10 pts after assignment WindowsWindows hourly comes price 75.2 at a 95.8% price premium Linux hourly price 38.4 closes - (closes Thursday 4/9 @ 11:59p) See: https://www.ec2instances.info/ TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.11 April 7, 2020 L3.12 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 11 12 Slides by Wes J. Lloyd L3.2 TCSS 422 A – Spring 2020 4/7/2020 School of Engineering and Technology VIRTUAL MACHINE SURVEY OBJECTIVES – 4/7 Virtual Machine Survey Questions from 4/2 Chapter 4: Processes Request for Ubuntu 18.04 VMs has been sent to . Kernel data structures for processes and threads the School of Engineering and Technology LABS Chapter 5: Process API Expect response soon regarding connection . fork(), wait(), exec() information Assignment 0 Chapter 6: Limited Direct Execution . Direct execution Thank you! . Limited direct execution . CPU modes . System calls and traps . Cooperative multi-tasking . Context switching and preemptive multi-tasking TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.13 April 7, 2020 L3.14 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 13 14 PROCESS DATA STRUCTURES OS provides data structures to track process information . Process list . Process Data . State of process: Ready, Blocked, Running CHAPTER 4: . Register context PROCESSES PCB (Process Control Block) . A C-structure that contains information about each process TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 April 7, 2020 L3.16 School of Engineering and Technology, University of Washington - Tacoma L3.15 School of Engineering and Technology, University of Washington - Tacoma 15 16 XV6 KERNEL DATA STRUCTURES XV6 KERNEL DATA STRUCTURES - 2 xv6: pedagogical implementation of Linux // the information xv6 tracks about each process Simplified structures // including its register context and state struct proc { // the registers xv6 will save and restore char *mem; // Start of process memory // to stop and subsequently restart a process uint sz; // Size of process memory struct context { char *kstack; // Bottom of kernel stack int eip; // Index pointer register // for this process int esp; // Stack pointer register enum proc_state state; // Process state int ebx; // Called the base register int pid; // Process ID int ecx; // Called the counter register struct proc *parent; // Parent process int edx; // Called the data register void *chan; // If non-zero, sleeping on chan int esi; // Source index register int killed; // If non-zero, have been killed int edi; // Destination index register struct file *ofile[NOFILE]; // Open files int ebp; // Stack base pointer register struct inode *cwd; // Current directory }; struct context context; // Switch here to run process struct trapframe *tf; // Trap frame for the // the different states a process can be in // current interrupt enum proc_state { UNUSED, EMBRYO, SLEEPING, }; RUNNABLE, RUNNING, ZOMBIE }; TCSS422: Operating Systems [Spring 2020] TCSS422: Operating Systems [Spring 2020] April 7, 2020 L3.17 April 7, 2020 L3.18 School of Engineering and Technology, University of Washington - Tacoma School of Engineering and Technology, University of Washington - Tacoma 17 18 Slides by Wes J. Lloyd L3.3 TCSS 422 A – Spring 2020 4/7/2020 School of Engineering and Technology LINUX: STRUCTURES
Recommended publications
  • Interrupts and Exceptions CPU Modes and Address Spaces Dual-Mode Of
    CPU Modes and Address Spaces There are two processor (CPU) modes of operation: • Kernel (Supervisor) Mode and • User Mode The processor is in Kernel Mode when CPU mode bit in Status Interrupts and Exceptions register is set to zero. The processor enters Kernel Mode at power-up, or as result of an interrupt, exception, or error. The processor leaves Kernel Mode and enters User Mode when the CPU mode bit is set to one (by some instruction). Memory address space is divided in two ranges (simplified): • User address space – addresses in the range [0 – 7FFFFFFF16] Studying Assignment: A.7 • Kernel address space Reading Assignment: 3.1-3.2, A.10 – addresses in the range [8000000016 – FFFFFFFF16] g. babic Presentation B 28 g. babic 29 Dual-Mode of CPU Operation MIPS Privilege Instructions • CPU mode bit indicates the current CPU mode: 0 (=kernel) With CPU in User Mode, the program in execution has access or 1 (=user). only to the CPU and FPU registers, while when CPU operates • When an interrupt occurs, CPU hardware switches to the in Kernel Mode, the program has access to the full capabilities kernel mode. of processor including CP0 registers. • Switching to user mode (from kernel mode) done by setting CPU mode bit (by an instruction). Privileged instructions can not be executed when the Exception/Interrupt processor is in User mode, they can be executed only when the processor is in Kernel mode. kernel user Examples of MIPS privileged instructions: Set user mode • any instruction that accesses Kernel address space • all instructions that access any of CP0 registers, e.g.
    [Show full text]
  • RTA-OSEK Binding Manual: TMS470/TI
    RTA-OSEK Binding Manual: TMS470/TI Contact Details ETAS Group www.etasgroup.com Germany USA ETAS GmbH ETAS Inc. Borsigstraße 14 3021 Miller Road 70469 Stuttgart Ann Arbor, MI 48103 Tel.:+49 (711) 8 96 61-102 Tel.: +1 (888) ETAS INC Fax:+49 (711) 8 96 61-106 Fax: +1 (734) 997-94 49 www.etas.de www.etasinc.com Japan France ETAS K.K. ETAS S.A.S. Queen's Tower C-17F, 1, place des États-Unis 2-3-5, Minatomirai, Nishi-ku, SILIC 307 Yokohama, Kanagawa 94588 Rungis Cedex 220-6217 Japan Tel.: +33 (1) 56 70 00 50 Tel.: +81 (45) 222-0900 Fax: +33 (1) 56 70 00 51 Fax: +81 (45) 222-0956 www.etas.fr www.etas.co.jp Korea Great Britain ETAS Korea Co. Ltd. ETAS UK Ltd. 4F, 705 Bldg. 70-5 Studio 3, Waterside Court Yangjae-dong, Seocho-gu Third Avenue, Centrum 100 Seoul 137-889, Korea Burton-upon-Trent Tel.: +82 (2) 57 47-016 Staffordshire DE14 2WQ Fax: +82 (2) 57 47-120 Tel.: +44 (0) 1283 - 54 65 12 www.etas.co.kr Fax: +44 (0) 1283 - 54 87 67 www.etas-uk.net Copyright Notice © 2001 - 2007 LiveDevices Ltd. All rights reserved. Version: M00088-001 No part of this document may be reproduced without the prior written consent of LiveDevices Ltd. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. Disclaimer The information in this document is subject to change without notice and does not represent a commitment on any part of LiveDevices.
    [Show full text]
  • Bringing Virtualization to the X86 Architecture with the Original Vmware Workstation
    12 Bringing Virtualization to the x86 Architecture with the Original VMware Workstation EDOUARD BUGNION, Stanford University SCOTT DEVINE, VMware Inc. MENDEL ROSENBLUM, Stanford University JEREMY SUGERMAN, Talaria Technologies, Inc. EDWARD Y. WANG, Cumulus Networks, Inc. This article describes the historical context, technical challenges, and main implementation techniques used by VMware Workstation to bring virtualization to the x86 architecture in 1999. Although virtual machine monitors (VMMs) had been around for decades, they were traditionally designed as part of monolithic, single-vendor architectures with explicit support for virtualization. In contrast, the x86 architecture lacked virtualization support, and the industry around it had disaggregated into an ecosystem, with different ven- dors controlling the computers, CPUs, peripherals, operating systems, and applications, none of them asking for virtualization. We chose to build our solution independently of these vendors. As a result, VMware Workstation had to deal with new challenges associated with (i) the lack of virtual- ization support in the x86 architecture, (ii) the daunting complexity of the architecture itself, (iii) the need to support a broad combination of peripherals, and (iv) the need to offer a simple user experience within existing environments. These new challenges led us to a novel combination of well-known virtualization techniques, techniques from other domains, and new techniques. VMware Workstation combined a hosted architecture with a VMM. The hosted architecture enabled a simple user experience and offered broad hardware compatibility. Rather than exposing I/O diversity to the virtual machines, VMware Workstation also relied on software emulation of I/O devices. The VMM combined a trap-and-emulate direct execution engine with a system-level dynamic binary translator to ef- ficiently virtualize the x86 architecture and support most commodity operating systems.
    [Show full text]
  • AMD APP SDK V2.9.1
    AMD APP SDK v2.9.1 FAQ 1 General Questions 1. Do I need to use additional software with the SDK? To run an OpenCL™ application, you must have an OpenCL™ runtime on your system. If your system includes a recent AMD discrete GPU, or an APU, you also should install the latest Catalyst™ drivers, which can be downloaded from AMD.com. Information on supported devices can be found at developer.amd.com/appsdk. If your system does not include a recent AMD discrete GPU, or APU, the SDK installs a CPU-only OpenCL™ run-time. Also, we recommend using the debugging profiling and analysis tools contained in the AMD CodeXL heterogeneous compute tools suite. 2. Which versions of the OpenCL™ standard does this SDK support? AMD APP SDK 2.9.1 supports the development of applications using the OpenCL™ Specification v 1.2. 3. Will applications developed to execute on OpenCL™ 1.1 still operate in an OpenCL™ 1.2 environment? OpenCL™ is designed to be backwards compatible. The OpenCL™ 1.2 run-time delivered with the AMD Catalyst drivers run any OpenCL™ 1.1-compliant application. However, an OpenCL™ 1.2-compliant application will not execute on an OpenCL™ 1.1 run-time if APIs only supported by OpenCL™ 1.2 are used. 4. Does AMD provide any additional OpenCL™ samples, other than those contained within the SDK? The most recent versions of all of the samples contained within the SDK are also available for individual download from the developer.amd.com/appsdk “Samples & Demos” page. This page also contains additional samples that either were too large to include in the SDK, or which have been developed since the most recent SDK release.
    [Show full text]
  • Operating Systems
    Operating Systems − they will be added as we go • you can also use slides from previous years Petr Ročkai − they are already in study materials − but: not everything is covered in those These are draft (work in progress) lecture notes for PB152. It is expected to be gradually ��illed in, hopefully before the semester You are reading the lecture notes for the course PB152 Operating ends. For now, it is mostly a printable version of the slides. Systems. This is a supplementary resource based on the lecture Organisation slides, but with additional details that would not it into the slide format. These lecture notes should be self-contained in the sense • lectures, with an optional seminar that they only rely on knowledge you have from other courses, • written exam at the end like PB150 Computer Systems (or PB151) or PB071 Principles of − multiple choice Low-Level programming. Likewise, being familiar with the topics − free-form questions covered in these lecture notes is suficient to pass the exam. • 1 online test mid-term, 1 before exam − mainly training for the exam proper Books The written exam will consist of two parts, a multiple-choice test • there are a few good OS books (with exactly one correct answer on each question) and a free- • you are encouraged to get and read them form question. Additionally, you will be required to pass a mid- term test with the same pool of multiple-choice questions. The • A. Tanenbaum: Modern Operating Systems question pool is known in advance: both the entire mid-term and • A.
    [Show full text]
  • Kguard: Lightweight Kernel Protection Against Return-To-User Attacks
    kGuard: Lightweight Kernel Protection against Return-to-user Attacks VasileiosP.Kemerlis GeorgiosPortokalidis AngelosD.Keromytis Network Security Lab Department of Computer Science Columbia University, New York, NY, USA {vpk, porto, angelos}@cs.columbia.edu Abstract Such return-to-user (ret2usr) attacks have affected all major OSs, including Windows [60], Linux [16, 18], Return-to-user (ret2usr) attacks exploit the operating sys- and FreeBSD [19, 59, 61], while they are not limited to tem kernel, enabling local users to hijack privileged ex- x86 systems [23], but have also targeted the ARM [30], ecution paths and execute arbitrary code with elevated DEC [31], and PowerPC [25] architectures. privileges. Current defenses have proven to be inade- There are numerous reasons to why attacks against the quate, as they have been repeatedly circumvented, in- kernel are becoming more common. First and foremost, cur considerable overhead, or rely on extended hypervi- processes running with administrative privileges have be- sors and special hardware features. We present kGuard, come harder to exploit due to the various defense mech- a compiler plugin that augments the kernel with com- anisms adopted by modern OSs [34,52]. Second, NULL pact inline guards, which prevent ret2usr with low per- pointer dereference errors had not received significant at- formance and space overhead. kGuard can be used with tention, until recently, exactly because they were thought any operating system that features a weak separation be- impractical and too difficult to exploit. In fact, 2009 has tween kernel and user space, requires no modifications been proclaimed, by some security researchers, as “the to the OS, and is applicable to both 32- and 64-bit ar- year of the kernel NULL pointer dereference flaw”[15].
    [Show full text]
  • Vsphere Virtual Machine Administration
    vSphere Virtual Machine Administration 02 APR 2020 VMware vSphere 7.0 VMware ESXi 7.0 vCenter Server 7.0 vSphere Virtual Machine Administration You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com © Copyright 2009-2020 VMware, Inc. All rights reserved. Copyright and trademark information. VMware, Inc. 2 Contents About vSphere Virtual Machine Administration 10 1 Updated Information 11 2 Introduction to VMware vSphere Virtual Machines 12 Virtual Machine Files 12 Virtual Machines and the Virtual Infrastructure 13 Virtual Machine Lifecycle 14 Virtual Machine Components 14 Virtual Machine Hardware Available to vSphere Virtual Machines 16 Virtual Machine Options 18 The vSphere Client 19 Where to Go From Here 20 3 Deploying Virtual Machines 21 Create a Virtual Machine with the New Virtual Machine Wizard 22 Clone a Virtual Machine to a Template 25 Deploy a Virtual Machine from a Template 28 Clone an Existing Virtual Machine 32 Cloning a Virtual Machine with Instant Clone 37 Clone a Template to a Template 37 Convert a Template to a Virtual Machine 40 4 Deploying OVF and OVA Templates 42 OVF and OVA File Formats and Templates 42 Deploy an OVF or OVA Template 43 Export an OVF Template 45 Browse VMware Virtual Appliance Marketplace 46 5 Using Content Libraries 47 Hierarchical Inheritance of Permissions for Content Libraries 48 Content Library Administrator Role 50 Create a Library 50 Edit a Content Library 52 Configure Advanced Content Library Settings 54 Managing a Publisher Local Library 55 Create a Subscription for a Local Library 57 Publish the Contents of a Library to a Subscriber 58 VMware, Inc.
    [Show full text]
  • CIS 3207 - Operating Systems CPU Mode
    CIS 3207 - Operating Systems CPU Mode Professor Qiang Zeng Spring 2018 CPU Modes • Two common modes – Kernel mode • The CPU has to be in this mode to execute the kernel code – User mode • The CPU has to be in this mode to execute the user code CIS 3207 – Operating Systems 2 Important questions • How are CPU modes implemented? • Why are CPU modes needed? • Difference between Kernel mode and User mode • How are system calls implemented? • Advanced topic: Virtualization CIS 3207 – Operating Systems 3 How CPU Modes are implemented • Implemented through protection rings – A modern CPU typical provides different protection rings, which represent different privilege levels • A ring with a lower number has higher privileges – Introduced by Multics in 60’s – E.g., an X86 CPU usually provides four rings, and a Linux/Unix/Windows OS uses Ring 0 for the kernel mode and Ring 3 for the user mode CIS 3207 – Operating Systems 4 Why are Protection Rings needed? • Fault isolation: a fault (e.g., divided by 0) in the code running in a less-privileged ring can be captured and handled by code in a more-privileged ring • Privileged instructions: certain instructions can only be issued in a privileged ring; thus an OS can implement resource management and isolation here • Privileged memory space: certain memory can only be accessed in a privileged ring All these are demonstrated in the difference between the kernel mode and the user mode CIS 3207 – Operating Systems 5 Kernel Mode vs. User Mode? • A fault in the user space (e.g., divided by zero, invalid access,
    [Show full text]
  • PIC32 Family Reference Manual
    Section 2. CPU for Devices with M4K® Core HIGHLIGHTS This section of the manual contains the following topics: 2 CPU for Devices 2.1 Introduction................................................................................................................2-2 with M4K 2.2 Architecture Overview ............................................................................................... 2-3 2.3 PIC32 CPU Details .................................................................................................... 2-6 2.4 Special Considerations When Writing to CP0 Registers ......................................... 2-11 2.5 Architecture Release 2 Details ................................................................................ 2-12 ® Core 2.6 Split CPU bus .......................................................................................................... 2-12 2.7 Internal System Busses........................................................................................... 2-13 2.8 Set/Clear/Invert........................................................................................................ 2-13 2.9 ALU Status Bits........................................................................................................ 2-14 2.10 Interrupt and Exception Mechanism ........................................................................ 2-14 2.11 Programming Model ................................................................................................ 2-14 2.12 Coprocessor 0 (CP0) Registers..............................................................................
    [Show full text]
  • Processes and Threads
    Processes and Threads Yücel Saygın |These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum 1 Sequential Computation • Algorithm: collection of instructions along with their sequential order of execution – Algorithm is the basis for sequential execution – Has one entry point and instructions are executed in sequence with branches and loops until termination • Source program: algorithm encoded in a programming language (Java, C, C++) • Computer systems have tools that can convert a source program into a binary program (object code, executable) • Binary program can be executed directly by the computer 2 Sequential Computation • OS procedure calls are used inside the binary code to interact with the OS: for using I/O devices and to terminate execution. • Programmers write their code with the assumption that it will be executed in sequential fashion • But OS may interleave the execution of multiple programs 3 Process • Process is a program in execution • It includes – Program itself – Data – resources (such as files) – Execution info (process relation information kept by OS) 4 Processor’s Point of View Program Counter Main Memory 5 CPU //Assembly language that does a = b + c load R3, b // Copy the value of b from memory to R3 load R4, c // Copy the value for c from memory to R4 Add R3, R4 // sum placed in R3 Store R3, a // store the sum into memory cell a 3046 0100101111…10 3050 Fetch Unit PC 3054 3054 Decode Unit 3058 IR Load R4, c Exec Unit Main Memory 6 CPU • Registers hold key variables and temporary
    [Show full text]
  • Operating Systems
    Operating-System Services and Structure Operating Systems P. Healy CS1-08 Computer Science Bldg. tel: 202727 [email protected] Autumn 2020–2021 P. Healy (University of Limerick) CS4023 Autumn 2020–2021 1 / 22 Operating-System Services and Structure Outline 1 Operating-System Services and Structure OS Services: Assistance to the User OS Services: Efficient Operation OS Operations P. Healy (University of Limerick) CS4023 Autumn 2020–2021 2 / 22 OS Services: Assistance to the User Operating-System Services and Structure OS Services: Efficient Operation OS Operations Operating System Definition Intermediary between a user of a computer and the computer hardware Control program Controls execution of programs to prevent errors and improper use of the computer Resource allocator Manages all resources Decides between for efficient and fair resource use P. Healy (University of Limerick) CS4023 Autumn 2020–2021 3 / 22 OS Services: Assistance to the User Operating-System Services and Structure OS Services: Efficient Operation OS Operations Operating System Design Design and Implementation of OS not “solvable”, but some approaches have proven successful Internal structure of different Operating Systems can vary widely Affected by choice of hardware, type of system User goals and System goals User goals: operating system should be , easy to learn, reliable, System goals: operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient P. Healy (University of Limerick) CS4023 Autumn 2020–2021 4 / 22 OS Services: Assistance to the User Operating-System Services and Structure OS Services: Efficient Operation OS Operations A View of Operating System Services P.
    [Show full text]
  • C Process Api
    TCSS 422 A – Spring 2018 4/3/2018 Institute of Technology TCSS 422: OPERATING SYSTEMS OBJECTIVES Assignment 0 – Introduction to Linux Three Easy Pieces Active Reading Quiz – Chapter 7 Process API, Feedback from 3/28 Limited Direct Execution, Scheduling Introduction Processes – Ch. 4 C Linux Process API – Ch. 5 Wes J. Lloyd Limited Direct Execution – Ch. 6 Institute of Technology . Virtualizing the CPU University of Washington - Tacoma Introduction to Scheduling – Ch. 7 Multi-level Feedback Queue Scheduler – Ch. 8 TCSS422: Operating Systems [Spring 2018] TCSS422: Operating Systems [Spring 2018] April 2, 2018 April 2, 2018 L3.2 Institute of Technology, University of Washington - Tacoma Institute of Technology, University of Washington - Tacoma VIRTUAL MACHINE SURVEY SELECTED FEEDBACK FROM 3/28 Please complete the Virtual Machine Survey is wanting What is context switching? an Institute of Technology hosted Ubuntu 16.04 VM Most bash scripts I have seen begin with #!/bin/bash https://goo.gl/forms/w9VWqkX756yXBUBt1 . You did not include this in your sample, yet it still worked. Why did it work? and/or why is this usually included if it is Submitting results today… not needed? What is fork used for? Such as in real-world applications? What is CPU virtualization? TCSS422: Operating Systems [Spring 2018] TCSS422: Operating Systems [Spring 2018] April 2, 2018 L3.3 April 2, 2018 L3.4 Institute of Technology, University of Washington - Tacoma Institute of Technology, University of Washington - Tacoma FEEDBACK - 2 How do you schedule processes manualy? . Check out the “nice” command . Does this command, schedule processes? CHAPTER 5: . Why? Why not? C PROCESS API What’s an example of a process state that’s blocked? TCSS422: Operating Systems [Spring 2018] TCSS422: Operating Systems [Spring 2018] April 2, 2018 L3.5 April 2, 2018 Institute of Technology, University of Washington - Tacoma Institute of Technology, University of Washington - Tacoma L3.6 Slides by Wes J.
    [Show full text]