3. Operating Systems



Similar documents
Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Operating Systems. and Windows

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

OPERATING SYSTEM SERVICES

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

CS420: Operating Systems OS Services & System Calls

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

Chapter 3. Operating Systems

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Programming for GCSE Topic H: Operating Systems

Tech Application Chapter 3 STUDY GUIDE

Upon completion of this chapter, you will able to answer the following questions:

Computer Literacy. Hardware & Software Classification

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

How To Understand The History Of An Operating System

LSN 10 Linux Overview

CS3600 SYSTEMS AND NETWORKS

Chapter 4. System Software. What You Will Learn... Computers Are Your Future. System Software. What You Will Learn... Starting the Computer

1 PERSONAL COMPUTERS

Using Virtual PC 7.0 for Mac with GalleryPro

OPERATING SYSTEMS STRUCTURES

CHAPTER 15: Operating Systems: An Overview

Example of Standard API

STUDY GUIDE CHAPTER 4

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Operating Systems 4 th Class

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

USB 2.0 Flash Drive User Manual

SUMMARIES OF VIDEOS GRADE 11 SYSTEMS TECHNOLOGIES

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Operating System Components and Services

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Linux Kernel Architecture

SOFTWARE TECHNOLOGIES

1/5/2013. Technology in Action

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

Operating System Fundamentals Robert Power & Robert Ford

Operating System Components

Unit 4 Objectives. System Software. Component 4: Introduction to Information and Computer Science. Unit 4: Application and System Software Lecture 2

Lesson 06: Basics of Software Development (W02D2

1.1 Electronic Computers Then and Now

Chapter 2 System Structures

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Linux Basics

Chapter 8 Objectives. Chapter 8 Operating Systems and Utility Programs. Operating Systems. Operating Systems. Operating Systems.

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

OPERATING SYSTEMS Software in the Background. Chapter 2

Operating System Today s Operating Systems File Basics File Management Application Software

System Software. 2.1 The Operating System (OS) %%describe the characteristics of different types

Primary Memory. Input Units CPU (Central Processing Unit)

Concepts in Computer Engineering. Operating Systems

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Computers: Tools for an Information Age

Operating System Structures

Unix Guide. Logo Reproduction. School of Computing & Information Systems. Colours red and black on white backgroun

New Lab Intro to KDE Terminal Konsole

Chapter 5: System Software: Operating Systems and Utility Programs

Introduction. What is an Operating System?

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014

Week Overview. Running Live Linux Sending from command line scp and sftp utilities

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 2 Introducing Operating Systems

Operating Systems. Rafael Ramirez (T, S)

Module 1 Introduction to Information and Communication Technologies

2.5" XTreme Files OS & Data Backup/Restore User Manual Please read the Instruction manual before using the XTreme Files (X Series) 1.

EUCIP IT Administrator - Module 2 Operating Systems Syllabus Version 3.0

A+ Guide to Software: Managing, Maintaining, and Troubleshooting, 5e. Chapter 3 Installing Windows

Tutorial 0A Programming on the command line

Fall Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

EXPLORING LINUX KERNEL: THE EASY WAY!

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

User Manual for Data Backups

StrikeRisk v6.0 IEC/EN Risk Management Software Getting Started

PARALLELS SERVER 4 BARE METAL README

PC Build and Manual Part 1

Getting Started with Paragon Recovery CD. Quick Guide

Chap-02, Hardware and Software. Hardware Model

Command-Line Operations : The Shell. Don't fear the command line...

CS 103 Lab Linux and Virtual Machines

International Engineering Journal For Research & Development

A single user ran a single program ran on a single computer there was no need for Page 1 of 6 Copyright Virtual University of Pakistan

Tutorial Guide to the IS Unix Service

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Chapter 3 Operating-System Structures

XTreme Files OS & Data Backup/Restore User Manual Please read the Instruction manual before using the XTreme Files (F Series) 1.

Lecture 1 Operating System Overview

System Area Manager. Remote Management

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Discovering Computers

Operating System Software

Chapter 11 I/O Management and Disk Scheduling

ELEC 377. Operating Systems. Week 1 Class 3

IT Essentials v4.1 LI Upgrade and configure storage devices and hard drives. IT Essentials v4.1 LI Windows OS directory structures

Operating Systems Overview As we have learned in working model of a computer we require a software system to control all the equipment that are

TotalShredder USB. User s Guide

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Capture and analysis of wireless traffic

Reborn Card NET. User s Manual

How to Encrypt your Windows 7 SDS Machine with Bitlocker

Transcription:

3. Operating Systems Informática Ingeniería en Electrónica y Automática Industrial Raúl Durán Díaz Juan Ignacio Pérez Sanz Álvaro Perales Eceiza Departamento de Automática Escuela Politécnica Superior Course 24 25 Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 1 / 28 Contents 1 2 3 4 Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 2 / 28

Objetives Objectives Basic s Understand what an Operating System -OS- is and its utility. Describe its different functional parts and their roles. Understand what a process is. Understand what a file system is. Learn to use the basic Linux commands, the standard Input/Output, and how to concatenate different commands. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 3 / 28 What is an Operating System? Objectives Basic s An Operating System -OS- is a program that manages the hardware resources of a computer providing services for other programs and applications. It works as an intermediate between the user and the computer hardware, facilitating its use making it more efficient. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 4 / 28

OS functions Objectives Basic s The main OS functions are: To facilitate the use of the computer and, in general, the communication computer-user To manage and assign hardware resources (processor, memory, peripherals) to processes, and deal with conflicts. To manage and maintain files in permanent memory devices (hard drive..) To protect data and programs (specially important in multiuser systems) To serve different users. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 5 / 28 Extended Machine Objectives Basic s The OS construct another level of abstraction presenting the user a virtual or extended machine with a much simpler use. It hides fine working details the user does not need to know (e.g. how to manage the read/write head of a magnetic disc) It provides an extra set of instructions, the System Calls They can be used by other programs or by the programmer working as an interphase with the OS They perform useful tasks, such as Manage processes (create, cancel,...) Manage files (create, open, close) Manage memory (load, move or free blocks of memory) The OS converts system calls in machine instructions (the only ones that the computer executes); they are as well virtual Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 6 / 28

Extended Machine Objectives Basic s nivel máquina simbólica Compiladores Editores Intérprete de comandos nivel máquina extendida Sistema Operativo nivel máquina real Instrucciones en lenguaje máquina Figure: Different levels of abstraction -machines- in a computer Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 7 / 28 Resources Administrator Objectives Basic s Example It assigns hardware resources (processor, cores, memory) to each process or user Resolve conflicts among users If various programs/users want to print at the same time, OS assigns priority and arrange them sequentially. Example While a process is waiting from data coming from hard disc, the OS can allow another process to use the processor Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 8 / 28

s A process is a program in execution. It is the main executive element in the computer We can see a process as the dynamic instance of a program. Therefore it may happen that various processes execute the same program (e.g. with different input). A computing system working is a set of one of more processes in execution according to a temporal planing established by the OS or the programmer. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 9 / 28 Elements of a process s A process can be described as: Memory space structured in sections Processor registers. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 10 / 28

Process structure s $SP $GP $PC Pila Un proceso necesita manejar registros de la CPU: 00000000000000000 11111111111111111 00000000000000000 11111111111111111 Hueco libre (variable) 00000000000000000 11111111111111111 00000000000000000 11111111111111111 Datos dinámicos Datos estáticos Instrucciones Reservado 0Direcciones de memoria crecientes contador de programa $PC puntero de pila $SP registro de estado $PSW Figure: of a process allocated in memory Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 11 / 28 Process Features s A process can just be created by another process. Any process (parent) can create other processes (child). Two system calls are used to create new processes: fork: system call by which a process creates a copy of itself; exec: Replace the contents of a running process with another program code. The general way of launching a new program is first to fork an existing process to create a new one, and then exec the new program in it (i.e. load it in memory and execute it) Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 12 / 28

Process Tree s A B C D E F Figure: Process Tree Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 13 / 28 System (Boot) s When turning on the computer The program counter PC points to an address at ROM where there is a small code (BIOS -Basic Input/Output Services- in IMB PCs) that becomes the first process to be executed. This process initializes and tests the system hardware components and starts a bigger process, the Boot Loader that loads first the OS kernel and subsequently the rest of the OS necessary to start main computer functions. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 14 / 28

Executable File s Símbolos Secciones Datos estáticos Instrucciones Cabeceras Figure: Executable File Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 15 / 28 Process Scheduling s The processor is the most valuable resource in the computer. It can just execute one process every time. When a process in execution is blocked (e.g is waiting for data coming from disc), the Scheduler suspends it and selects another process that can be executed, so to maximize the processor use. Each process is described by the memory space it uses and by the content of the registers in the moment it is suspended. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 16 / 28

Scheduling: monoprogramming s Recursos impresora dispositivos E/S disco puerto USB proceso 2 inicio proc. 1 fin proc. 1 inicio proc. 2 CPU proceso 1 sistema operativo 00000 11111 00000 11111 CPU no usada 01 01 CPU no usada Tiempo Figure: Scheduling with monoprogramming Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 17 / 28 Scheduling: multiprogramming s Recursos impresora E/S proc. 1 E/S proc. 1 dispositivos E/S disco CPU puerto USB proceso 2 proceso 1 inicio proc. 1 0011 0011 0011 inicio proc. 2 continúa proc. 2 proc. 2 interrumpido por el s.o. 0011 0011 01 01 01 01 01 fin proc. 1 sistema operativo Tiempo Figure: Scheduling with multiprogramming Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 18 / 28

Scheduling: Round-robin s Usually there are many processes waiting to be executed, so the scheduler must apply some rule to distribute the processor time. The Round-robin scheduling consists of assigning time intervals T or quantums to each process and to rotate among them The critical decision is T: short quantums implies to loose too much time in process change; and long ones may imply too much waiting for users. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 19 / 28 Scheduling: Process state diagram s fin, error Nonato distribuidor cancelado, error Finalizado distribuidor Listo fin E/S cancelado, error Activo distribuidor E/S Bloqueado Figure: Process state diagram (New, Ready, Running, Blocked, Terminated) Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 20 / 28

Virtual Memory s Basically it consists of using secondary memory (hard disc) as if it was principal memory (RAM) The OS offers a process the possibility of using much more memory, the virtual memory than the real one, the physical memory This allows the system to execute much bigger programs, and more processes at the same time The OS construct a page table for each process to traduce virtual addresses to physical ones Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 21 / 28 s Unix/Linux It is the part of the OS that controls how data is stored and retrieved. Example It consists of dividing information in pieces, the files, giving them names and positions in memory, so that the information is easily identified and accessed. There are different files systems. Each OS can manage different ones. Most common actually are: FAT32 (Windows, Linux), ext4 (Linux), NTFS (Windows), HFS+ (Mac OS X), ISO9660 (for optical discs). Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 22 / 28

System calls to manage files s Unix/Linux Note The main system calls to manage files are: create/open read/write close unlink: To delete files (removes the file name from the file system) They are OS-dependent (i.e. different for different OS), but file-system independent. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 23 / 28 Directory Tree s Unix/Linux raíz clases trabajos pelis ficheros informática física ice-age shrek Figure: Example of a directory Tree in Unix/Linux Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 24 / 28

Devices and files in Unix/Linux s Unix/Linux Unix/Linux manages devices (e.g. hard disc or pen-drive) as files. They are usually placed in the /dev directory. System calls are the same than for the ordinary files. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 25 / 28 Mount point s Unix/Linux When installing a new device, the file system uses a Mount Point that it is just a directory in the system where the new devices is mounted. The user sees that the directories and files in the device appear in a previously empty directory of the file system. Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 26 / 28

Concept Shell Interface The s is a part of the OS that allows interaction with the user through peripherals (keyboard, screen...) The most common UI are: Command Line Interface: Orders are typed with the keyboard in a terminal, the OS interpret those commands looking for the programs to execute and directing results to output devices. Graphical user interfaces (GUI) (e.g Windows). Mouse and keyboard are use to select icons in the screen and the output is graphical output on the computer monitor. Touchscreens. Input touching a screen (tablets, mobiles...) Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 27 / 28 Shell Program Concept Shell Interface It is a very complete Interface program that works as a command-line interface. The user types commands and the Shell execute them. Some of its features are: Standard Input/Output; Command concatenation, pipeline ; Environment variable (PATH, HOME...) Some basic commands: ls -l, cd, pwd, mkdir, rmdir, ps... Raúl Durán Díaz, Juan Ignacio Pérez Sanz, Álvaro 3. Operating Perales Eceiza Systems 28 / 28