CS 149: Operating Systems May 7 Class Meeting

Slides:



Advertisements
Similar presentations
Operating System Structures
Advertisements

An Overview Of Windows NT System Student: Yifan Yang Student ID:
Case study 1 Windows 7.
CS 174: Web Programming April 28 Class Meeting
File System Implementation
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Case Study: Windows 2000 Part I Will Richards CPSC 550 Spring 2001.
1 Case Study 2: Windows 2000 Chapter History of windows Programming windows System structure 11.4 Processes and threads in.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
Windows XP 1 © Silbershatz, Galvin, Gagne CS502 Spring 2006 Windows XP CS-502 Operating Systems Slides excerpted from Silbershatz, Ch. 22.
1 File Management in Representative Operating Systems.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Operating System Machine.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Chapter 11 Operating Systems
CS-3013 & CS-502, Summer 2006 Windows XP1 CS-502 Operating Systems Slides excerpted from Silbershatz, Ch. 22.
OPERATING SYSTEMS Introduction
Chapter 12 File Management Systems
Introduction to NT Operating system
1 I/O Management in Representative Operating Systems.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Operating Systems.
Ceng Operating Systems 11-1 Chapter 11 : Case Study - Win 2000 History of windows 2000 Programming windows 2000 System structure Processes and threads.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
CS 149: Operating Systems April 21 Class Meeting
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
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.
Systems Security & Audit Operating Systems security.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Page 110/1/2015 CSE 30341: Operating Systems Principles Windows XP  32-bit preemptive multitasking operating system for Intel microprocessors  Key goals.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 13 Understanding and Installing Windows 2000 and Windows NT.
April 2000Dr Milan Simic1 Network Operating Systems Windows NT.
Chapter 2 Operating System Overview
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
Windows NT Operating System. Windows NT Models Layered Model Client/Server Model Object Model Symmetric Multiprocessing.
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.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
CS 149: Operating Systems April 7 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
NT Kernel CS Spring Overview Interrupts and Exceptions: Trap Handler Interrupt Request Levels and IRT DPC’s, and APC’s System Service Dispatching.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
UNIX Unit 1- Architecture of Unix - By Pratima.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
1 Windows NT A Distributed Architecture Windows NT A Distributed Architecture Professor: Mohamed Khalil CSE 8343 GROUP-A5 Dhaval Sanghvi Amit Sharma Ali.
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
CS 235: User Interface Design April 28 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 3: Windows7 Part 3.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
A+ Guide to Managing and Maintaining Your PC, 7e Chapter 2 Introducing Operating Systems.
Chapter 3: Windows7 Part 1.
Chapter 3: Windows7 Part 2.
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
Chapter 3: Windows7 Part 3.
Case Study 2: Windows History of windows 2000
Chapter 2: System Structures
Chapter 3: Windows7 Part 2.
The Operating System Machine Level
Process Description and Control
B.Ramamurthy Chapter 2 : Appendix
Process Description and Control
Outline Operating System Organization Operating System Examples
Presentation transcript:

CS 149: Operating Systems May 7 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak www.cs.sjsu.edu/~mak

Unofficial Field Trip Extra credit fun quiz! Computer History Museum in Mt. View http://www.computerhistory.org/ Saturday, May 9, 11:30 – closing time Special free admission. Do a self-guided tour of the new Revolution exhibit. See a life-size working model of Charles Babbage’s Difference Engine in operation, a hand-cranked mechanical computer designed in the early 1800s. Experience a fully restored IBM 1401 mainframe computer from the early 1960s in operation. General info: http://en.wikipedia.org/wiki/IBM_1401 My summer seminar: http://www.cs.sjsu.edu/~mak/1401/ Restoration: http://ed-thelen.org/1401Project/1401RestorationPage.html Extra credit fun quiz!

Four Eras of Microsoft Operating Systems MS-DOS Windows 1.0, 2.0 MS-DOS-based Windows Windows 3.0, 3.1, 98, ME NT-based Windows Windows XP, Vista, 7 Modern Windows Windows 8, 8.1

Modern Windows Microsoft transformed itself from a PC software company to a devices and services company. Needed an OS that it could deploy across phones tablets game consoles laptops desktops servers cloud

MinWin Approach A small OS core that can be extended into different devices. Extend the core to be the operating systems for specific devices. New user interfaces and features Common experience for users Support new Intel architectures. Support the ARM architecture.

Modern Windows Programming Layers Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Programming Windows Windows 8.1 removed POSIX compliance. Modern Software Development Kit Includes the new WinRT set of APIs. Shift programmers away from a threading model to a task model. Separate resource management (priorities, CPUs) from the programming model (concurrent activities). Modern applications run in an AppContainer sandbox for security.

Components to Build NT Subsystems The NT kernel contains general-purpose facilities for writing OS-specific subsystems. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Kernel-Mode Objects The NTOS executive layer running in kernel mode implements system calls. Native NT system calls operate on kernel-mode objects: Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Native NT API Native NT API calls use handles to manipulate objects across process boundaries. Examples: Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Win32 API Library procedures that either Do the work in user mode. Wrap native NT calls that do the work: Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Windows-on-Windows (WOW) Used on 32-bit x86 systems. Run 16-bit Windows 3.x applications. Map system calls and parameters between the 16-bit and 32-bit worlds. WOW64 Allows 32-bit applications to run on x64 systems.

Windows vs. Unix Unix Windows Simple OS functions Few parameters Few examples of multiple ways to do something. Kernel panic for a fatal error. Windows Comprehensive APIs with many parameters. Several ways to do the same thing. Mixed low-level and high-level functions. Blue Screen of Death for a fatal error.

Windows Registry Registry: A special file system to maintain system configuration information. Hive: A volume of the registry. HKLM = HKEY LOCAL MACHINE Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Kernel-Mode Organization ISR = Interrupt Service Routine DPC = Deferred Procedure Call APC = Asynchronous Procedure Call LPC = Local Procedure Call Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Dispatcher Objects Control dispatching and synchronization: events mutexes semaphores threads timers Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Executive Layer Object manager I/O manager Manages most kernel-mode objects Processes, threads, files, semaphores, I/O devices and drivers, timers, etc. I/O manager Framework for implementing I/O device drivers. Executive services to configure, access, and perform operations on devices. Plug-and-play

Executive Layer, cont’d Process manager Create and terminate processes and threads Memory manager Demand-paged virtual memory Physical page frames Disk pagefile backing store Cache manager Optimizes I/O performance

Executive Layer, cont’d Security reference monitor Enforces Windows security mechanisms Supports Common Criteria U.S. Department of Defense Orange Book requirements Configuration manager Implements the registry Advanced local procedure call (ALPC) Highly efficient interprocess communication

Hardware Abstraction Layer (HAL) Hide machine dependencies. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Device Stacks IRP = I/O request packet Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Object Management Most important function of the executive. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Object Handles Handles refer to kernel-mode objects. A handle table translates handles to objects. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Handle Table A handle table can have up to 16 million handles. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Object Procedures Supplied when specifying a new object type. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Object Namespace Directories Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Creating and Opening a File Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Creating and Opening a File, cont’d Executive component passes Unicode pathname for namespace. Object manager searches through directories and symbolic links. Object manager calls the Parse procedure for object type. I/O manager creates IRP, allocate file object, send request to stack of I/O devices. IRP passed down the I/O stack until it reaches device object representing the file system instance.

Creating and Opening a File, cont’d Device objects encountered as the IRP heads toward the file system represent file system filter drivers. File system device object has a link to file system driver object. NTFS fills in file object and returns it to I/O manager, which returns back up through all devices on the stack. Object manager is finished with its namespace lookup. Final step is to return back to the user-mode caller.

Common Executive Object Types Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Processes and Threads Processes can optionally be grouped into jobs. A thread can schedule multiple fibers. A fiber assumes the identity of the thread that runs it. Lower overhead of switching among threads. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Processes and Threads, cont’d Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Processes and Threads, cont’d Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Thread Priorities Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Thread Priorities, cont’d Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Memory Management Virtual address space layout Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Memory Management System Calls Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Page Fault Categories The page referenced is not committed. committed = the page is mapped to a virtual page Attempted access to a page that is in violation of the permissions. A shared copy-on-write page was about to be modified. The stack needs to grow. The page referenced is committed but not currently mapped in. These first two are due to programming errors. LRU page replacement algorithm.

I/O API Calls Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

Device Driver Stacking Stack device drivers to work with a specific instance of a device. Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620

File System A volume is the fundamental structure of the Windows 8.1 file system (NTFS). Created by the Windows 8.1 disk administrator utility. Based on a logical disk partition. May occupy a portions of a disk, an entire disk, or span across several disks. All metadata, such as information about the volume, is stored in a regular file.

NTFS Clusters A cluster is the underlying unit of disk allocation. A cluster is a number of disk sectors that is a power of 2. Because the cluster size is smaller than for the 16-bit FAT file system, the amount of internal fragmentation is reduced.

File System Logging All file system data structure updates are performed inside transactions that are logged. Before a data structure is altered, the transaction writes a log record that contains redo and undo information. After the data structure has been changed, a commit record is written to the log to signify that the transaction succeeded.

File System Recovery After a crash, the file system data structures can be restored to a consistent state by processing the log records. This scheme does not guarantee that all the user file data can be recovered after a crash. It only guarantees that the file system data structures (the metadata files) are undamaged and reflect some consistent state prior to the crash.

Security Secure login with anti-spoofing measures Discretionary access controls Privileged access controls Address space protection per process New pages must be zeroed before being mapped in Security auditing

Security, cont’d Each user and group identified by an SID (security ID). Each process has an access token containing: a SID a DACL (default access control list) other properties DACL Modern Operating Systems, 4th ed. Andrew Tanenbaum and Herbert Bos Pearson, 2014 ISBN: 978-0133591620