Computer Systems Organization

CSCI-UA.0201(003), Fall 2022

Lab assignments

Lab 1 C programming (part-1)
Due: 9/24
Lab 2 C programming (part-2)
Due: 10/15 11pm EST
Lab 3 Binary lab
Due: 10/29 11pm EST
Lab 4 Malloc
Due: 11/27 11pm EST
Lab 5 Basic Logic Design
Due: 12/16 11pm EST

All labs' git classroom invitation links can be found on Campuswire

Collaboration and Integrity Policy

Please read this carefully. We will run plagiarism detection software on all submitted code.

Acknowledgements:

Lab 5 and 6 are due to Berkeley's CS61c.

Lab Setup Instructions

You will be doing labs on the Courant's compute servers

You should have received an email from CIMS Systems Support w.r.t. your account.

You may visit this link to view the status of your account and to rest your password if needed.

Log into Courant's servers from your laptop
Set up Git repository
FAQs on gits

Log into CIMS servers from your laptop

Windows laptop:

You should use the Chrome secure shell extension to log into Courant servers.

Make sure you have Google Chrome browser installed.

Download and install Chrome secure shell extension

Launch Chrome, then open the extension by clicking the extension icon, followed by clicking "Connection Dialog".

You should do the labs on Courant's Compute Server called snappy1.cims.nyu.edu. To log in snappy1, you must go through a gateway host called access.cims.nyu.edu first by filling in the following information after opening the secure shell extension. Note: Substitute your-cims-username with your Courant computer account username.

After you have logged into access.cims.nyu.edu. Type in the following command to log into snappy1.cims.nyu.edu

access$ ssh snappy1

Mac Laptop:

You can use the native Mac terminal to log into Courant servers.

Launch a Mac terminal

Log into the Courant gateway host by typing the command $ ssh access.cims.nyu.edu

Continue on logging into snappy1 by typing

access$ ssh snappy1

Using commandline
Once you've logged into snappy1, you'll need to use UNIX commands to navigate the file systems, launch programs, editors and so forth. Getting familiar with the UNIX commandline is an indispencible skill for any CS student. You can learn more about command line here. You may also find this one-page cheatcheet handy.

Setting up Git Repository

For each student in the class, we have created for him/her a corresponding private lab repository on Github.com. You will submit labs by pushing to your private repo on github.com (as many times as you want) and then submitting them via Gradescope.

Below are the steps for setting up your the lab environment on snappy1. If you are not familiar with the git version control system, follow the resources here to get started.

Preparation: set up ssh-based logins to github. This is needed as github no longer accepts password-based commandlines.

Cloning your lab repo on snappy1

  • Create a github private repository by clicking on each lab's invitation link (posted in Campuswire). Select your NYU NetID to link your github account and create your lab repository on Github.
  • On snappy1, we recommend you create a directory to hold all your cloned lab repositories.
      snappy1$ mkdir cso-labs
      
  • On snapy1, clone your repo by typing the following (the following example is for the first lab).
    snappy1$ cd cso-labs
    snappy1$ git clone git@github.com:nyu-cso-fa22/clab-part1-<YourGithubUsername>.git clab-part1
        

    You will see that a directory named lab1 has been created under the cso-labs directory. This is the git repo for your lab assignment 1. Other labs can be created similarly by cloning respective repositories.

  • Using a command line editor to modify files for your lab assignments.

    We recommend using nano. For example, if you want to change file array.c, type the following:

    	snappy1$ cd cso-labs/clab-part1
    	snappy1$ nano array.c
    

    Saving changes to Github while you are working on Labs

    As you modify the skeleton files to complete the labs, you should frequently save your work to protect against laptop failures and other unforeseen troubles. You save the changes by first "committing" them to your local lab repo and then "pushing" those changes to the repo stored on github.com

    $ git commit -am "saving my changes"
    $ git push origin master
    
    Note that whenever you add a new file, you need to manually tell git to ``track it''. Otherwise, the file will not be committed by git commit. Make git track a new file by typing:
    $ git add <my-new-file>
    

    After you've pushed your changes by typing git push origin master, they are safely stored on github.com. Even if your laptop catches on fire in the future, those pushed changes can still be retrieved. However, you must remember that doing git commit by itself does not save your changes on github.com (it only saves your changes locally). So, don't forget to type git push origin master.

    To see if your local repo is up-to-date with your origin repo on github.com and vice versa, type git status

    FAQs on Git repository

    Handin Procedure

    You must do both of the following steps: