Presentation on theme: "Lectutre-01 Introduction and Overview Somia Razzaq NFC IET"— Presentation transcript:
1 Lectutre-01 Introduction and Overview Somia Razzaq NFC IET CS Operating SystemsLectutre-01Introduction and OverviewSomia RazzaqNFC IET
2 Interaction is important! Goals for todayWhat is an Operating System?And – what is it not?Why study Operating Systems?How the course will proceed?Course contentGradingRegulationsInteraction is important!Ask Questions!Note: Some slides and/or pictures in the following lectures are adapted from author slides by Silberschatz, Galvin, and Gagne and some from different instructor lectures taken from internet.
6 Computer System Hardware KeyboardMousePrinterRAM/ROMHDMemBusSystem BusMonitorCDProcessorFloating PointUnitIntegerCacheControl
7 What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardwareA program that allocates and de-allocates computer system resources in an efficient, fair, and secure manner—a resource manager
8 Goals of Operating System Operating system goals:Execute user programs and make solving user problems easierMake the computer system convenient to useUse the computer hardware in an efficient manner
9 Technology Trends: Moore’s Law Gordon Moore (co-founder of Intel) predicted in 1965 that the transistor density of semiconductor chips would double roughly every 18 months.2X transistors/Chip Every 1.5 yearsCalled “Moore’s Law”Moore’s LawMicroprocessors have become smaller, denser, and more powerful.How many transistors you think a processor would have?10s? 1000s? Millions?Alright.. About ten million transistors.. In January 1995, the Digital Alpha microprocessor had 9.3 million transistors. Six years later, a state of the art microprocessor contained more than 40 million transistors. Isn’t it complex!Until 2002 the curve kept going higher exponentially like this.At Intel and other manufacturers started to panic as they had made transistor so small that they pondered what we gonna do now to keep the curve moving
10 ManyCore Chips: The future is here Intel 80-core multicore chip (Feb 2007)80 simple coresTwo floating point engines /coreMesh-like "network-on-a-chip“100 million transistors65nm feature sizeFrequency Voltage Power Bandwidth Performance3.16 GHz V 62W Terabits/s Teraflops5.1 GHz 1.2 V 175W Terabits/s Teraflops5.7 GHz V 265W Terabits/s Teraflops“ManyCore” refers to many processors/chip64? 128? Hard to say exact boundaryHow to program these?Use 2 CPUs for video/audioUse 1 for word processor, 1 for browser76 for virus checking???Parallelism must be exploited at all levels
11 Computer System Organization Computer-system operationOne or more CPUs, device controllers connect through common bus providing access to shared memoryConcurrent execution of CPUs and devices competing for memory cycles
12 Functionality comes with great complexity! Pentium IV ChipsetProcCachesBussesMemoryI/O Devices:ControllersadaptersDisksDisplaysKeyboardsNetworksPentium 4 is already getting old as Intel is coming up with some new chipsetsThis complexity gives us some very interesting stuffIt gives us networking, gamming, graphics, efficiency.. Loads more
13 Sample of Computer Architecture Topics Input/Output and StorageDisks, WORM, TapeRAIDEmerging TechnologiesInterleavingBus protocolsDRAMCoherence,Bandwidth,LatencyMemoryHierarchyL2 CacheNetworkCommunicationOther ProcessorsAddressing,Protection,Exception HandlingL1 CacheVLSIInstruction Set ArchitecturePipelining, Hazard Resolution,Superscalar, Reordering,Prediction, Speculation,Vector, Dynamic CompilationPipelining and InstructionLevel Parallelism
14 Example: Some Mars Rover (“Pathfinder”) Requirements Pathfinder hardware limitations/complexity:20Mhz processor, 128MB of DRAM, VxWorks OScameras, scientific instruments, batteries, solar panels, and locomotion equipmentMany independent processes work togetherCan’t hit reset button very easily!Must reboot itself if necessaryMust always be able to receive commands from EarthIndividual Programs must not interfereBetter not crash antenna positioning software!Further, all software may crash occasionallyAutomatic restart with diagnostics sent to EarthPeriodic checkpoint of results saved?Certain functions time critical:Need to stop before hitting somethingMust track orbit of Earth for communicationWhy processor is so limited?What if you had to move the rover paying attention to every little component? Taking care of the motors, measuring soil/distances, coordinating with the controller at Earth…!Distance 186 light secs to 21 light minutes one-wayNearly two earth yearsIf you have to move the rover with consideration to every little complexity.. Including taking care of all the motors, measuring the soil/distance and talking to the co-pilot.. How difficult would that be?Why processor is so limited? Power consumption!Blue screen of death? Help! Game over! What happens if rover gets the blue screen of death? What we want is if it crashes, we want to figure out a way if the main system is down we should be able to reboot it atleast.. Rover should always be able to get signals from earth.. Restart, send diagnostics to earth – bug fixing!Certain functions are higher priority than others.. You better stop before you hit someone.. Prioritization is importantIt’s a fun example to think what would be your core requirements not only in terms of hardware but software too.We can do that using an OS
15 How do we tame complexity? Every piece of computer hardware is differentDifferent CPUPentium, PowerPC, ColdFire, ARM, MIPSDifferent amounts of memory, disk, …Different types of devicesMice, Keyboards, Sensors, Cameras, Fingerprint readersDifferent networking environmentCable, DSL, Wireless, Firewalls,…Questions:Does the programmer need to write a single program that performs many independent activities?Does every program have to be altered for every piece of hardware?Does a faulty program crash everything?Does every program have access to all hardware?Dell commercial.. Making your machine separately for youYour comp is different from other ones.. Different CPUs, keyboards, memories, finger print readers
16 OS Tool: Virtual Machine Abstraction ApplicationOperating SystemHardwarePhysical Machine InterfaceVirtual Machine InterfaceSoftware Engineering Problem:Turn hardware/software quirks what programmers want/needOptimize for convenience, utilization, security, reliability, etc…For Any OS area (e.g. file systems, virtual memory, networking, scheduling):What’s the hardware interface? (physical reality)What’s the application interface? (nicer abstraction)Hardware is complicated.. I would put an OS .. It will provide an interface which is simple and similar for everybodye.g., a USB drive is far more different than the hard drive in your computer.. No motor.. Disk spinning but you use both in quite a similar mannerMaking sense?We are trying to make things easier for the programmers.. You may want to be programmers of advanced complex apps in near futureOlder programmers had to be pretty much specialized in a lot many details. Now all the programmers need not be of the same engineering mind set.. Ppl with different creativity capabilities can do different things in their own specialized areas without worrying about the underlying architectural details of hardware, computer organization, memory and IO details.
17 What does an Operating System do? Silerschatz and Galvin: “An OS is Similar to a government”Begs the question: does a government do anything useful by itself?Coordinator and Traffic Cop:Manages all resourcesSettles conflicting requests for resourcesPrevents errors and improper use of the computerFacilitator:Provides facilities that everyone needsStandard Libraries, Windowing systemsMake application programming easier, faster, less error-proneSome features reflect both tasks:E.g. File system is needed by everyone (Facilitator)But File system must be Protected (Traffic Cop)
18 So what is this course all about? What we’ll be covering? andHow we shall proceed?
19 Tentative Course Outline Week #ModuleTopics1IntroductionIntroduction to the courseOperating System ConceptsSystem Structures2Process ConceptsProcess SchedulingProcess OperationsInter process CommunicationCommunication in Client Server Systems3Multithreaded ProgrammingOverviewMultithreading ModelsThread Libraries4Basic ConceptsScheduling CriteriaScheduling AlgorithmsThread Scheduling
21 Course Outline Week # Module Topics 8 Mid Term Exam 9 Virtual Memory Demand PagingCopy-on-WritePage ReplacementAllocation of FramesThrashing10File SystemFile ConceptAccess MethodsDirectory and Disk StructureFile System Mounting11-12Secondary Storage StructureOverview of Mass Storage StructureDisk StructureDisk SchedulingRAID Structure Overview
22 Course Outline Week # Module Topics 12-13 I/O Systems Overview HardwareApplication I/O InterfaceKernel I/O SubsystemTransforming Requests to Hardware OperationsStreams13-14ProtectionGoalsPrinciplesDomainAccess MatrixAccess Control15SecurityThe issueThreatsCryptographyAuthenticationDefense16Distributed Operating SystemsAn overview of Distributed Operating System Concepts
23 Tentative Lab Exercise Plan ModuleWeekLab 1Process Creation in JavaRMI Example (Optional)Week 2Lab 2Threads in JavaWeek 3Lab 3Threads in Java (priority scheduling example)Week4Lab 4Synchronization in JavaWeek 5Lab 5Deadlock Example with handling of deadlocks in JavaWeek 6Lab 6Memory Management ExerciseWeek 8We’ll also be playing with Linux Operating System later on in the second half of the course
24 TextbookOperating System Concepts – 7/8th Edition Silberschatz, Galvin, and Gagne (Textbook)Modern Operating Systems,3rd Edition, Tanenbaum A.S., (Reference)
26 Academic Dishonesty Policy Copying all or part of another person's work, or using reference material not specifically allowed, are forms of cheating and will not be tolerated. A student involved in an incident of cheating will be subject to strict disciplinary action as per the institute’s policies.The instructor may take actions such as:require repetition of the subject work,assign a'zero' grade to the subject work,