Operating Systems Bryce Boe 2012/08/07 CS32, Summer 2012 B.

Slides:



Advertisements
Similar presentations
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Advertisements

Operating Systems: Software in the Background
COMP5102/5122 Lecture 1 Operating Systems (OS) Introduction phones off (please)
Phones OFF Please Operating System Introduction Parminder Singh Kang Home:
Understanding Operating Systems 1 Overview Introduction Operating System Components Machine Hardware Types of Operating Systems Brief History of Operating.
Operating Systems BTEC IT Practitioners.
Operating Systems - Introduction S H Srinivasan
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Xuan Guo Chapter 1 What is UNIX? Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003 Original Notes.
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
Week 6 Operating Systems.
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 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Operating systems CHAPTER 7.
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
Operating Systems  By the end of this session, you will know: What an Operating System is. The functions it performs.
Operating Systems CS3502 Fall 2014 Dr. Jose M. Garrido
 What is OS? What is OS?  What OS does? What OS does?  Structure of Operating System: Structure of Operating System:  Evolution of OS Evolution of.
LINUX System : Lecture 2 OS and UNIX summary Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University Acknowledgement.
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
Operating Systems JEOPARDY Computer Repair NetworkOS OS Tasks ConceptsComponentsMisc
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 8: Operating Systems and Utility Programs Catherine Gifford Dan Falgares.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
© Paradigm Publishing Inc. 4-1 OPERATING SYSTEMS.
OPERATING SYSTEMS Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department 1.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Computers & Operating Systems
CS2204: Introduction to Unix January 19 th, 2004 Class Meeting 1 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Systems 1 Fundamentals of Computing
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
Department of Computer Science and Software Engineering
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
BABCA Software Operating Systems (OS) aka Systems Software A set of instructions that coordinate all the activities among computer hardware resources.
Department of Computer Science Operating Systems OPS621S Semester 2.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Operating Systems.
Agenda UNX122_022_w1_p3 Overview of UNIX
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
WHY AN OPERATING SYSTEM (OS) OS interacts with hardware and manages programs. Programs not expected to know which hardware they will run on. Must be possible.
An operating system (OS) is a collection of system programs that together control the operation of a computer system.
OPS224 Operating Systems - Unix Instructor: MURRAY SAUL.
No. 1 Introduction Operating Systems’ Concepts and Structure.
Computer Center | Network Group IISER Bhopal Introduction to Basic Component of Computer System Vinay Bajpai iiserb.ac.in Computer Center Indian.
OPERATING SYSTEMS DO YOU REQUIRE AN OPERATING SYSTEM IN YOUR SYSTEM?
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
Introduction to Operating Systems Concepts
Computer Organisation
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
2. OPERATING SYSTEM 2.1 Operating System Function
Review of computer processing and the basic of Operating system
John Carelli, Instructor Kutztown University
Operating Systems Lecture 1.
Introduction to Operating Systems
An Introduction to Operating Systems
Introduction and History
Presentation transcript:

Operating Systems Bryce Boe 2012/08/07 CS32, Summer 2012 B

Outline HW1 Review Operating Systems Overview Linux Software Architecture

HW1 Review 26 submissions, nearly all 14/14 One issue with the grader feedback: – Lack of newlines at the end of the input is hard to detect, this has been corrected Going forward ed submissions will not be accepted atoi v. stringstream example – See str_to_int.cpp

Operating Systems Overview

System Resources Central Processing Unit (CPU) Main memory, aka random access memory (RAM) Input/Output (I/O) devices – Keyboard, mouse, camera – Storage devices, network, printers, display

Hardware and the operating system

Brief CPU Processing Overview Program instructions and data are in memory – Program Counter (PC) register in CPU keeps track of the current instruction location CPU stores the next few instructions in cache – Some needed data is also cached – Multiple layers of cache can be employed CPU components typically share the same data width (number of bits) – Registers, Arithmetic logic unit (ALU), buses (wires)

Processing Continued The CPU is dumb – It simply continues executing the next instruction until interrupted Fetch -> decode -> execute (repeat) – Can only really perform basic arithmetic Question: – How can we manage these operations and resources effectively?

Answer By using operating system!

Purpose of the Operating System Facilitate launching applications Manage system resources Provide security Provide inter-process communication (IPC) Additionally OS may: – Provide developer libraries – Provide program generation tools Text editors, compilers

Two ways to consider the OS Bottom-up view – OS is software that allocates and de-allocates computer resources – efficiently, fairly, orderly and securely Top-down view – OS is software that isolates us from the complications of hardware resources – In other words, an OS is an application programmer ’ s and a user ’ s interface to computer operations

Types of Operating Systems Single User, Single Process – Dos, Windows 3.1 Single User, Multiprocess – Windows 95/98/XP Multiuser, Multiprocess – Linux, OS X, Windows Server – Requires fairness and and security considerations

Consider device latencies/access times (all times approximate) CPU: 3 cycles per ns L1 Cache: 1 ns (3 CPU cycles) L2 Cache: 4 ns (12 CPU cycles) RAM: 80 ns (240 CPU cycles) SSD: 0.1 ms (300,000 CPU cycles) HDD: 5 ms (15,000,000 CPU cycles)

Running multiple processes Multiprogramming – The yielding of the CPU to another process when performing IO Multitasking (aka timesharing) – The forced yielding of processes at small intervals to give the impression of concurrently running processes

Multiprocessing benefits Increase CPU throughput – Perform other operations while waiting on I/O Increase resource utilization – Resources can maintain a queue of tasks so they always have work to complete

Linux Software Architecture

Brief Unix History AT&T Bell Labs – System V standard – : Ken Thompson wrote Unix in “ B ” – 1972: Dennis Ritchie developed C – a better B – Unix rewritten in C, 1973 – … eventually System V, 1983 UC Berkeley – BSD standard – Started with a copy of System IV, late 1970s – Lots of changes/additions in 1980s – Now FreeBSD Open source - Linux, since early 1990s

Unix-born operating systems Source: The Abraham Zelmanov Journal online.com/linux.html

Unix Philosophy Small is beautiful – Each program does just one thing – Pipe commands (or use successive functions in C) to accomplish more complicated things – Less typing is best (using 1970s computers) That ’ s why so many commands are short (ls, cp, mv, …) Users/programmers know what they are doing – That ’ s what makes the brevity sufficient – Means very few restrictions (or safety nets) apply

Linux Started in 1991 by Linus Torvalds Open Source, GPL – Free to use, modify, distribute – Theoretically allows bugs and security holes to be found faster Multi-user, Multitasking OS Support for both command line and graphical user interfaces

Linux Distributions A Linux distribution is a collection of user-level applications and libraries built around the Linux kernel Well known distributions: – Ubuntu/Debian – CentOS/Fedora/RedHat

Linux Architecture

Kernel Services File management – Permissions and access control – Manages files and folders Process Management and IPC – Process scheduling Starting, stopping, suspending, swapping – IPC: pipes, named pipes, sockets

Kernel Services cont. Memory Management – Address spaces for processes Provides isolation between processes and the kernel (hopefully) – Manages allocation and de-allocation of memory to processes Disk scheduling – Mange how processes be given priority to access the disk?

CPU Scheduling Kernel sends interrupt to a process to give another process a turn to use the CPU Processes can give up CPU when they don ’ t need it (e.g. waiting on I/O device)

Processes request kernel services Using system calls (read, write, fork, …) – OOP idea: these are the kernel ’ s interface – Processes access devices just like files – that ’ s how they are represented by the kernel, and they occupy places in the file system Use open, close, read, write, release, seek, … Or indirectly, by using shell commands or libraries/programs that use system calls

A few system calls open: open a “file” read: read data from a “file” write: write data to a “file” exec: begin executing a new program fork: start a new process as a copy of the current one

Example Library Function Chain fclose: posix C close file stream function close: unix close file descriptor function Invokes the following system call (assembly) mov ebx, 0 # indicate we want to close fd 0 mov eax, 6 # system call number 6 is close int 80h # send interrupt 80 for system calls

For tomorrow Get the reader if you don’t already have it Finish the first section of the reader “Introduction to operating systems, Unix and shells.” Begin reading section 3 of the reader “Processes”