1 Reminders Start project 2! It’s long Read the assignment carefully Read it again Project 2 will be done in groups of 3 E-mail groups to me Part 1 due.

Slides:



Advertisements
Similar presentations
Version Control System (Sub)Version Control (SVN).
Advertisements

Utilizing the GDB debugger to analyze programs Background and application.
CSE 451: Operating Systems Section 6 Project 2b; Midterm Review.
CSE 451: Operating Systems
1 CSE451 Section 3. 2 Reminders Start project 2! It’s long Read the assignment carefully Read it again Project 2 will be done in groups of 3 Today: Form.
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
Concurrent Versioning System Chapter 8 (ALBING’s).
CSE451 Section 3: Winter 2k7 Welcome to the world of concurrency! Kurtis Aaron Kimball
1 Reminders Start project 2! It’s long Read the assignment carefully Read it again Make sure your groups are correct Today: Project 2 intro CVS.
Source Code Version Management and Configuration Control Art Amezcua Status 11/5/2007.
Adapted from Prof. Necula CS 169, Berkeley1 Version Control V Software Engineering Lecture 12, Spring 2008 Clark Barrett, New York University.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Carnegie Mellon 1 Debugging and Version control / : Introduction to Computer Systems 12 th Recitation, Nov. 14, 2011 Slides by: Lin Xiao(lxiao)
Introduction to CVS Portions adapted from A Visual Guide to Version ControlA Visual Guide to Version Control.
SubVersioN – the new Central Service at DESY by Marian Gawron.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
Introduction to Threads CS240 Programming in C. Introduction to Threads A thread is a path execution By default, a C/C++ program has one thread called.
Today’s Topics Introducing process: the basic mechanism for concurrent programming –Process management related system calls Process creation Process termination.
…using Git/Tortoise Git
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Chris Onions Getting started with CVS in ATLAS 11 Getting started with CVS in ATLAS Chris Onions (Tutorial based on that of Raúl Ramos Pollán CERN / IT.
Chapter 1 Process and Thread. 1.2 process The address space of a program – Text – Code – Stack – Heap A set of registers – PC – SP Other resources – Files.
CS 590 Programming Environments with UNIX. Computer Lab Account Course Homepage
An Intro to Concurrent Versions System (CVS) ECE 417/617: Elements of Software Engineering Stan Birchfield Clemson University.
Subversion (SVN) A Revision Control System Successor to CVS Carlos Armas Hervey Allen.
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
CSE 219 Computer Science III CVS
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
Week 3 January 22, 2004 Adrienne Noble. Today CVS – a great tool to use with your groups Threads – basic thread operations Intro to synchronization Hand.
CVS: Concurrent Version System Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third.
GIT.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control System
CSE 451: Operating Systems Section 4 Scheduling, Project 2 Intro, Threads.
Presentation OLOMOLA,Afolabi( ). Update Changes in CSV/SVN.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
NachOS Threads System Road Map through the Code Lab 3.
Recitation 2: Abhijit Warkhedi2/25/20161 Today’s Agenda u CVS u GDB.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 16 – Version control and git.
CS241 Systems Programming Discussion Section Week 2 Original slides by: Stephen Kloder.
CSE 451: Operating Systems Section 6 Project 2b. Midterm  Scores will be on Catalyst and midterms were handed back on Friday(?) in class  Talk to Ed,
Using Subversion for Source Code Control Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative.
1 Subversion Kate Hedstrom April Version Control Software System for managing source files –For groups of people working on the same code –When.
CSE 451: Operating Systems Section 4 Project 2 Intro; Threads.
Problem Solving With C++ SVN ( Version Control ) April 2016.
Subversion (svn) Basics Department of Computer Science Kent State University Prof. Jonathan I. Maletic.
M.Sc. Juan Carlos Olivares Rojas
Process Tables; Threads
CVS – concurrent versions system
CVS – concurrent versions system
CSE 451 Section 4 Project 1 Notes Looking ahead: Project 2.
Source Control Dr. Scott Schaefer.
An Intro to Concurrent Versions System (CVS)
Threading and Project 2 (Some slides taken from Sec. 3 Winter 2006)
CSE 303 Concepts and Tools for Software Development
Lab 1 introduction, debrief
Reminders Form groups of 3 by tomorrow Start project 2! Today:
Process Tables; Threads
CSE451 – Section 6.
CVS Concurrent Versioning System
Version control with Git Part II
CSE 451 Autumn 2003 Section 3 October 16.
Git CS Fall 2018.
Welcome to the world of concurrency!
Presentation transcript:

1 Reminders Start project 2! It’s long Read the assignment carefully Read it again Project 2 will be done in groups of 3 groups to me Part 1 due in 2 weeks (10/27) Part 2 due in 3.5 weeks (11/7)

2 Project 2 You have to: Implement a user thread library Implement synchronization primitives Solve a synchronization problem Add Preemption Implement a multithreaded web server Get some results and write a (small) report Part 1 Part 2

3 Simplethreads We give you: Skeleton functions for thread interface Machine-specific code Support for creating new stacks Support for saving regs/switching stacks A generic queue When do you need one? Very simple test programs You should write more Singlethreaded web server

4 Structure include/sthread.h Other appsWeb server (web/sioux.c) test/*.c lib/sthread_user.h lib/sthread_user.c lib/sthread_ctx.c lib/sthread_ctx.h You write this sthread_switch_i386.h sthread_switch_powerpc.h lib/sthread_switch.S lib/sthread_queue.c lib/sthread_queue.h lib/sthread_preempt.c lib/sthread_preempt.h

5 Thread operations void sthread_init() Initialize the whole system sthread_t sthread_create (func start_func, void *arg) Create a new thread and make it runnable void sthread_yield() Give up the CPU void sthread_exit(void *ret) Exit current thread What about the TCB? struct _thread { sthread_ctx_t *saved_ctx;..... } Others?

6 Sample threaded program int main(int argc, char **argv) { int i; sthread_init(); if (sthread_create(thread_start, (void*)i) == NULL) { printf("sthread_create failed\n"); exit(1); } sthread_yield(); //yield main thread to our new thread printf("back in main\n"); return 0; } void *thread_start(void *arg) { printf("In thread_start, arg = %d\n", (int)arg); return 0; }

7 Managing contexts Thread context = thread stack + stack pointer sthread_new_ctx(func_to_run) gives a new thread context that can be switched to sthread_free_ctx(some_old_ctx) Deletes the supplied context sthread_switch(oldctx, newctx) Puts current context into oldctx Takes newctx and makes it current

8 Things to think about Who will call sthread_switch? Where does sthread_switch return? How do we delete a thread? Can a thread free its stack itself? Starting up a thread sthread_new_ctx() takes a function foo sthread_new_ctx doesn’t pass parameters to foo But in sthread_create, you give a function and an arg! Bottom line: how do you pass arguments to a function with no arguments?

9 Programming in groups How to work on same files? One way: Keep every version of code, all with different names: Project2good Project2_10_13_04 Project2working Send s back and forth with new changes Merge different versions by hand

10 CVS The CVS way: One version, saved in the CVS repository Multiple people can work on the same file concurrently CVS merges the edited versions automatically as you put them back in the repository Maintains all old versions of files, so you can go back

11 Setting up CVS Set up CVS root environment var Tells CVS where to find your repository setenv CVSROOT /cse451/groupleader/cvs (bash) export CVSROOT=/cse451/groupleader/cvs Initialize a repository (only one person per group) Create a dir in your group’s dir to hold repository (master copy of code) cd /cse451/groupleader mkdir cvs Initialize repository cvs init You now have an empty repository

12 Setting up CVS (2) Add/Import the simplethreads distribution to your repository tar xvfz simplethreads-1.20.tar.gz cd simplethreads-1.20 cvs import –m “initial code” simplethreads SIMPLETHREADS SIMPLETHREADS_1_20 cd.. rm –fr simplethreads-1.20

13 CVS commands Check out a project (sandbox, or local copy) to your home directory to work on: CVS creates a dir simplethreads/ and puts copy of all source files in repository into that dir Also adds CVS dir where it stores data about what you check out cd cvs checkout simplethreads cd simplethreads Do this once Merge in new changes from repository (update): cvs update [files…]

14 CVS commands (2) Save your edited files into the repository so others can use them: cvs commit –m “fixed annoying bugs” [files…] Add a new file (source files.c or.h) to the repository cvs add [files…] Check status of a file cvs status file.c Check differences between your file and one in the repository: cvs diff file.c cvs diff –r 1.1 file.c (specifies version) View log of changes for a file cvs log file.c More info or man cvs

15 CVS Miscellany Use emacs for cvs commit log editing (default is vi): setenv VISUAL emacs Access CVS from another machine besides forkbomb?: setenv CVSROOT forkbomb.cs.washington.edu:/cse451/groupleader/ cvs setenv CVS_RSH ssh (for CVS to know how to access repository – use ssh)