COP 3402 meeting -*- Outline -*- * the course itself ** Prerequisites ------------------------------------------ PREREQUISITES From the UCF Catalog: "CDA 3103C and COP 3502C each with a grade of "C" (2.0) or better." ------------------------------------------ You need to understand computer organization and simple data structures (e.g., arrays, stacks, hash tables) ** What is systems software? ------------------------------------------ SYSTEMS SOFTWARE def: *systems software*: ----------------------------------------- ... is software that enables running programs on a computer Q: What are examples of systems software? Compilers, interpreters, assemblers, debuggers, linkers, loaders, OS, drivers, etc. *** compilers, interpreters, assemblers ------------------------------------------ SOME DEFINITIONS def: A *compiler* def: An *interpreter* def: An *assembler* ------------------------------------------ ... *compiler* translates a (high-level) programming language into a form that can be (more easily) executed by a computer. This form could be an object file containing instructions in the target machine's native language, or some data structure suited for an interpreter's use, such as the bytecodes of the Java Virtual Machine. Q: What does it mean for a programming language to be "high-level"? It allows several abstraction mechanisms, to help programs be as close to the language of the domain as possible, such as subroutines, data types, and perhaps control mechanisms (like iterators). ... *interpreter* executes a programming language directly, without translating it into some other language first However, an interpreter may do some translation into an internal format (e.g., a virtual machine language) Q: What are some examples of languages with interpreters? Python, Java (to some extent), C# (similarly), JavaScript, ... Modern languages, like Java, often combine interpreters and compilers, using a "just-in-time compiler" that first runs code by interpreting it, gathers statistics, and then compiles programs into machine code that are being executed frequently, but still interprets seldom used code. ... *assembler* translates a low-level language into machine code. Assembly language typically is unstructured. It uses human-readable names for instructions and locations, and it often features an abstraction mechanism (macros). Typically there is a one-to-one ratio of instructions in assembly language and instructions in the translated machine code ------------------------------------------ SOME HISTORY Computers essential for modern life (e.g., check clearing) Nearly impossible for humans to program in machine code Assembly language called "auto coding" Subroutines and libraries allowed expertise to be codified High-level languages (FORTRAN, COBOL) (about 1957) needed considerable effort Various advances made compilers possible: - formal language theory - regular grammars - context-free grammars - syntax-directed translation - symbol tables and static analysis - linkers, loaders Algol 60, Algol 68 showed difficulty of implementation ------------------------------------------ "Auto coding" was the term used in the 1950s and 1960s for assemblers and then compilers The computer industry couldn't sell computers if people couldn't use them, and most people couldn't program in machine code Assembly language was a first step to support human communication: Symbolic, automated bookkeeping *** linkers ------------------------------------------ LINKERS def: A *linker* def: A tool's work is *static* if ------------------------------------------ ... *linker* combines parts of a program into a single executable file, resolving external names (e.g., for library functions) Q: Why is a linker needed in C? So that C programs can use external functions (e.g., libraries) Q: Does a C++ linker do anything else besides what is done in C? Yes, it type checks external names, comparing the type declared in the using module vs. the type of the defining module Q: Does a linker do it's work before running a program? Yes, in C++, but there are also dynamic linkers that bring in library functions during runtime as needed. ... its work is done before running a program, otherwise it is *dynamic* (works during program runs, in general) Q: What is the linker called in Unix? The static linking is done by the C or C++ compiler (gcc or g++) Also "ld" on Unix does (static) linking. (Dynamic linking is done by system calls in the OS.) *** operating system tools ------------------------------------------ OTHER TOOLS RELATED TO OPERATING SYSTEMS def: A *loader* def: A *debugger* def: An *operating system* ------------------------------------------ ... *loader* puts a program in a computer's memory turning relative addresses within a program into (more) absolute addresses (in a modern computer those addresses are still not physical addresses, but "virtual addresses" that are translated by the hardware dynamically into physical addresses) Q: What is the loader called in Unix? ld (but that also does linking) ... *debugger* allows the state of a program's execution to be investigated, typically by displaying the computer's state and allowing execution to be traced or stopped. Q: What are some example debuggers? gdb, adb on Unix ... *OS* is a program that manages a computer's resources. It provides abstractions of the various resources (e.g., files and directories), security, and helps use resources efficiently ** course goals *** objectives Q: What are your objectives for this course? Q: How do you want this course to help you in 5 years? (make a list) My objectives for you: ------------------------------------------ COURSE OBJECTIVES - Explain and correctly use the concepts - Implement, as part of a team, - Evaluate, as part of a team, Why? ------------------------------------------ ... - Explain and correctly use the concepts behind software tools, their design, and their role in a computer operating system - Implement, as part of a team, a software tool, such as a compiler - Evaluate, as part of a team, the quality of a software tool's implementation Why these objectives? Understanding systems software is essential for developers. Because: - This software includes the most important tools for running programs, (such as compilers) - Will increase your software engineering skills, (because you will learn to work in teams on a big project) - Techniques are useful in developing other software tools Other tools typically involve some analysis of programs (e.g., lexical analysis and parsing). (IDEs and text editors for programmers are good examples.) *** outcomes My essential learning outcomes: ------------------------------------------ LEARNING OUTCOMES By the end of the course you will be able to: - UseConcepts - Build - Appraise ------------------------------------------ ... - [UseConcepts] Use and explain concepts related to systems software - [Build] Build systems software in a team. - [Appraise] Apprise the quality of a software tool's implementation in a team. Remember to think about who you would like to be on your team of 3 or 4 people! ** plan for the course ------------------------------------------ PLAN FOR THE COURSE Broad outline: Virtual Machines Compilers - Lexical analysis - Syntax analysis - Code generation OS - interrupts - processes and threads ------------------------------------------ we first look at machines and then how to support high-level languages and efficient processing on machines ** grading ------------------------------------------ GRADING AND FINAL GRADES + No curve grading + Your final grade is based on: Item Percentage of Grade Final Grade Components 46% Exams 23% Midterm 23% Final 34% Project (assignments) 15% Yellowdig (conversations) 5% Recitations ------------------------------------------ details in the simple syllabus on Webcourses *** Textbooks ------------------------------------------ TEXTBOOKS Recommended: Systems Software: Essential Concepts, by Euripides Montagne, Cognella, Cognella Academic Publishing, 2021. Compilers: Principles, Techniques, and Tools (2nd edition) by Alfred V. Aho, Monica S. Lam, Jeffrey D. Ullman, and Ravi Sethi, Pearson, 2007. Engineering A Compiler (2nd edition) by Keith D. Cooper and Linda Torczon, ‎Morgan Kaufmann, 2011. Modern Compiler Implementation in Java (2nd edition) by Andrew W. Appel and Jens Palsberg, Cambridge University Press, 2002. ------------------------------------------ Note that our projects wil be done in C, so don't use code in Java! *** cooperation and cheating ------------------------------------------ COOPERATION Can talk with others about homework - but must cite: - people on different teams - other sources CHEATING Exchange of finished answers outside team - without cooperation in solving them - without certification Using ideas of others - without citation Copying answers from the web - without citation ------------------------------------------ See grading policy for details. *** ask for questions/concerns discuss them