Enrique Blanco García © 2004 Introduction to the UNIX environment Enrique Blanco Cover from the book Modern operating systems. A. Tanenbaum.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
EEE 435 Principles of Operating Systems Operating System Concepts (Modern Operating Systems 1.5)
Chap 2 System Structures.
Introduction CSCI 444/544 Operating Systems Fall 2008.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
1 Threads, SMP, and Microkernels Chapter 4. 2 Process: Some Info. Motivation for threads! Two fundamental aspects of a “process”: Resource ownership Scheduling.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
1 Chapter 4 Threads Threads: Resource ownership and execution.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
CS4315A. Berrached:CMS:UHD1 Operating System Structures Chapter 3.
1 The development of modern computer systems Early electronic computers Mainframes Time sharing Microcomputers Networked computing.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
part I, , Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Introduction to Interactive Media Interactive Media Tools: Software.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Chapter 1 Introduction 1.1 What is an operating system
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
MODERN OPERATING SYSTEMS Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
INVITATION TO COMPUTER SCIENCE, JAVA VERSION, THIRD EDITION Chapter 6: An Introduction to System Software and Virtual Machines.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
1 Pertemuan 3 Konsep Sistem Operasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
CY2003 Computer Operating Systems Lecture 01 Introduction Abir Hussain (JPB6.33,
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
MODERN OPERATING SYSTEMS Chapter 1 Introduction
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
1 Threads, SMP, and Microkernels Chapter 4. 2 Process Resource ownership - process includes a virtual address space to hold the process image Scheduling/execution-
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Copyright Prentice Hall, Inc. 1 Operating System Overview.
Introduction to Operating Systems Concepts
Lecture 3: Basic OS Concepts
Process Management Process Concept Why only the global variables?
Avani R.Vasant V.V.P. Engineering College
CASE STUDY 1: Linux and Android
Introduction to Operating System (OS)
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Mid Term review CSC345.
Lecture Topics: 11/1 General Operating System Concepts Processes
Lecture 4- Threads, SMP, and Microkernels
Threads Chapter 4.
Lecture 3: Basic OS Concepts
Operating Systems: A Modern Perspective, Chapter 3
CS510 Operating System Foundations
Chapter 2 Operating System Overview
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Operating System Overview
Presentation transcript:

Enrique Blanco García © 2004 Introduction to the UNIX environment Enrique Blanco Cover from the book Modern operating systems. A. Tanenbaum. Prentice Hall

Enrique Blanco García © 2004 Computers and Operating Systems First generation (mid40s-50s): - Tubes, switches and light displays, no operating system, human operators Second generation (mid50s-60s): - Transistors, batch processing, monitors, jobs, cards Third generation (mid60s-80s): - Chips (LSI,VLSI), time sharing systems, transactions, tapes, drives Our generation: - Microprocessors, distributed systems, parallel processing, internet,... We have moved away from the hardware forever !!!

Enrique Blanco García © 2004 UNIX roots 1969: UNIX (from MULTICS) by Ken ThompsonDenis Ritchie...

Enrique Blanco García © 2004 and more roots......

Enrique Blanco García © 2004 and more roots!

Enrique Blanco García © 2004 What is an Operating System? The OS is the interface user-machine that provides the management of different resources: -Programs and processes (processors) -Memory (and other data storage elements) -In/Out devices (mouse, keyboard, printer,...) -Files and directories -Protection and safety -Accounting information -Network Virtual Machine The OS is a Virtual Machine that substitutes the real hardware

Enrique Blanco García © 2004 The OS is a Virtual Machine The objective is to create the mirage of a machine with unlimited resources: -One available processor for running every user program -Infinite amount of available physical memory -The physical devices can be accessed uniformly VIRTUAL Vs PHYSICAL RESOURCES The OS is in charge of masking the complexity of every hardware element, providing a consistent interface to devices and services for users and programs Independence = Isolation from the computer (High level)

Enrique Blanco García © 2004 Classical OS hierarchical structure (layers) Kernel System Calls UNIX commands and applications Hardware Users

Enrique Blanco García © 2004 What is a process? A process/task is a running environment that provides the resources to execute a particular instance of a program: Stack Data Code... Open Devices Memory Addressing Space The OS schedules the processes (distribute the processor running time among them)

Enrique Blanco García © 2004 Process and thread DataMemory Addressing Space Thread3... Open Devices Thread1 Thread2 Several parts of the program can be executed in parallel in different virtual processors

Enrique Blanco García © 2004 Building a binary file... -Edition: source code in a High-level language (C, Java,...) -Variables and functions [program.c] -Compilation: syntax and semantic correctness -Table of symbols and list of unsolved references [program.o] -Linking: translate the symbols into numbers (memory references) -Generate the binary file adjusting the memory addresses [program] -Load: transport the binary file to physical memory -Create the process and assign resources (memory,...) Interpreter: compilation, linking and loading line by line (no generation of additional files)

Enrique Blanco García © 2004 Process lifetime states RUNNING READYBLOCK Waiting for I/O 2.Another process is scheduled 3.This process is scheduled 4.Received I/O data

Enrique Blanco García © 2004 Shell (command interpreter) 1.Waiting for user commands from terminal 2.Receive a user request (e.g a UNIX command) 3.Create a process (child) and assign resources to execute the request 4A. Foreground (synchronous): - Waiting for the end of the child to continue... - Go to Step1 4B. Background (asynchronous): - Go to Step1 (child works simultaneously)

Enrique Blanco García © 2004 UNIX devices and In/Out -Device driver: interface between the physical device and other elements -Physical devices are slow in comparison to the processor -Sometimes, devices can be shared among many users UNIX Device Independence: -Mask the physical complexity of devices and provide common procedures to interact with them -It must be possible to design programs that process files from any source -In UNIX, the physical devices are integrated as normal files -I/O techniques: Spooling and Buffering

Enrique Blanco García © 2004 The UNIX file system File: collection of bits with a name saved in a physical storage device File system: mecanism to access the file using its symbolic name Directory: data structure that groups a set of files File operations: open, close, read, write, append,... UNIX file management is implemented using indexed-nodes (i-nodes): Device Number of links Owner Size Data creation, accession, modification Pointers to several data blocks

Enrique Blanco García © 2004 Absolute and relative paths / users eblanco paper.pdfprogram.c list.txt READMEHELP /users/eblanco/program.c eblanco/program.c - The. and.. Directories - Mounted file systems

Enrique Blanco García © 2004 Hard links and Soft links -Hard link: - Several names in different paths for the same file (same i-node) - Any modification using one of the names will affect the others -Soft link: - One file contains the reference to another one (path) - Each file have its own i-node

Enrique Blanco García © 2004 File ownership and protection - 3 operations [RWX]: - 3 domains: ReadWriteeXecute UserGroupOthers rw-r--r ugo