DOC PREVIEW
CU-Boulder CSCI 3753 - Introduction

This preview shows page 1-2-3-4-5-6 out of 19 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Operating Systems ConceptsCSCI 3753 AnnouncementsModern Operating SystemsModern Operating SystemsModern Operating SystemsWhat is an Application?Generating a Program’s Binary ExecutableLoading a Program into MemoryExecuting a ProgramCPU Execution of a ProgramMultiprogramming:Batch ProcessingMultiprogrammingMultiprogrammingMultiprogrammingMultiprogrammingMultitaskingMultitaskingMultitaskingOperating Systems: Course OverviewOperating Systems ConceptsProfessor Rick HanDepartment of Computer ScienceUniversity of Colorado at BoulderCSCI 3753 Announcements• Moodle - posted Tuesday’s lecture, updated syllabus, assignment 0, check the news forum for announcements, etc.• TA introduced in recitation the first programming shell assignment (similar to lab exercise 2.1) and CSEL logistics• Introduction to Operating Systems• Read chapters 1 and 2 in the textbookModern Operating Systems• An operating system is a layer of software between manyapplications and diversehardware that– helps to better manage the hardware for an application• otherwise an application saving a file to disk would have to know how the disk operates– helps to share resources and isolate access to resources between multiple applicationsApp3Operating SystemDiskMemoryCPU Display MouseApp2App1I/OModern Operating SystemsApp3DiskMemoryCPU Display MouseApp2App1I/OScheduler VMFileSystem OS“Kernel”• A PC operating system consists of multiple components– scheduler– virtual memory system– file system– other...Modern Operating SystemsSystem Libraries and Tools(Compilers, Shells, GUIs)App3DiskMemoryCPU Display MouseApp2App1I/OScheduler VMFileSystem OS“Kernel”Posix, Win32,Java, C libraryAPISystem call APIDeviceManagerWhat is an Application?Program P1• A software program consist of a sequence of code instructions and data– for now, let a simple app = a program• Computer executes the instructions line by line– code instructions operate on dataCodeDataGenerating a Program’s Binary Executable• We program source code in a high-level language like C or Java, and use tools like compilers to create a program’s binary executableCodeProgram P1’sBinaryExecutableSourceCodeCompilerfile P1.cAssembler LinkerDatagcc can generate any of these stagesP1.sP1.oIn reality, more complex - static vs. dynamic linkingLoading a Program into MemoryCodeDataCodeDataCodeDataP1binaryP2binaryDiskMainMemoryProgramP1binary• Invoked by typing program name in shell• Copies P1 from disk to RAMOS LoaderIn reality, more complex,execve sys call and pagingare involvedExecuting a ProgramCodeDataMainMemoryProgramP1binaryshift left by 2 the value in register R1 and put in address Ainvoke low level system call n to OS: syscall njump to address BMachine Code instructions of binary executableCPU Execution of a Program• Program Counter PC points to address of next instruction to fetchCodeDataMainMemoryProgramP1binaryCPUProgram CounterRegister (PC)RegistersCPU fetches next instructionindicated by PCWrite any output dataFetch any data neededALU• ALU = Arithmetic Logic UnitMultiprogramming:Batch Processing• Load program P1 into memory, called a job, and execute on CPU, running to completion• Then load program P2 into memory, and run to completion– or you could have multiple programs in memory, arranged in a queue, lined up waiting for the CPU• You would submit a batch job to the computer, and while the batch job was running, you could go play tennis, and then come back for the results– very non-interactiveMultiprogrammingMainMemoryDataP1DataP2DataP3Programs Executing on CPUTimeP1P1 blockson I/OP2P1P1resumesP1completes,P2 startsCPU is Idle! =>Poor Utilization,Billions of Wasted CyclesMultiprogramming• What if Program P1 blocks waiting for something to complete?– waiting on I/O, e.g. waiting for a disk write to complete, or waiting for a packet to arrive over the radio• I/O can be very slow compared to CPU speed– then CPU is idle for potentially billions of cycles!• Better if CPU switches to another program P2 and begins executing P2– better utilization of the CPUMultiprogrammingMainMemoryDataP1DataP2DataP3Programs Executing on CPUTimeP1P1 blockson I/OOS SchedulerSwitches CPUBetween MultipleExecutingProgramsP2P2blocks, P3startsP3P3completes,P1 resumesP1MultiprogrammingMainMemoryDataP1DataP2DataP3•CPU time-multiplexes between executable programs– programs share CPU• Memory is space-multiplexed between multiple programs– programs share RAM• Each program sees an abstractmachine (provided by OS)– it has its own private (slower) CPU– it has its own private (smaller) memoryMultitasking• Early computers were big mainframes• We’d like to share the memory and CPU of a mainframe not just between different programs or batch jobs, but also between different human users• Time sharing systems were developed• Give each user a very small slice of the CPU pie frequentlyMultitaskingMainMemoryDataP1DataP2DataP3Programs Executing on CPUTimeP1P2P3OS SchedulerSwitches CPURapidly BetweenMultipleExecutingProgramsP1P2P3P3finishesP1P2P1P2Multitasking• Enables interactivity– In the small time slice a program is given, it can draw a character on the screen that you’ve just typed -appearance of interactivity– In old time-sharing systems, depending on the load, it may take 15 seconds for the character to appear on screen! (learned to type ahead)• In time, this was applied to multiple programs on a PC’s CPU– listen to MP3’s while editing your documents -interactive multitaskingOperating Systems: Course Overview• Chapter 3: OS Organization• Chapter 4-5: Hardware/Device Management– Single application’s view: OS provides hardware abstraction• Process Management– multiple application: OS provides hardware abstraction, resource sharing and isolation• Memory Management• File Management• Security• Distributed


View Full Document

CU-Boulder CSCI 3753 - Introduction

Download Introduction
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?