Operating Systems: Intro 1 Operating Systems Concepts and Principles –monolithic and micro kernels –processes and threads »their management and synchronisation.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

CSNB334 Advanced Operating Systems Course Introduction Lecturer: Asma Shakil.
MTE 241 Introduction to Computer Structures and Real-time Systems
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Concurrent and Distributed Systems Introduction to CET306 Harry R. Erwin, PhD University of Sunderland.
Operating Systems M.C. Juan Carlos Olivares Rojas Course Syllabus January, 2009.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS1: Overview of Operating Systems 1.1. Windows.
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 CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
現代作業系統核心 Modern Operating System Kernels
SCHEDULER ACTIVATIONS Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska, Henry.
1 1DT066 Distributed Information Systems Dr. Edith C.-H. Ngai Department of Information Technology Uppsala University.
Introduction to Operating Systems Prof. Darrell Long Computer Science Department Jack Baskin School of Engineering.
Introduction to Operating Systems Prof. Darrell Long Computer Science Department Jack Baskin School of Engineering.
CSCI2413 Lecture 1 Operating Systems (OS) Introduction and Overview phones off (please)
CS444/CS544 Operating Systems Introduction 1/12/2007 Prof. Searleman
MicrokernelsCS-502 (EMC) Fall Microkernels CS-502, Operating Systems Fall 2009 (EMC) (Slides include materials from Modern Operating Systems, 3 rd.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
CS 3305 Course Overview. Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment.
J. Choi, DKU Introduction to Operating System March, 2015 Jongmoo Choi Dept. of software Dankook University
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Kernel, processes and threads Windows and Linux. Windows Architecture Operating system design Modified microkernel Layered Components HAL Interacts with.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
COMPE / SE / ISE 431 Operating Systems 2013 Fall Erhan GÖKÇAY (Coor.) Department of Software Engineering Murat KARAKAYA Department of Computer Engineering.
Introduction to Operating Systems J. H. Wang Sep. 18, 2015.
Threads by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Fall 2000M.B. Ibáñez Lecture 22 File-System I File Concept.
CSNB334 Advanced Operating Systems Course Introduction Lecturer: Abdul Rahim Ahmad.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
1 CSCI 3120: Operating Systems Summer 2003 Instructor: Kirstie Hawkey Office hours (outside Room 311): Mon: 2:30-3:30, Fri: 10:30-11:30.
OS, Operating System First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering, PSUWannarat Suntiamorntut.
UNIX Operating Systems and Kernels Presented By: Walter Haynes April 26, 2007.
Introduction to Operating Systems J. H. Wang Sep. 15, 2010.
Operating System Organization Chapter 3 Michelle Grieco.
Silberschatz, Galvin and Gagne  Operating System Concepts Operating Systems 1. Overview 2. Process Management 3. Storage Management 4. I/O Systems.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
COMP 2320 (3 units) Operating Systems Name: Prof. Joseph NG Office: R730 (Run Run Shaw Building) Phone: HomePage:
CS1253- OPERATING SYSTEMS. SYLLABUS UNIT I PROCESSES AND THREADS 9 Introduction to operating systems – Review of computer organization – Operating.
Course Overview 1 FCM 710 Architecture of Secure Operating Systems Prof. Shamik Sengupta Office 4210 N
Introduction to Operating Systems J. H. Wang Sep. 13, 2013.
1 1DT066 Distributed Information Systems Dr. Edith C.-H. Ngai Department of Information Technology Uppsala University.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
Damian Gordon.  This module will serve as an introduction to Operating Systems.  It provides an overview of the major components of a computer system.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS1: Overview of Operating Systems 1.1. Windows.
CCSB234/CSNB234 Operating System Concepts Semester 2, Dec 2006 – Mar 2007 Abdul Rahim Ahmad.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 1: Introduction & OS Structures (Part One, Chapters 1&2)
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
CSI 3131 Summer 2016 Principles of Operating Systems Instructor: Dr. Nathalie Japkowicz Office: STE 5029 Office Hours: n In.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
CSC322 OPERATING SYSTEM Mr. Dilawar Lecturer, Department of Computer Science, Jahan University Kabul, Afghanistan.
Introduction to Operating System
Introduction to Operating Systems
Welcome to SSE3044 Operating Systems!
CSC5340 Advanced Topics in Distributed Software Systems
CS431 Distributed Systems
How does it work? What is it made of? What is it made of?
Figure 16.1 Target model of an OS
INTERNATIONAL BURCH UNIVERSITY
B. N. Bershad, T. E. Anderson, E. D. Lazowska and H. M
Lecture Note 0: Course Introduction
Lecture Note 0: Course Introduction
Organizational Issues
G53OPS Operating Systems
CSC227: Operating Systems
Organizational Issues
Lecture Note 0: Course Introduction
Operating Systems lectures – preliminary information
Presentation transcript:

Operating Systems: Intro 1 Operating Systems Concepts and Principles –monolithic and micro kernels –processes and threads »their management and synchronisation »interprocess communication –interrupts and signals –virtual memory - paging and segmentation Implementation Techniques –resource allocation –time management - process scheduling –memory management - usage models and page allocation –file systems –case studies - Kops, Linux, NT etc.

Operating Systems: Intro 2 Coursework To Be Announced –probably involving some programming –deadline - mid-term Essay - in-depth comparison of PDA Operating Systems –structure, scheduling, memory management, security etc. –deadline - end of term Tutorials only when needed

Operating Systems: Intro 3 Textbooks William Stallings, Operating Systems, Internals & Design Principles, 4th edition, Prentice-Hall, Abraham Silberschatz & Peter Galvin, Operating System Concepts, 5th edition, Addison-Wesley, Gary Nutt, Operating Systems, A Modern Perspective, 2 nd edition, Addison-Wesley, D.A.Solomon & M.E.Russinovitch, Inside Windows 2000, 3rd edition, MicroSoft Press, D.Boling, Programming MicroSoft Windows CE, MicroSoft Press, Michael Beck et al., Linux Kernel Internals, 2nd edition, Addison-Wesley, John O’Gorman, Operating Systems with Linux, Palgrave, 2001.

Operating Systems: Intro 4 Motivation An Automated Teller Machine (ATM) process –process to deposit an amount into an account: deposit (account, amount) { read ( account, balance );// read balance from database balance = balance + amount;// add deposit amount write (account, balance );// update database } –process to withdraw an amount from an account: withdraw ( account, amount ) { read (account, balance);// read balance from database balance = balance - amount;// subtract withdrawal amount write ( account, balance);// update database } –concurrent processes?

Operating Systems: Intro 5 To sum the elements of a matrix –in row order: sum = 0; for (row=0; row<row_max; row++) { for (col=0; col<col_max; col++) { sum = sum + array[row,col]; } cout << “Array Sum =“ << sum << endl; –in column order: sum = 0; for (col=0; col<cp;_max; col++) { for (row=0; row<row_max; row++) { sum = sum + array[row,col]; } cout << “Array Sum =“ << sum << endl; –any difference?

Operating Systems: Intro 6 Operating Systems Main purpose is to facilitate the execution of user application programs –bare hardware is extremely messy and difficult for users to program »processors »memory »peripheral devices »concurrency »interrupts »files »networks

Operating Systems: Intro 7 Modern operating systems structured around concept of a process process = “program in execution” –a process is not the same as a program –programs are passive, processes are active –a process consists of an executable program, associated data and its execution context A process runs in a framework which provides a Virtual Machine for it –a Virtual Machine is a simplified machine with: »user-level processor »virtual memory »high-level facilities »a machine with one user

Operating Systems: Intro 8 An OS supports execution of many concurrent processes –many co-existing virtual machines –each run alternately - pseudo-concurrently –OS issues revolve around process management »how and when to create & destroy processes »how to avoid interference between processes »how to achieve cooperation between processes

Operating Systems: Intro 9 An OS manages resource requirements of processes –time –memory –files –I/O device access –processors An OS aims to be efficient –for user –for system manager

Operating Systems: Intro 10 A process can be in one of several states –newly created –running –blocked »waiting for some event to occur »in main memory »moved out to disc –ready to run –terminated

Operating Systems: Intro 11 Overheads in swapping execution between processes –saving and restoring contexts –loss of cache contents Places limits on how often execution should be swapped –performance will plummet if too frequent

Operating Systems: Intro 12 A relatively new mechanism to improve overheads is the Thread –a lightweight process –several threads within one process or virtual machine –much smaller context to preserve –must cooperate –must not compete –can be separately scheduled –can run concurrently on multiprocessor systems –often also a very convenient programming paradigm

Operating Systems: Intro 13 Interfaces Hardware Operating System process application user

Operating Systems: Intro 14 Communications between OS and processes –from process to OS - system calls –from OS to process - signals

Operating Systems: Intro 15 Communications between OS and Hardware –from OS to hardware - register & status settings –from hardware to OS - interrupts and exceptions

Operating Systems: Intro 16 Communications between processes –signals –message passing –via buffers –shared virtual memory –pipes –sockets Communications between users and processes –keyboard, mouse, touch-screen –bit-mapped text and graphics display screens with windows –printers, plotters

Operating Systems: Intro 17 Interrupts An interruption in the normal execution flow of a processor –a mechanism for causing the processor to suspend its current computation and take up some new task »old context must be preserved »control can be returned to the original task at some later time »new context started Reasons: –control of asynchronous I/O devices –exceptional conditions arising from execution

Operating Systems: Intro 18 OS sets up an Interrupt Vector with service routine entry points –one entry per I/O device or I/O channel –a dormant context set up for each routine which can be activated on demand –further interrupts usually switched off during initial interrupt servicing Example: Intel x86 interrupt vector entries: 0 :divide error... 14:page fault 32:timer 33:keyboard... 36:serial port 1 37:parallel port 2 38:floppy controller... 46:hard disc

Operating Systems: Intro 19 An OS can be viewed as an event-driven system –just reacts to events as they occur Interrupts need to be serviced carefully and quickly by the OS –cost similar to a process switch –too many interrupts will kill performance Alternative to interrupts is Polling –process (or OS) continually polls I.e. inspects, device status registers awaiting some condition e.g. transfer completed –wastes time looping until condition occurs –much simpler to program than using interrupts but inefficient

Operating Systems: Intro 20 Privilege Processors run at various levels of privilege –user-level »only the types of instruction needed by applications programs »only access to permitted areas of virtual memory –supervisor or kernel level »all types of instruction including I/O instructions »access to system registers ­virtual memory registers ­interrupt vectors »access to all areas of virtual memory »ability to switch interrupts on and off –may be intermediate levels on some architectures –each level may have its own processor registers to speed context switching

Operating Systems: Intro 21 What’s part of an Operating System? Process management Interrupt handling Device drivers File system Networking Applications? –Web browser? – ? Windows? Command interpreters?

Operating Systems: Intro 22 Kinds of Operating System For single-user workstation For multiple-user server –file,compute, mail, web servers etc. For mainframe systems –transaction processing –database systems For real-time systems –time-critical applications »industrial process control –hard rather than soft deadlines

Operating Systems: Intro 23 All built with the same concurrent multi-process organisation Main difference is in process scheduling –single user system needs only to meet one user’s expectations »overall efficiency less important –multiple user system needs to be equitable between users »efficiency important –transaction processing system needs to give good response »database queries –real-time system may need to pre-allocate processor time to guarantee meeting deadlines »overall efficiency may need to suffer

Operating Systems: Intro 24 Only exception to multiple-process organisation is embedded systems – dedicated single-purpose processors » multi-media, telecoms ­MPEG decoders, GSM phones, portable web browsers ­washing machine controllers! » avionics ­ FADECs, GPS, FMS –absolute reliability required –very conservatively programmed System Level Integrated circuits –usually have a processing core which requires a real-time OS –often multiprocessors with a general-purpose CPU plus a DSP processor »ARM + OAK

Operating Systems: Intro 25 Operating System Structure How to partition OS functions? –process management and scheduling, memory management, interrupt handling, device drivers etc. Monolithic OS –each function coded as a separate procedure –linked into one executable code object –event-driven core which calls appropriate procedures when required »driven by interrupts and system calls from processes –Linux »modules can be dynamically linked and unlinked as required

Operating Systems: Intro 26 Micro-kernel OS –each function coded as a separate process »system processes –only the minimum possible function in the core kernel »virtual memory organising »interrupt handling »process dispatching –appropriate system process activated as soon as possible to deal with all other functions »system processes will have higher privilege and usually higher priority than user processes –Windows NT Intermediate flavours –some system processes but not a minimal micro-kernel

Operating Systems: Intro 27 Windows NT Structure Hardware

Operating Systems: Intro 28 Advantages and disadvantages –monolithic: »faster switching to kernel functions »simple interfaces between functions i.e. procedure calls »easier access to data structures shared between functions »larger memory resident core »may become too large to maintain easily –micro-kernel »better partitioning - should be easier to implement and maintain »smaller memory resident core »slower switching to system processes »inter-system-process communications may be slower