Operating Systems Concepts & Design
makey makeygit toolsMake sure to return to the AWS Learner Lab page (link in Pilot if you forgot to bookmark it) and hit “Start Lab” to turn on your sandbox / AWS instance.
Use ssh to connect to your AWS Ubuntu instance.
Go to the folder that contains your repository (likely named ceg2350-yourgithubusername).
Create a new directory, Lab10.
Create a file named README.md in the Lab10 folder. The Lab 10 Template can be copied from this link:
https://raw.githubusercontent.com/pattonsgirl/CEG2350/refs/heads/main/docs/Labs/Lab10/LabTemplate.mdYou may refer to additional resources outside of the recommended resources provided.
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.
If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.
Useful git commands: branch, switch, commit, push, merge
main branch in your Lab10 folderIssues tab. Create an Issue for each part of this lab - you may do this all at once or as you start each part.main branch as your complete each part. You may then mark your issue as complete.One merge must be completed via a Pull Request - all others should be done via branch merging on the command line.
Let’s practice!
git guide - Part 0.git guide below. Make commits on the branch.push your changes to your branch - GitHub won’t know what branch you are talking about - read the output, it will help you do the next step to push your branch to GitHub!branch!)merge your change from your branch to main.Fill out the git guide table so you have a resource of useful commands you can refer to throughout the lab! The Notes column should have any “notes to self” you want to leave behind - easy oopsies to make, double check something, etc.
| Task | Command(s) / Steps | Notes |
|---|---|---|
| Create a branch | ||
| Change to branch | ||
| Add branch to remote if created locally (GitHub) | ||
Steps to merge changes to another branch (main) |
||
Steps to resolve a merge conflict |
Resources
Reminder - create an Issue for this part -> create a branch to work on this issue -> make your commits to this branch -> verify your changes (no broken markdown, good spelling) -> merge to main
Fill out the following charts regarding the three most commonly used languages - C/C++, Java, and Python. The bonus is you’ll make a guide for yourself on how to install these or how to check if they are already available. I’m going to give you the answers for C / C++ - you’ll need to complete the chart for Java and Python.
Installing the compiler for different OSes
| Language | Compiler | Linux (Ubuntu/Debian) | macOS | Windows | |
|---|---|---|---|---|---|
| C / C++ | GCC / G++ | sudo apt install build-essential |
xcode-select --install |
Install MinGW via MSYS2 → pacman -S mingw-w64-x86_64-gcc |
|
| Java | OpenJDK | ||||
| Python | Python |
Verifying install location & verison
| Language | OS | Confirm Installation Command | Check Version Command | Expected Output Example |
|---|---|---|---|---|
| C (GCC) | Linux | which gcc |
gcc --version |
gcc (Ubuntu 13.2.0) 13.2.0 |
| macOS | which gcc |
gcc --version |
Apple clang version 15.0.0 (clang-1500.0.40.1) |
|
| Windows (MSYS2/MinGW) | where gcc |
gcc --version |
gcc.exe (Rev10, Built by MSYS2 project) 13.2.0 |
|
| C++ (G++) | Linux | which g++ |
g++ --version |
g++ (Ubuntu 13.2.0) 13.2.0 |
| macOS | which clang++ |
clang++ --version |
Apple clang version 15.0.0 |
|
| Windows | where g++ |
g++ --version |
g++.exe (Rev10, Built by MSYS2 project) 13.2.0 |
|
| Java (JDK) | Linux | |||
| macOS | ||||
| Windows | ||||
| Python 3 | Linux | |||
| macOS | ||||
| Windows |
Reminder - create an Issue for this part -> create a branch to work on this issue -> make your commits to this branch -> verify your changes (no broken markdown, good spelling) -> merge to main
Useful Commands: gcc, g++, wget
Lab10 folder in your repository folder. add, commit and push the source code files..c or .cpp files - to your repository. Do not add the compiled executable for tracking.Resources:
Reminder - create an Issue for this part -> create a branch to work on this issue -> make your commits to this branch -> verify your changes (no broken markdown, good spelling) -> merge to main
In the root folder of your GitHub repository, create a .gitignore file and prevent tracking of your executable programs.
If you already added your executable for tracking, remove it from future tracking with git rm --cached <file_name>, then commit & push the change.
git rm would delete it from your working directory (“filesystem”) and from tracking. The --cached flag remove it only from tracking.Resources:
Reminder - create an Issue for this part -> create a branch to work on this issue -> make your commits to this branch -> verify your changes (no broken markdown, good spelling) -> merge to main
Using the source code you downloaded and the program you compiled in Part 2:
.c or .cpp files, add a comment block that includes the following:
Example of best practice formatting - do this for each function in your .c or .cpp files:
/*
* Function: approx_pi
* --------------------
* computes an approximation of pi using:
* pi/6 = 1/2 + (1/2 x 3/4) 1/5 (1/2)^3 + (1/2 x 3/4 x 5/6) 1/7 (1/2)^5 +
*
* n: number of terms in the series to sum
*
* returns: the approximate value of pi obtained by suming the first n terms
* in the above series
* returns zero on error (if n is non-positive)
*/
double approx_pi(int n) {
...
}
makey makeyReminder - create an Issue for this part -> create a branch to work on this issue -> make your commits to this branch -> verify your changes (no broken markdown, good spelling) -> merge to main
Useful commands: make
Write a Makefile for the source code file you downloaded in Part 2.
Make a commit after creating (and testing the operation of) each target
At minimum, craft the following targets:
build
run
clean
Test the targets in your Makefile.
Create a set of instructions for using your Makefile to perform its different taskings.
Resources:
Makefile example
make to call targetsmake command in Linux - Redswitchesmake command - IOFlood
git toolsReminder - create an Issue for this part -> create a branch to work on this issue -> make your commits to this branch -> verify your changes (no broken markdown, good spelling) -> merge to main
Choose one of the below CLI git tools:
manual is here
git workflow improvement tools - TA / instructor approval is required, and the tool must be more than a visualizer (there are a lot of git log visualizers out there - this ec is for something to assist with git usage)Install it to your CLI / enable it in a tool, than add instructions to your Lab Template and show proof of what it can do!
The TAs will be checking your repository for Issues (open & closed), branches (open and closed), and commit history.
Verify that your GitHub repo has a Lab10 folder with at minimum:
README.mdMakefile.gitignore file in the root directory of your repositoryIn the Pilot Dropbox, paste the URL to the Lab10 folder in your GitHub repo
Your files should be cleanly presented in your GitHub repository. Citations should be included as needed. Include which generative AI system was used and what prompts were used if generative AI was used.