CSCI Operating Systems, Winter 2019 Lab 1 : Introduction to the BLITZ Tools, git, kpl, makefile, etc. Due Date: 21 January 2019

Size: px
Start display at page:

Download "CSCI Operating Systems, Winter 2019 Lab 1 : Introduction to the BLITZ Tools, git, kpl, makefile, etc. Due Date: 21 January 2019"

Transcription

1 CSCI Operating Systems, Winter 2019 Lab 1 : Introduction to the BLITZ Tools, git, kpl, makefile, etc. Due Date: 21 January 2019 Lab and Homework Assignments You may work together to complete the labs, but each person must have their own submission. Homework assignments, however, must be completed, debugged, and uploaded individually. Overview and Goal This lab introduces you to several of the BLITZ tools that you ll be using throughout the term to complete lab and homework assignments. BLITZ was designed specifically for writing a small OS kernel, and was developed by Harry H. Porter at Portland State University. The tools have been modified for use here at WWU. Do not use the original tools. Both executables for the Linux cluster and source code are provided to you so you can install BLITZ on your machine if you so choose. Sections 1 5 pertain to BLITZ setup, and Section 6 onward is the lab. Submission instructions and the rubric are the last section. Throughout this (and future) labs, as well as homework assignment instructions, text that is provided in a box is instructing you to issue verbatim one or more commands via the command line. For example, the following is instructing you to issue the command whoami on the command line : whoami 1 The Documentation Documents describing the BLITZ tools are available at harry/blitz. The local copies of the below 10 documents are at the following : cs.wwu.edu/~jagodzf/teaching/csci447/blitz/. Phil Nelson also keeps a copy, at https: //facultyweb.cs.wwu.edu/~phil/classes/blitz. 1. An Overview of the BLITZ System (7 pages) 2. An Overview of the BLITZ Computer Hardware (8 pages) 3. The BLITZ Architecture (71 pages) 4. Example BLITZ Assembly Program (7 pages) 5. BLITZ Instruction Set (4 pages) 6. The BLITZ Emulator (44 pages) 7. An Overview of KPL, A Kernel Programming Language (66 pages) 8. Context-Free Grammar of KPL (7 pages) 9. BLITZ Tools: Help Information (13 pages) 10. The Format of BLITZ Object and Executable Files (12 pages) 1

2 2 Read the Overview Document Read the first document, An Overview of the BLITZ System, before proceeding. 3 BLITZ hosting and tools You will develop your operating system code on a host computer and you will be running the BLITZ tools on that host computer. BLITZ has been installed on the department s Linux systems, and your code submissions will be run (and tested) there. The BLITZ tool set is made up of the following components: kpl: The KPL compiler asm: The BLITZ assembler lddd: The BLITZ linker blitz: The BLITZ machine emulator (the virtual machine and debugger) diskutil: A utility to manipulate the simulated BLITZ DISK file dumpobj: A utility to print BLITZ.o and a.out files hexdump: A utility to print any file in hex check: A utility to run through a file looking for problem ASCII characters endian: A utility to determine if this machine is Big or Little Endian These tools are listed more-or-less in the order they would be used. You will probably only need to use the first 4 or 5 tools and you may pretty much ignore the remaining tools. The last three tools are only documented by the comments at the beginning of the source code files, which you may read if interested. 4 Setup for use The Blitz executables are available on the department Ubuntu Linux machines in Filip s directory at the following location: /home/jagodzf/public html/teaching/csci447/blitz/bin So that you can invoke the tools (programs) from the command line from any of your directories, add the above bin location to your PATH variable in your login shell rc file. For bash, the file name is.profile, and you may need to create one if the file doesn t exist yet. In case you have never added anything to your path before, edit or create the.profile file in your home directory (assuming you are using bash). For example, placing the following line at the end of your.profile file will make your shell look for commands in the blitz bin directory: export PATH=$PATH:/home/jagodzf/public_html/teaching/csci447/blitz/bin After you edit your.profile file, you need to logout and log back in, or instruct your shell to read/process the new contents of the.profile file by issuing the source command : source /.profile 2

3 To verify that you modified the PATH variable correctly, issue the kpl command from a prompt: kpl You should see the following: ***** ERROR: Missing package name on command line ********** 1 error detected! ********** If you see anything else, then something is wrong. Ask Filip for help if you have any questions. 5 Running BLITZ on your own computer If you are working anywhere in your directory tree on the WWU linux machines, and you don t want to install BLITZ on your own computer, skip this section. The BLITZ tools run on the following host platforms: Apple Macintosh, OS X, either PPCbased or Intel-based machines, Sun Solaris Unix / Linux Systems Windows, using Cygwin which emulates the Unix POSIX interface (see If you want to compile your own copy of the BLITZ tools on your own computer, the source code for all the BLITZ tools is available at BlitzSrc.wwu.tgz. The following steps are for installing and running BLITZ on your own machine. Copy the source tar ball to your machine. (see above for location) Extract the tar ball. Modify the makefile and set the make variable BINDIR to where you want your blitz tools installed. The command make install will make and install the tools. Change your PATH environment variable to include the value you put in the BINDIR definition. 3

4 6 Set up a gitlab project for 447 assignment turn-in During this quarter, you will be turning in your code assignments via the department s gitlab server. Git is a powerful (and very popular) version control system. The idea is simple : your code is stored in a remote location. You can pull (retrieve) that code, and push (upload) changes to it. Many online resources are available detailing the useful git commands and functions. Some of the command-line git comments you ll be using include branch, push, pull, commit, and add. I recommend you use the documentation and tutorials on the official github website ( git-scm.com/) if you are not familiar with git. The git cheat sheet is especially useful, available at Complete the following steps to create your git repo in the department s gitlab instance. These git instructions are a bit verbose, but that s because this is the first lab. 1. Proceed to log in, and create a new gitlab project with the exact following name (capitalization and the underscore are important, because a script will be used to retrieve your submission(s)): csci447 w19 2. Select Members from the dropdown gear menu in the upper right corner of our gitlab web page, and add Filip Jagodzinski (user jagodzf) as a member to your project. Please provide at least Reporter access, which will allow me to retrieve your submissions. You can have my access expire by the end of the term. 3. From a command line, clone your project to a working directory. The clone path is provided to you on the repo page of the gitlab webpage. If you are unsure how to do this (or how to issue any other git command, do a web search and/or ask Filip). An alternative is to use the manual pages on the department s Linux machines. For example, man git branch will display the documentation for git s branch command. If you are working on a CS WWU linux machine, I recommend you create a directory, cs447 for example, and clone the git repo into that directory. 4. In your local (on the WWU linux account) git, create a README file with your name on the first line, and on the second line write Winter CSCI add the README file to your local repo, commit the change, and push the change back to the master branch of the remote git. If done correctly, return to the gitlab web page, and when you navigate to your csci447 w19 repo, the contents of the README file should be displayed. Hint : Use the -m flag to add a messsage to your commit. The following are the exact commands you would issue, one-by-one : git add README git commit -m "inserting README file" git push 6. Create and checkout a new branch in your local git, and name it lab1. When creating a new branch, ALWAYS do that from the master branch. Otherwise, if you create a new branch while on a branch, you are creating a branch of a branch. Refer to the man pages, or perform a web search, to find out how to create and/or check out a branch. 4

5 7. To check which branches are available and which branch you are currently on, issue the branch command : git branch You should see something like the following : * lab1 master where the asterisk specifies the current branch that you are on. 8. Create a new directory, lab1, and place there the unzipped and untarred files from the zipped tar ball from the course website. The files should include the files DISK, *.s, *.h, *.k, and the makefile. 9. Before you push any code to the remote git, it is a good idea to inspect any changes that you ve made (if any) to your local files. That is done by invoking the status command : git status which would output something like the following: On branch lab1 Untracked files: (use "git add <file>..." to include in what will be committed) lab1/ nothing added to commit but untracked files present (use "git add" to track) which indicates that lab1 is a new directory, but that it, nor any of the files in the directory, have not been flagged to be uploaded (included in) the remote git. 10. add and commit the directory to your git, as well as all of the files in that directory. 11. push the new branch to the remote gitlab. When dealing with branches, you must inform git that you want to push your code from your local branch to the remote branch. The following will achieve that: git push --set-upstream origin lab1 Note that you need to have the lab1 branch checked out when you issue this command. In other words, issue the push command when you are working in the local branch lab1. You should not have a lab1 directory on the branch master. Do your work on the lab1 branch for the remainder of this lab. IMPORTANT : by convenion, executable (binary), object (.o), and any other nontext files are not pushed to a git repository. Do not add nor commit nor push such files to your repo! That is because such files are architecture and computer dependent, and are also huge, so pushing them to your git repo will bloat your repository. Only code source files, and plain-text files, are pushed to a git repo. 5

6 7 The BLITZ Assembly Language In this course you are not required to write (much) assembly language code, but you will have to write some for this lab (and perhaps homework 1). However, you will be using some interesting routines which can only be written in assembly. Most if not all assembly language routines will be provided to you, but you will need to be able to read them. Take a look at the files Echo.s and Hello.s to see what BLITZ assembly code looks like. 8 Assemble, Link, and Execute the Hello Program The files you ve downloaded contain an assembly language program called Hello.s. First invoke the assembler (the tool called asm ) to assemble the program: asm Hello.s This should produce no errors and should create a file called Hello.o. The Hello.s program is completely stand-alone; it does not need any library functions and does not rely on any operating system. Nevertheless, it must be linked to produce an executable (an a.out file). The linking is done with the tool called lddd. (In UNIX, the linker is called ld.) lddd Hello.o -o Hello By default, the executable is named a.out, but the -o Hello option specifies that the executable should be named Hello. Execute the program, using the BLITZ virtual machine (emulator): blitz -g Hello The -g option is the auto-go option and it means begin execution immediately. You should see: Beginning execution... Hello, world! **** A debug instruction was encountered ***** Done! The next instruction to execute will be: : A1FFFFB8 jmp 0xFFFFB8! targetaddr = main Entering machine-level debugger... ====================================================== ===== ===== ===== The BLITZ Machine Emulator ===== ===== ===== ===== Copyright , Harry H. Porter III ===== ===== ===== ====================================================== Enter a command at the prompt. info about commands. > Type quit to exit or help for 6

7 At the prompt, quit and exit by typing q (short for quit ). You should see this: > q Number of Disk Reads = 0 Number of Disk Writes = 0 Instructions Executed = 1705 Time Spent Sleeping = 0 Total Elapsed Time = 1705 This program terminates by executing the debug machine instruction. This instruction causes the emulator to stop executing instructions and throws the emulator into command mode. In command mode, you can enter commands, such as quit. The emulator displays the character > as a prompt. After the debug instruction, the Hello program branches back to the beginning. Therefore, if you resume execution (with the go command), it will result in another printout of Hello, world!. 9 A second BLITZ assembly code example, Echo Another assembly language program has been provided for you, named Echo. All that it does is listen to the keyboard, and echoes the typed keys back to the monitor. Inspect the Echo.s file. To assmble, link, and run the program : asm Echo.s lddd Echo.o -o Echo blitz Echo On the last line, we have left out the auto-go -g option. Now, the BLITZ emulator will not automatically begin executing; instead it will enter command mode. When it prompts, type the g command (short for go ) to begin execution. Type some text. Each time the ENTER/RETURN key is pressed, you should see the output echoed. For example: > g Beginning execution... abcd abcd this is a test this is a test q q **** A debug instruction was encountered ***** Done! The next instruction to execute will be: cont: 0000A4: A1FFFFAC jmp 0xFFFFAC! targetaddr = loop > This program watches for the q character and stops when it is typed. If you resume execution with the go command, this program will continue echoing whatever you type. The Echo program is also a stand-alone program, relying on no library functions and no operating system. 7

8 10 The KPL Programming Language In this course, you will write code in the KPL programming language. In preparation for homework 1, begin studying the document titled An Overview of KPL: A Kernel Programming Language, which is one of the 10 documentation files for BLITZ made available for you. Should you read the entirety of that document, word-for-word? No. Should you be familiar with the contents, so that you may use that file as a reference? Yes Compile and Execute a KPL Program called HelloWorld The HelloWorld.k and HelloWorld.h files are being provided for you. Inspect them. These contain the equivalent of the program code (.cpp,.c) and header (.h) for C++ and C. Note that the original Blitz/KPL system used.c files for code, but the compiler has been changed at WWU to use the.k suffix so these files are not confused with C programs by tools like emacs. Type the following commands to compile and link the HelloWorld program: kpl -unsafe System asm System.s kpl HelloWorld asm HelloWorld.s asm Runtime.s lddd Runtime.o System.o HelloWorld.o -o HelloWorld There should be no error messages. The HelloWorld program makes use of some other code, which is contained in the files System.h and System.k. These must be compiled with the -unsafe option. If you leave that out, you ll get 17 compiler error messages, such as: System.h:39: ***** ERROR at PTR: Using ptr to void is unsafe; you must compile with the unsafe option if you wish to do this Using the UNIX compiler convention, this means that the compiler detected an error on line 39 of file System.h. KPL programs are often linked with routines coded in assembly language. Right now, all the assembly code we need is included in a file called Runtime.s. Basically, the assembly code takes care of: Starting up the program Dealing with runtime errors, by printing a message and aborting Printing output (There is no mechanism for input at this stage... This system really needs an OS!) Now execute this program. Type: blitz -g HelloWorld You should see the Hello, world... message. What happens if you type g at the prompt, to resume instruction execution? 8

9 10.2 The makefile The lab1 directory contains a file called makefile, which is used with the UNIX make command. Whenever a file in the lab1 directory is changed, you can type make to re-compile, re-assemble, and re-link as necessary to rebuild the executables. Notice that the following command : kpl HelloWorld will be executed whenever the file System.h is changed. Each package (such as HelloWorld) will have both a header file and a code file. The HelloWorld package uses the System package. Whenever the header file of a package that HelloWorld uses is changed, HelloWorld must be recompiled. However, if the code file for System is changed, you do not need to recompile HelloWorld. You only need to re-link (i.e., you only need to invoke lddd to produce the executable). Consult the KPL documentation for more info about the separate compilation of packages Modify the HelloWorld Program To get more practice, modify the HelloWorld.k program by un-commenting the following line: --foo (10) In KPL, comments are through end-of-line. Simply remove the hyphens and recompile as necessary, using make. The foo function calls bar. The bar function does the following things: Increment its argument Print the value Execute a debug statement Recursively call itself When you run the modified HelloWorld program it will print a value and then halt. The keyword debug in the code is a statement that will cause the emulator to halt execution. Hint: In later assignments, you will probably want to place debug in programs you write when you are debugging, so you can stop execution and look at variables. If you type the go command, the emulator will resume execution. It will print another value and halt again. Type go several times, causing bar to call itself recursively several times. Then try the st command (st is short for stack ). This will print out the execution stack. Try the fr command (short for frame ). You should see the values of the local variables in some activation of bar. Try the up and down commands. These move around in the activation stack. You can look at different activations of bar with the fr command Try Some of the Emulator Commands Try the following commands to the emulator, where abbreviations are shown in parentheses: quit (q) help (h) go (g) 9

10 step (s) t reset info (i) stack (st) frame (fr) up down The step, st, command will execute a single machine-language instruction at a time. You can use it to walk through the execution of an assembly language program, line-by-line. The t command will execute a single high-level KPL language statement at a time. Try typing t several times to walk through the execution of the HelloWorld program. See what gets printed each time you enter the t command. The i command (short for info) prints out the entire state of the (virtual) BLITZ CPU. You can see the contents of all the CPU registers. There are other commands for displaying and modifying the registers. The h command (short for help) lists all the emulator commands. Take a look at what help prints. The reset command re-reads the executable file and fully resets the CPU. This command is useful during debugging. Whenever you wish to re-execute a program (without recompiling anything), you could always quit the emulator and then start it back up. The reset command does the same thing but is faster. Make sure you get familiar with each of the commands listed above; you will be using them later. Feel free to experiment with other commands, too. 11 What to Hand In & Rubric First, make sure you have committed all your changes, including the modified HelloWorld.k file, to the lab1 branch of your git repository on gitlab. Next, create a transcript of a terminal session showing you using the BLITZ system. You should at least run the echo program, as well as the modified HelloWorld program. If you do not know about creating a script file, you can learn about the UNIX script command by accessing the manual page for it: man script Note that if you try to use a text editor while running script, a bunch of garbage characters may be put into the file. Please do not do this. Name your script file lab1-script or lab1- script.txt, and add it to your lab1 branch. Don t forget to commit that file and push it to your lab1 branch. It is a good idea to use the web interface at gitlab.cs.wwu.edu to verify you have the correct files on the gitlab server as that is where they will be retrieved for grading. 10

11 csci447 w19 created in your gitlab, and jagodzf has been granted access permissions 2 The README file has been created and pushed to the master branch 2 branch lab1 created, and files have been pushed to it 2 HelloWorld has been correctly modified and pushed to the lab1 directory 2 A transcript, lab1-script or lab1-script.txt has been created, and pushed to the 2 lab1 directory Total 10 points 11

Programming Project 1: Introduction to the BLITZ Tools

Programming Project 1: Introduction to the BLITZ Tools Programming Project 1: Introduction to the BLITZ Tools Due Date: 2nd October 2017 before 11:30 AM. Duration: One Week Overview and Goal In this course you will be creating an operating system kernel. You

More information

An Overview of the BLITZ System

An Overview of the BLITZ System An Overview of the BLITZ System Harry H. Porter III Department of Computer Science Portland State University Introduction The BLITZ System is a collection of software designed to support a university-level

More information

Lab 4: Shell Scripting

Lab 4: Shell Scripting Lab 4: Shell Scripting Nathan Jarus June 12, 2017 Introduction This lab will give you some experience writing shell scripts. You will need to sign in to https://git.mst.edu and git clone the repository

More information

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3 CS162 January 19, 2017 Contents 1 Make 2 1.1 More details about Make.................................... 2 2 Git 3 2.1 Commands to know....................................... 3 3 GDB: The GNU Debugger

More information

Lab 4: Bash Scripting

Lab 4: Bash Scripting Lab 4: Bash Scripting February 20, 2018 Introduction This lab will give you some experience writing bash scripts. You will need to sign in to https://git-classes. mst.edu and git clone the repository for

More information

Section 1: Tools. Kaifei Chen, Luca Zuccarini. January 23, Make Motivation How... 2

Section 1: Tools. Kaifei Chen, Luca Zuccarini. January 23, Make Motivation How... 2 Kaifei Chen, Luca Zuccarini January 23, 2015 Contents 1 Make 2 1.1 Motivation............................................ 2 1.2 How................................................ 2 2 Git 2 2.1 Learn by

More information

Project #1 Exceptions and Simple System Calls

Project #1 Exceptions and Simple System Calls Project #1 Exceptions and Simple System Calls Introduction to Operating Systems Assigned: January 21, 2004 CSE421 Due: February 17, 2004 11:59:59 PM The first project is designed to further your understanding

More information

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. NOTE: Text

More information

Github/Git Primer. Tyler Hague

Github/Git Primer. Tyler Hague Github/Git Primer Tyler Hague Why Use Github? Github keeps all of our code up to date in one place Github tracks changes so we can see what is being worked on Github has issue tracking for keeping up with

More information

Submitting your Work using GIT

Submitting your Work using GIT Submitting your Work using GIT You will be using the git distributed source control system in order to manage and submit your assignments. Why? allows you to take snapshots of your project at safe points

More information

Software Development I

Software Development I 6.148 Software Development I Two things How to write code for web apps. How to collaborate and keep track of your work. A text editor A text editor A text editor Anything that you re used to using Even

More information

CS354 gdb Tutorial Written by Chris Feilbach

CS354 gdb Tutorial Written by Chris Feilbach CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that

More information

Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22

Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22 Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22 In this lab, you will first learn more about git. After that, you will get some practice on the make utility and learn more

More information

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes Git Charles J. Geyer School of Statistics University of Minnesota Stat 8054 Lecture Notes 1 Before Anything Else Tell git who you are. git config --global user.name "Charles J. Geyer" git config --global

More information

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

CS 246 Winter Tutorial 1

CS 246 Winter Tutorial 1 CS 246 Winter 2015 - Tutorial 1 January 11, 2016 1 Summary General Administration Stuff CS Undergraduate Environment Useful Software Basic Commands.profile Text Editors 2 General Administration Stuff Course

More information

Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002.

Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002. Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002. In this assignment, you will work in teams of one to four (try to form you own group; if you can t find one, you can either work alone,

More information

Shell Project Part 1 (140 points)

Shell Project Part 1 (140 points) CS 453: Operating Systems Project 1 Shell Project Part 1 (140 points) 1 Setup All the programming assignments for Linux will be graded on the onyx cluster(onyx.boisestate.edu). Please test your programs

More information

Git Setup Help using GitKraken (CSE 154)

Git Setup Help using GitKraken (CSE 154) Git Setup Help using GitKraken (CSE 154) Introduction: Git enables keeping track of different versions of files as we keep editing them. To make sure we understand git properly, here are some terms you

More information

CS246-Assign01 V1.1: Winter 2013

CS246-Assign01 V1.1: Winter 2013 CS246-Assign01 V1.1: Winter 2013 http://plg.uwaterloo.ca/~holt/cs/246/2013/asgn01/asgn01.htm Submit. Instructions to submit assignments (using Marmoset): https://marmoset.student.cs.uwaterloo.ca/ Instructions

More information

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47 Working with GIT MNXB01 2017 Florido Paganelli Lund University florido.paganelli@hep.lu.se Florido Paganelli MNXB01-2017 - Working with git 1/47 Required Software Git - a free and open source distributed

More information

CSCI 201 Lab 1 Environment Setup

CSCI 201 Lab 1 Environment Setup CSCI 201 Lab 1 Environment Setup "The journey of a thousand miles begins with one step." - Lao Tzu Introduction This lab document will go over the steps to install and set up Eclipse, which is a Java integrated

More information

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015 Git CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015 1 Lecture Goals Present a brief introduction to git You will need to know git to work on your presentations this semester 2 Git

More information

Using the Zoo Workstations

Using the Zoo Workstations Using the Zoo Workstations Version 1.86: January 16, 2014 If you ve used Linux before, you can probably skip many of these instructions, but skim just in case. Please direct corrections and suggestions

More information

Operating Systems. Objective

Operating Systems. Objective Operating Systems Project #1: Introduction & Booting Project #1: Introduction & Booting Objective Background Tools Getting Started Booting bochs The Bootloader Assembling the Bootloader Disk Images A Hello

More information

Sep 12, 2006 Lecture 2: System Programming

Sep 12, 2006 Lecture 2: System Programming Sep 12, 2006 Lecture 2: System Programming September 19, 2007 1 Introduction In this lecture, we will introduce the basics of systems programming using the language of choice C language. We also introduce

More information

assembler Machine Code Object Files linker Executable File

assembler Machine Code Object Files linker Executable File CSCE A211 Programming Intro What is a Programming Language Assemblers, Compilers, Interpreters A compiler translates programs in high level languages into machine language that can be executed by the computer.

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

More information

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow Tutorial: Getting Started with Git Introduction to version control Benefits of using Git Basic commands Workflow http://xkcd.com/1597/ 2 Tutorial Objectives Fundamentals of how git works Everything you

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to development tools 0.1 Development tools During this course, only the make tool, compilers, and the GIT tool will be used for the sake of simplicity:

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

HW2d Project Addenda

HW2d Project Addenda HW2d Project Addenda CS 320 Note the following differences between the project description for Harvard s CS 175 class and our class: 1. The CS 175 due date is not applicable. 2. The starter code location

More information

CSE 391 Lecture 9. Version control with Git

CSE 391 Lecture 9. Version control with Git CSE 391 Lecture 9 Version control with Git slides created by Ruth Anderson & Marty Stepp, images from http://git-scm.com/book/en/ http://www.cs.washington.edu/391/ 1 Problems Working Alone Ever done one

More information

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Table of Contents Preparation... 3 Exercise 1: Create a repository. Use the command line.... 4 Create a repository...

More information

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY 1 REVERTING CHANGES 2 REVERTING CHANGES Change local files git reset git checkout Revert a commit in the branch history git revert Reset

More information

Tutorial 2 GitHub Tutorial

Tutorial 2 GitHub Tutorial TCSS 360: Software Development Institute of Technology and Quality Assurance Techniques University of Washington Tacoma Winter 2017 http://faculty.washington.edu/wlloyd/courses/tcss360 Tutorial 2 GitHub

More information

Reviewing gcc, make, gdb, and Linux Editors 1

Reviewing gcc, make, gdb, and Linux Editors 1 Reviewing gcc, make, gdb, and Linux Editors 1 Colin Gordon csgordon@cs.washington.edu University of Washington CSE333 Section 1, 3/31/11 1 Lots of material borrowed from 351/303 slides Colin Gordon (University

More information

Using GitHub to Share with SparkFun a

Using GitHub to Share with SparkFun a Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing

More information

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY 1 WHAT IS VERSION CONTROL? Management of changes to documents like source code, scripts, text files Provides the ability to check documents in

More information

Lab #0 Getting Started Due In Your Lab, August 25, 2004

Lab #0 Getting Started Due In Your Lab, August 25, 2004 Lab #0 Getting Started Due In Your Lab, August 25, 2004 Name: Lab Time: Grade: /10 Man UNIX systems contain on-line manuals called man pages that are accessed through the program man. To find out how to

More information

How to be a 1337 h4ck3r: Git + Linux

How to be a 1337 h4ck3r: Git + Linux How to be a 1337 h4ck3r: Git + Linux An introduction to Git, version control, and Linux by Samsara Counts, Pat Cody, and Joseph Schiarizzi Slides adapted from Neel Shah and Phil Lopreiato DISCLAIMER: GW

More information

CSE 15L Winter Midterm :) Review

CSE 15L Winter Midterm :) Review CSE 15L Winter 2015 Midterm :) Review Makefiles Makefiles - The Overview Questions you should be able to answer What is the point of a Makefile Why don t we just compile it again? Why don t we just use

More information

Project 8: Virtual Machine Translator II

Project 8: Virtual Machine Translator II Project 8: Virtual Machine Translator II CS 220 Start: Nov. 18; Due: Dec. 8 at 11:55 pm Background We continue building the VM Translator a program that translates a program written in the VM language

More information

Laboratory Assignment #4 Debugging in Eclipse CDT 1

Laboratory Assignment #4 Debugging in Eclipse CDT 1 Lab 4 (10 points) November 20, 2013 CS-2301, System Programming for Non-majors, B-term 2013 Objective Laboratory Assignment #4 Debugging in Eclipse CDT 1 Due: at 11:59 pm on the day of your lab session

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

How to version control like a pro: a roadmap to your reproducible & collaborative research

How to version control like a pro: a roadmap to your reproducible & collaborative research How to version control like a pro: a roadmap to your reproducible & collaborative research The material in this tutorial is inspired by & adapted from the Software Carpentry lesson on version control &

More information

Lab 4: Interrupts and Realtime

Lab 4: Interrupts and Realtime Lab 4: Interrupts and Realtime Overview At this point, we have learned the basics of how to write kernel driver module, and we wrote a driver kernel module for the LCD+shift register. Writing kernel driver

More information

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 Git Tutorial André Sailer CERN-EP-LCD ILD Technical Meeting April 24, 2017 LD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 2/36

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

The Online Unix Manual

The Online Unix Manual ACS-294-001 Unix (Winter Term, 2018-2019) Page 14 The Online Unix Manual Unix comes with a large, built-in manual that is accessible at any time from your terminal. The Online Manual is a collection of

More information

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015 Git all meaningful operations can be expressed in terms of the rebase command -Linus Torvalds, 2015 a talk by alum Ross Schlaikjer for the GNU/Linux Users Group Sound familiar? add commit diff init clone

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

We first learn one useful option of gcc. Copy the following C source file to your

We first learn one useful option of gcc. Copy the following C source file to your Lecture 5 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lab 5: gcc and gdb tools 10-Oct-2018 Location: Teaching Labs Time: Thursday Instructor: Vlado Keselj Lab 5:

More information

1. Git. Robert Snapp

1. Git. Robert Snapp . Git Robert Snapp snapp@cs.uvm.edu Department of Computer Science University of Vermont CS 3 (UVM). Git Fall 0 / Git CS 3 (UVM). Git Fall 0 / Setting your defaults in /.git > git config --global user.name

More information

Lab 1 1 Due Wed., 2 Sept. 2015

Lab 1 1 Due Wed., 2 Sept. 2015 Lab 1 1 Due Wed., 2 Sept. 2015 CMPSC 112 Introduction to Computer Science II (Fall 2015) Prof. John Wenskovitch http://cs.allegheny.edu/~jwenskovitch/teaching/cmpsc112 Lab 1 - Version Control with Git

More information

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on Chapter 2: Operating-System Structures Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Objectives To describe the services an operating system provides to users, processes, and

More information

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani - KTH Royal Institute of Technology SEMINAR 2-29 March 2017 Simone Stefani - sstefani@kth.se WHAT IS THIS SEMINAR ABOUT Branching Merging and rebasing Git team workflows Pull requests and forks WHAT IS THIS

More information

CS 261 Recitation 1 Compiling C on UNIX

CS 261 Recitation 1 Compiling C on UNIX Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Compiling C on UNIX Winter 2017 Outline Secure Shell Basic UNIX commands Editing text The GNU Compiler

More information

Tips on how to set up a GitHub account:

Tips on how to set up a GitHub account: Tips on how to set up a GitHub account: 1. Go to the website https://github.com/, you will see the following page: Figure 1: The GitHub main webpage (before you create an account and sign in) Then choose

More information

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup Purpose: The purpose of this lab is to setup software that you will be using throughout the term for learning about Python

More information

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment This document guides you through setting up Eclipse for CSE 332. The first section covers using gitlab to access

More information

CS631 - Advanced Programming in the UNIX Environment. UNIX development tools

CS631 - Advanced Programming in the UNIX Environment. UNIX development tools CS631 - Advanced Programming in the UNIX Environment Slide 1 CS631 - Advanced Programming in the UNIX Environment UNIX development tools Department of Computer Science Stevens Institute of Technology Jan

More information

Kivy Designer Documentation

Kivy Designer Documentation Kivy Designer Documentation Release 0.9 Kivy October 02, 2016 Contents 1 Installation 3 1.1 Prerequisites............................................... 3 1.2 Installation................................................

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

Problem Set 1: Unix Commands 1

Problem Set 1: Unix Commands 1 Problem Set 1: Unix Commands 1 WARNING: IF YOU DO NOT FIND THIS PROBLEM SET TRIVIAL, I WOULD NOT RECOMMEND YOU TAKE THIS OFFERING OF 300 AS YOU DO NOT POSSESS THE REQUISITE BACKGROUND TO PASS THE COURSE.

More information

CS 642 Homework #4. Due Date: 11:59 p.m. on Tuesday, May 1, Warning!

CS 642 Homework #4. Due Date: 11:59 p.m. on Tuesday, May 1, Warning! CS 642 Homework #4 Due Date: 11:59 p.m. on Tuesday, May 1, 2007 Warning! In this assignment, you will construct and launch attacks against a vulnerable computer on the CS network. The network administrators

More information

Getting started with UNIX/Linux for G51PRG and G51CSA

Getting started with UNIX/Linux for G51PRG and G51CSA Getting started with UNIX/Linux for G51PRG and G51CSA David F. Brailsford Steven R. Bagley 1. Introduction These first exercises are very simple and are primarily to get you used to the systems we shall

More information

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0.

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0. CSCI0330 Intro Computer Systems Doeppner Lab 02 - Tools Lab Due: Sunday, September 23, 2018 at 6:00 PM 1 Introduction 0 2 Assignment 0 3 gdb 1 3.1 Setting a Breakpoint 2 3.2 Setting a Watchpoint on Local

More information

A Tutorial on using Code::Blocks with Catalina 3.0.3

A Tutorial on using Code::Blocks with Catalina 3.0.3 A Tutorial on using Code::Blocks with Catalina 3.0.3 BASIC CONCEPTS...2 PREREQUISITES...2 INSTALLING AND CONFIGURING CODE::BLOCKS...3 STEP 1 EXTRACT THE COMPONENTS...3 STEP 2 INSTALL CODE::BLOCKS...3 Windows

More information

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko 213/513/613 Linux/Git Bootcamp Cyrus, Eugene, Minji, Niko Outline 1. SSH, bash, and navigating Linux 2. Using VIM 3. Setting up VS Code 4. Git SSH 1. On macos/linux: $ ssh ANDREW-ID@shark.ics.cs.cmu.edu

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

Linux File System and Basic Commands

Linux File System and Basic Commands Linux File System and Basic Commands 0.1 Files, directories, and pwd The GNU/Linux operating system is much different from your typical Microsoft Windows PC, and probably looks different from Apple OS

More information

Version control with Git.

Version control with Git. 1 Version control with Git http://git-scm.com/book/en/ Basic Intro to Git We will: Discuss how Git differs from Subversion Discuss the basic Git model Pull/clone files from a repository on github Edit

More information

CS4023 Week04 Lab Exercise

CS4023 Week04 Lab Exercise CS4023 Week04 Lab Exercise Lab Objective: We will use this lab to log in to our Linux accounts and to look at some simple programs that perform a few elementary system calls. By the end of the lab we will

More information

CSE 332: Data Structures and Parallelism Autumn 2017 Setting Up Your CSE 332 Environment In this document, we will provide information for setting up Eclipse for CSE 332. The first s ection covers using

More information

Software Project (Lecture 4): Git & Github

Software Project (Lecture 4): Git & Github Software Project (Lecture 4): Git & Github Wouter Swierstra, Atze Dijkstra Feb 2016 Wouter Swierstra, Atze Dijkstra Software Project (Lecture 4): Git & Github Feb 2016 1 / 45 Wouter Swierstra, Atze Dijkstra

More information

Exercise Session 6 Computer Architecture and Systems Programming

Exercise Session 6 Computer Architecture and Systems Programming Systems Group Department of Computer Science ETH Zürich Exercise Session 6 Computer Architecture and Systems Programming Herbstsemester 2016 Agenda GDB Outlook on assignment 6 GDB The GNU Debugger 3 Debugging..

More information

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Section 2: Developer tools and you. Alex Mariakakis (staff-wide) Section 2: Developer tools and you Alex Mariakakis cse331-staff@cs.washington.edu (staff-wide) What is an SSH client? Uses the secure shell protocol (SSH) to connect to a remote computer o Enables you

More information

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub Git 101: Overview 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub Github icon 1 Install git and a create GitHub

More information

Projects and Environment Introduction

Projects and Environment Introduction Projects and Environment Introduction A lot to go over today History of Linux Projects Overview Project partners Programming environment Programming language Useful Tools History of Linux The Beginning:

More information

COMP Lecture Notes The Compiler

COMP Lecture Notes The Compiler COMP 161 - Lecture Notes - 05 - The Compiler January 20, 2016 In these notes we talk about compiling our multi-file C++ program in order to check syntax errors, run unit-tests, or build the main executable.

More information

Your desktop or laptop computer consists of several hardware components:

Your desktop or laptop computer consists of several hardware components: Appendix A VirtualBox This appendix describes the role of an operating system on your desktop or laptop computer, how virtualization packages enable you to simultaneously run multiple operating systems

More information

2 Initialize a git repository on your machine, add a README file, commit and push

2 Initialize a git repository on your machine, add a README file, commit and push BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal

More information

CSCE UVM Hands-on Session-1 Pre-Work

CSCE UVM Hands-on Session-1 Pre-Work CSCE489-689 UVM Hands-on Session-1 Pre-Work Please complete the following steps before the lecture on Feb-16. These steps will help set-up the environment and tools necessary for the hands-on session.

More information

Version Control with Git ME 461 Fall 2018

Version Control with Git ME 461 Fall 2018 Version Control with Git ME 461 Fall 2018 0. Contents Introduction Definitions Repository Remote Repository Local Repository Clone Commit Branch Pushing Pulling Create a Repository Clone a Repository Commit

More information

Preparing and Running C Programs for CS 136 (W08)

Preparing and Running C Programs for CS 136 (W08) Preparing and Running C Programs for CS 136 (W08) There are a number of options available to you for developing C code. The choice is up to you. The main thing to keep in mind is that, as in CS 135, the

More information

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

CS 520: VCS and Git. Intermediate Topics Ben Kushigian CS 520: VCS and Git Intermediate Topics Ben Kushigian https://people.cs.umass.edu/~rjust/courses/2017fall/cs520/2017_09_19.zip Our Goal Our Goal (Overture) Overview the basics of Git w/ an eye towards

More information

Version control with git and Rstudio. Remko Duursma

Version control with git and Rstudio. Remko Duursma Version control with git and Rstudio Remko Duursma November 14, 2017 Contents 1 Version control with git 2 1.1 Should I learn version control?...................................... 2 1.2 Basics of git..................................................

More information

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week Lab #8 Git Agenda - Final Project Info - All things Git - Make sure to come to lab for Python next week Final Project Low Down The Projects are Creative AI, Arduino, Web Scheduler, ios and Connect 4 Notes

More information

A Gentle Introduction to CMSC311 labs and CVS Or How I learned to use CVS in CMSC311. William Arbaugh September 2, 2004

A Gentle Introduction to CMSC311 labs and CVS Or How I learned to use CVS in CMSC311. William Arbaugh September 2, 2004 A Gentle Introduction to CMSC311 labs and CVS Or How I learned to use CVS in CMSC311 William Arbaugh September 2, 2004 This howto assumes that you already have scp and ssh installed on your computer. If

More information

History...: Displays a window of Gitk, a standard commit viewer for Git.

History...: Displays a window of Gitk, a standard commit viewer for Git. Git Services Wakanda includes Git features that will help you manage the evolution of your solutions and files. These features are designed to share code as well as to handle multi developer projects and

More information

Lab 08. Command Line and Git

Lab 08. Command Line and Git Lab 08 Command Line and Git Agenda Final Project Information All Things Git! Make sure to come to lab next week for Python! Final Projects Connect 4 Arduino ios Creative AI Being on a Team - How To Maximize

More information

Using SourceTree on the Development Server

Using SourceTree on the Development Server Using SourceTree on the Development Server This content has been modified to exclude client information. Such omissions include the client name and details of the client s infrastructure, such as domain

More information

ECE 471 Embedded Systems Lecture 4

ECE 471 Embedded Systems Lecture 4 ECE 471 Embedded Systems Lecture 4 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 10 September 2015 Any questions on HW#1? Announcements HW#2 will be posted today 1 Homework #2

More information

RVDS 4.0 Introductory Tutorial

RVDS 4.0 Introductory Tutorial RVDS 4.0 Introductory Tutorial 402v02 RVDS 4.0 Introductory Tutorial 1 Introduction Aim This tutorial provides you with a basic introduction to the tools provided with the RealView Development Suite version

More information

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering GIT A free and open source distributed version control system User Guide January, 2018 Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Table of Contents What is

More information

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

Installing CEA on an Intel Mac

Installing CEA on an Intel Mac Installing CEA on an Intel Mac Jonah Zimmerman April 20, 2012 1 Introduction Chemical Equilibrium with Applications (CEA) is a computer program published by NASA Glenn with the purpose of calculating chemical

More information