Operating Systems

Operating Systems

Operating Systems User OS Kernel & Device Drivers Interface Programs Introduction Introduction Brian Mitchell ([email protected]) - Operating Systems 1 Introduction • Instructor Brian Mitchell - “Brian” [email protected] www.mcs.drexel.edu/~bmitchel • TA - To Be Announced • Course Information MCS720 – Tuesday’s 6 - 9 PM • Online Information www.mcs.drexel.edu/~bmitchel/course/mcs720 Please check course web page several times per week. The web page will be my primary mechanism for communicating: Special and Emergency Information (posted by 12:00 noon on day of the class) Syllabus Assignments Exam Information Solutions to Problems Introduction Brian Mitchell ([email protected]) - Operating Systems 2 Introduction • Course Objective – To investigate classical internal algorithms and structures of operating systems – Machine Architectures – Concurrent Programming • Textbook Applied Operating Systems Concepts, Avi Silberschatz, Peter Galvin, Greg Gagne • Additional References Modern Operating Systems, Andrew Tanenbaum Distributed Operating Systems, Andrew Tanenbaum Selected research papers Introduction Brian Mitchell ([email protected]) - Operating Systems 3 Introduction • Homework’s, Projects, Exams Programming Projects: This course will include a significant project that can be worked on individually or in teams. Specifications for the project are on the course web page. Research Presentation: This course will require you review research papers related to operating systems, as well as present a paper that you select to the class. Final: There will be a 90 minute final exam Introduction Brian Mitchell ([email protected]) - Operating Systems 4 Course Topics • Introduction • Processes & Threads • Process Synchronization • CPU Scheduling • Memory Management • Virtual Memory • Deadlock • File and I/O Systems • Directory Services • Security and Protection • Operating System Case Studies • Special Purpose Operating Systems – Embedded – JavaOS – WebOS Introduction Brian Mitchell ([email protected]) - Operating Systems 5 Project Introduction • Learn about the internals of operating systems, operating system algorithms, and operating system and hardware integration. • Goal: Construct a simulated: – Hardware – Operating System – Assembler User Programs Operating System Hardware Introduction Brian Mitchell ([email protected]) - Operating Systems 6 Project Introduction • Sample Programming Language – Simple, pseudo-assembler based – Instructions: • Nop, alm, frm, cmp, jeq, jgt, jlt, jge, jle, clr, inc, dec, add, sub, mul, div, mov, and, or, not, xor, hlt, dis Sample Program start: alm R1,d500 ;allocate 500 bytes mov R2,#0 ;R2 will hold our offset looptop: mov (R1)+R2,R2 ;update memory location ;with value inc R2 ;increment R2 cmp R2,d500 ;compare R2 to 500 jlt looptop ;if R2<500 go to looptop halt ;stop execution Introduction Brian Mitchell ([email protected]) - Operating Systems 7 Project Introduction • Processing the programs FIRST INSTRUCTION Get Instruction Validate Instruction Fetch and resolve opcode arguments (if any) Execute Instruction NEXT INSTRUCTION Check and Handle Faults (if any) Log Instruction Results in the Hardware Trace Introduction Brian Mitchell ([email protected]) - Operating Systems 8 Project Introduction • OS Memory Manager – Linked Lists – First, best, next, worst fit allocation algorithm – Interface with the page table in hardware – Handle program and page faults – Provide interface to user programs who require memory – Interface with hardware to manage the memory Introduction Brian Mitchell ([email protected]) - Operating Systems 9 Project Introduction • Simulated hardware General Purpose Registers R1 R2 R3 R4 R5 R6 R7 R8 PAGE TABLE Control Registers TLB* C T PF PC CACHE* Physical Memory SWAP Space Introduction Brian Mitchell ([email protected]) - Operating Systems 10 Project Information • Getting Started – Sample code and ant (www.apache.org) script is provided in the project page Introduction Brian Mitchell ([email protected]) - Operating Systems 11 Introduction • Grading – The following distribution will be used to determine your final grade in this course: • 20%: Phase 1 Project Deliverable • 10%: Phase 2 Project Deliverable • 30%: Phase 3 Project Deliverable • 20%: Research Paper Presentation • 20%: Final Exam • Policies – Policies governing the project are described on the project web page. – Makeup exams will take the form of an oral exam or an alternative test (in-class or take-home). Introduction Brian Mitchell ([email protected]) - Operating Systems 12 Introduction • Computer hardware requires software to perform useful operations • Types of software – Systems Programs: manage the operation of the computer itself – Application Programs: solve user problems • The Operating System (OS) is the most fundamental of all systems programs – OS controls ALL of the computers resources – OS provides VALUABLE services to user programs – OS COORDINATES the execution of user programs – OS PROVIDES resources to user programs Introduction Brian Mitchell ([email protected]) - Operating Systems 13 Computer Systems Structure • Modern computer systems consist of: – One or more processors – Main memory – Clocks (Synchronization, coordination) – Terminals – Disks – Network Interfaces – Input/Output Devices • Systems Architectures – SISD, SIMD, MIMD, MISD (we will look at these later) • Processor Organization – Single Processor – Multiprocessor – Symmetric Multiprocessor – Distributed – Clusters Introduction Brian Mitchell ([email protected]) - Operating Systems 14 Rationale for OS • Directly interfacing user programs with hardware is COMPLEX • Building programs for specific computer architectures is not portable • If every program included code to interface with the computer hardware – Redundancy – Inconsistent quality – Inefficient use of resources • DESIRE => Shield programmers from the complexity of the hardware – OS is a layer that sits on top of the hardware – OS provides an interface or virtual machine that is easy to understand and program Introduction Brian Mitchell ([email protected]) - Operating Systems 15 OS Architecture • Most Operating Systems use a layered architecture Banking Airline Word System Reservation Processor USER Command Compilers Editors Interpreter Operating System SYSTEM Machine Language Microprogramming Physical Devices HARDWARE Introduction Brian Mitchell ([email protected]) - Operating Systems 16 OS Architecture (con’t) • Physical Devices – Computer hardware - CPU, memory, I/O devices, network interfaces • Microprogramming – ROM-based programs – Controls CISC processors • Machine Language – Instructions supported by the hardware – Binary encoded – Processors typically support 50-300 instructions • CISC vs RISC – Use registers as the basis for performing most operations • Running programs • Device interfaces Introduction Brian Mitchell ([email protected]) - Operating Systems 17 OS Architecture (con’t) • Operating Systems – Hide the complexity of software • Read 200 bytes from file A versus managing the motor and arms of the disk drive – Provide an interface for the programmer • Usually documented as a set of API’s – ex: Win32 on Windows98 & WindowsNT – Win32 contains about 6,000 API’s – OpenFile(), CreateProcess(), ... – Systems software usually sits on top of the kernel of the OS • Command Interpreter, Security Manager, Utilities (e.g., awk, grep on Unix) – Most processors support multiple execution modes • Minimally Kernel/Supervisor and User modes Introduction Brian Mitchell ([email protected]) - Operating Systems 18 OS Architecture (con’t) • Operating system runs in Kernel mode and user programs run in User mode • Kernel Mode – Full access to machine instruction set – Direct access to hardware, memory, and input/output devices – OS and device drivers must run in Kernel mode • User Mode – Access to a limited set of machine instructions – No direct access to hardware, memory and input/output devices • Device access is coordinated by OS – Typically user mode instructions consist of computational instructions • MS DOS only supported Kernel mode Introduction Brian Mitchell ([email protected]) - Operating Systems 19 OS Architecture - Summary • Operating System acts as an extended machine from a user program perspective – Reduce complexity – Increase system integrity – Reduce redundancy • Operating System acts as a resource manager – Hardware provides many resources to user programs – Demand for resources may exceed resource capacity – OS must optimally manage allocation of the resources • Ex: Memory, Processor/CPU time Introduction Brian Mitchell ([email protected]) - Operating Systems 20 Example: Web Browser WEB Browser http://www.mcs.drexel.edu Socket API User Mode Operating System Switch to TCP/IP Frames Kernel Mode Device Driver Memory-Mapped Kernel Mode Network Interface Card (NIC) Electrical Signals Network Introduction Brian Mitchell ([email protected]) - Operating Systems 21 History of Operating Systems • First Generation (1945-1955) – Hardware was tube-based – Programs were hardwired on plugboards – Hardware could run one program at a time – Applications: Numerical Calculations • Second Generation (1955-1965) – Transistor-based – Assembler - improvement over machine language – High Level Language - FORTRAN – Batch oriented • Jobs were created on card or tape • Jobs were serially executed – Scientific / Engineering applications – Early operating systems introduced

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    30 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us