CSS430 Introduction Textbook Ch1 – Ch2

  • View
    45

  • Download
    0

Embed Size (px)

DESCRIPTION

CSS430 Introduction Textbook Ch1 – Ch2. These slides were compiled from the OSC textbook slides (Silberschatz, Galvin, and Gagne) and the instructor’s class materials. Course Objectives. You will: Study the fundamental concepts of operating systems Practice the logical design using Java - PowerPoint PPT Presentation

Text of CSS430 Introduction Textbook Ch1 – Ch2

  • CSS430 Introduction*CSS430 IntroductionTextbook Ch1 Ch2

    These slides were compiled from the OSC textbook slides (Silberschatz, Galvin, and Gagne) and the instructors class materials.

    CSS430 Introduction

  • CSS430 Introduction*Course ObjectivesYou will:Study the fundamental concepts of operating systemsPractice the logical design using JavaBut not:Learn how to use/hack Windows and LinuxIf this is your main objective, you should take R140/145/R708 of UW Computing Training http://www.washington.edu/computing/trainingSkill up system programming with C++Program 1 will deal with several system calls, but if this is your main interest, you should take CSS432, CSS434 or other C++ programming courses.

    CSS430 Introduction

  • Other Noteworthy OSesDistributed OSesAll blends of *NIXAny windows competitor IBM PS/2NeXT OSCommodore 64Embedded OSesLow-power OSes

    CSS430 Introduction*

    CSS430 Introduction

  • CSS430 Introduction*Important Time LinesProgram 1:System calls and shellProgram 2:SchedulerMidterm:Process ManagementProgram 3:SynchronizationProgram 4:PagingFinal:Memory/File ManagementProject:Unix-like file system(Check the syllabus for their due dates.)

    CSS430 Introduction

  • CSS430 Introduction*Important Web Pages and Email AddressesOur class web:http://courses.washington.edu/css430/index.htmlJava:http://java.sun.com/j2se/1.4/docs/api/index.htmlInstructors email:{mfukuda, ksung, or rynn}@u.washington.eduClass discussion mailing list:Use the message board.Assignment submission:Use Catalyst drop box.

    CSS430 Introduction

  • CSS430 Introduction*What is an Operating SystemGoalsMaking the computer system convenient to useUsing computer hardware in an efficient mannerDefinitionsResource allocator manages and allocates resourcesControl program controls the execution of user programs and operations of I/O devices Kernel the one program running at all times (all else being application programs)

    CSS430 Introduction

  • CSS430 Introduction*Computer System Components

    CSS430 Introduction

  • OS - IntermediaryThe OS acts on our behalf as a micro-managerAn OS acts as an intermediary between the computer and the userIt should use resources fairly and efficiently; ease of useIt should protect users from one another, and from the kernelCSS430 Introduction*

    CSS430 Introduction

  • From the Textan OS is similar to a government

    CSS430 Introduction*

    CSS430 Introduction

  • More from the Dino BookLike a government, the OS performs no useful function by itselfCSS430 Introduction*

    CSS430 Introduction

  • O.S. & Computer ArchitectureAs hardware is introduced, Oses are built to make the hardware useableAs Oses evolve, it becomes obvious that certain hardware elements could simplify the operation of the kernelSo, a back-and-forth cycle exists.CSS430 Introduction*

    CSS430 Introduction

  • CSS430 Introduction*Operating Systems HistoryBatch systems:Multiprogramming: IBM360Time-sharing systems: Multics, UnixPersonal-computer systems: Windows, LinuxDistributed systems: Amoeba, Mach

    CSS430 Introduction

  • CSS430 Introduction*Batch SystemsA job is assembled of the program, the data, and some control information (in control cards).Programmers pass their jobs to an operator.The operator batched together jobs.OS transfers control from one job to another.Each job output is sent back to the programmer.

    CSS430 Introduction

  • CSS430 Introduction*MultiprogrammingSeveral jobs are kept in main memory at the same time.OS picks one of them to execute.The job may have to wait for a slow I/O operation to complete.OS switches to and executes another job.To facilitate multiprogramming, OS needs:Job schedulingMemory management

    CSS430 Introduction

  • CSS430 Introduction*Time-Sharing SystemsThis is a logical extension of multiprogramming.Each user has at least one separate program in memory.A program in execution is referred to as a process.Process switch occur so frequently that the users can interact with each program while it is running.File system allows users to access data and program interactively.

    CSS430 Introduction

  • CSS430 Introduction*Personal-Computer SystemsPersonal computers computer system dedicated to a single user.User convenience and responsivenessCan adopt technology developed for larger operating systems some features. At its beginning, a single user system didnt not need advanced CPU utilization and protection.Later, file protection is necessary to avoid virus.Overall, the same OS concepts are appropriate for the various different classes of computers.

    CSS430 Introduction

  • CSS430 Introduction*Parallel SystemsMultiprocessor systems with more than one CPU in close communication (in one box).Tightly coupled system processors share memory and a clock; shared-memory-based communication.Advantages of parallel system: Increased throughputEconomical Increased reliability

    CSS430 Introduction

  • CSS430 Introduction*Distributed SystemsLoosely coupled system each processor has its own local memory; message-based communication through various communications lines, such as SAN, LAN, WAN or telephone lines.Advantages of distributed systems.Resources Sharing (Printer, DB, special devices)Performance (load sharing, process migration)ReliabilityCommunicationshttp://directory.google.com/Top/Computers/Software/Operating_Systems/Network/Distributed/

    CSS430 Introduction

  • CSS430 Introduction*Real-Time SystemsDedicated to a single application: controlling scientific experiments, medical imaging systems, industrial, and military control systems (ex. Dam control, nuclear reactor, missile guiding, etc.).Hard deadlineHard real-time system.Data stored in short-term memory or ROMConflicts with time-sharing systemsSoft real-time systemBest effort to meet the deadlineUseful in applications (multimedia, virtual reality, QoS)

    CSS430 Introduction

  • CSS430 Introduction*Computer Hardware

    CSS430 Introduction

  • CSS430 Introduction*Synchronous I/ODuring execution, each program needs I/O operations to receive keyboard inputs, open files, and print out results.At the early computer era, a program had to wait for an I/O operation to be completed. (Synchronous I/O)This frequently causes CPU idle.

    CSS430 Introduction

  • CSS430 Introduction*Async I/O and InterruptsAsynchronous I/O returns control to a user program without waiting for the I/O to complete.When the I/O is completed, an interrupt occurs to CPU that temporarily suspends the user program and handles the I/O device.userkerneltime

    CSS430 Introduction

  • CSS430 Introduction*Discussions 1What tasks should OS perform in order to suspend and resume a program? List them.

    Program suspensionProgram resumption1.2...1.2...

    CSS430 Introduction

  • CSS430 Introduction*Hardware ProtectionPurpose: With resource sharing, many programs could be affected by a bug in one program.Incorrect or malicious resource accesses cause a hardware trap to the operating system.Dual-Mode Operation:User mode: no privileged instructions allowed.Kernel mode: Privileged instructions allowed.I/O Protection:all privilegedMemory Protection: A region from the base to the limit register allowed to useCPU Protection:CPU allowed to use until the timer gets 0.

    CSS430 Introduction

  • CSS430 Introduction*Dual-Mode OperationsProvide hardware support to differentiate between at least two modes of operations.1.User mode execution done on behalf of a user.2.Monitor mode (also supervisor mode, system mode, or Kernel mode) execution done on behalf of operating system. Switching between two modesDevice interrupts, hardware traps, system calls cause a trap to the kernel modeThe operating system returns to the user mode after servicing requests.

    CSS430 Introduction

  • CSS430 Introduction*System Calls

    CSS430 Introduction

  • CSS430 Introduction*Discussions 2Early computers did not have interrupts, timers, and/or privileged instructions. What features was OS unable to facilitate?

    Features not supported by HWFeatures not facilitated by OSAsynchronous I/O and interruptsTimersPrivileged instructions

    CSS430 Introduction

  • CSS430 Introduction*Discussions 3List three distinct events upon which OS can get back CPU from the current user program.

    1.2.3.

    CSS430 Introduction

  • Project 1 System Calls & ShellsThis warmup exercise has two parts:A C/C++ app that makes direct system calls to UNIXA Shell.java program that runs with ThreadOSCSS430 Introduction*

    CSS430 Introduction

  • Part 1Experiment with User-to-OS APIsSystem calls in C/C++ on Unix

    See the list of system calls you are to use in the assignment

    CSS430 Introduction*

    CSS430 Introduction

  • Part 2To get started, download the ThreadOS files at/usr/apps/css430/ThreadOS/

    Grab the class files, too!Youll need these more than the src for hw1CSS430 Introduction*

    CSS430 Introduction

  • Grading GuideSee http://courses.washington.edu/css430/prog/prog1.html

    More on this ThursdayCSS430 Introduction*

    CSS430 Introduction

    *Hello! Everyone,

    My name is Shinya Kobayashi. Today, I am going to present our paper titled Inter-Cluster Job Coordination Using Mobile Agents on behalf of the first author, Munehiro Fukuda. Munehiro was hoping to show up and present the paper at AMS2001, however he got to wait in Japan until he will get an H1B visa. Since I received the presentation materials from him quite recently, please allow me to present this paper using this script. I can respond to your questions as far as I