CSE 451 Section Autumn 2004 Alex Moshchuk Office hours: Tue 2-3, Thu 4:30-5:30 Allen 216 (or lab)

Slides:



Advertisements
Similar presentations
1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Fall 2011 Section 4 Richard Chang.
Advertisements

CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
CSE 451: Operating Systems Section 2 Shells and System Calls.
1 CSE 451 Section Autumn 2004 Alex Moshchuk Office hours: Tue 1-2, Thu 4:30-5:30 Allen 218 (or lab)
CSE 451 Section Autumn 2005 Richard Dunn Office hours: WTh 3:30-4:20 Allen 216 (or lab)
CS-502 Fall 2006Project 1, Fork1 Programming Project 1 – Fork.
Project 1CS-3013 A-term Programming Project #1 Forking Processes Due Tuesday, September 8, 11:59 PM.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
IntroductionCS-3013 C-term Programming Project #1 Forking Processes Due Thursday, January 24, 6:00 PM.
CMPE 151: Network Administration Spring Class Description Focus: system and network administration. Sequence of exercises. E.g., installing/configuring.
Programming project #1 1 CS502 Spring 2006 Programming Project #1 CS-502 Operating Systems Spring 2006.
CSE 451: Operating Systems Section 2 Interrupts, Syscalls, Virtual Machines, and Project 1.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
A crash course in njit’s Afs
UNIX Processes. The UNIX Process A process is an instance of a program in execution. Created by another parent process as its child. One process can be.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
Welcome to CSE  Name: Di Cao   Classroom: DL357  Class Time: T 8:30am - 9:18am  Office.
Project 1, Command Shell CS-502 (EMC) Fall Programming Project #1 Command Shell CS-502, Operating Systems EMC, Fall 2009 (Slides include materials.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Natawut NupairojAssembly Language1 Unix Survival Guide.
CS 390 Unix Programming Environment Summer Suchindra Rengan - CS3902 Course Details Instructors Suchindra Rengan – ‘sachin’ ( Section 001)
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
1 Week 2 The Crunchy Shell to the Soft and Chewy Kernel… Sarah Diesburg 8/3/2010 COP4610 / CGS5765.
CSE 451 – Operating Systems Section, Winter 2003 Scapegoats: Evan Welbourne Albert J. Wong
CSE 451 – Operating Systems Section, Autumn 2003 TAs: Mike Swift Adrienne Noble
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
1 Operating Systems Lecture 2 UNIX and Shell Scripts.
1 CSE 451 Section 2: Interrupts, Syscalls, Virtual Machines, and Project 1.
More on UART Interrupts; System Calls Reference on Interrupt Identification Register(IIR) slide 17 of
Aug Introduction CMSC 104 section 301 Problem Solving and Computer Programming Fall 05.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps.
CSE 451: Operating Systems Section 3: Project 0 recap, Project 1.
CSI3131 – Lab 1 Observing Process Behaviour. Running Linux under Virtual PC  Start Virtual PC  This Windows program provides a virtual machine to run.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Process Management Azzam Mourad COEN 346.
Homework Assignment #1 J. H. Wang Oct. 11, 2013.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
Project 2: User Programs Abdelmounaam Rezgui Acknowledgment: The content of some slides is partly taken from Josh Wiseman’s presentation.
Hands-On Virtual Computing
CSE451 Section 2: Spring 2006 Kurtis Heimerl, YongChul Kwon
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
OS Labs 2/25/08 Frans Kaashoek MIT
1 CSE 451 Section 2: Processes, the shell, and system calls.
CMSC 104, Version 1/021 Introduction CMSC 104 Problem Solving and Computer Programming Summer 2004 Section 6080 Ms. Dawn Block.
Chapter 16 Advanced Bourne Shell Programming. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To discuss numeric data processing.
CSE 451 Section #3 Project 0 Recap Project 1 Overview
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
YongChul Kwon CSE451 Section 1: Spring 2006 YongChul Kwon
CS1010: Intro Workshop.
CSE 451 Section 2: Processes, the shell, and system calls
CSE 451 Section 4 Project 1 Notes Looking ahead: Project 2.
Creating Programs on UNIX
System Structure and Process Model
System Structure and Process Model
CSE451 Fall 2008 Section 1 Roxana Geambasu
Programming Project #1 Command Shell
CSE 451 Section 2 – Winter 2006.
Tutorial: The Programming Interface
Programming Project #1 Fork and Command Shell
Class Projects and Environment
CSE 451 Section 2 - Spring 2005.
CSE 303 Concepts and Tools for Software Development
January 8, 2004 Adrienne Noble
Presentation transcript:

CSE 451 Section Autumn 2004 Alex Moshchuk Office hours: Tue 2-3, Thu 4:30-5:30 Allen 216 (or lab)

Reminders Sign up for mailing list Read the web site Work through lab information Start reading the book Do the first homework – due this Monday! Read & start project 1

451 Projects 3 or 4 projects First one – individual, others – groups of 3 Need basic C and UNIX skills Check links if you need help with this Challenging Don’t leave until last minute Learn a lot of cool stuff

First Project Introduces C and Unix skills you’ll need Teaches how to build and run Linux in VMWare Two main parts: Write a simple shell Add a simple system call to Linux kernel Due: Thursday, Oct 7 1:00 pm for turnin Bring writeup to section

The shell Print out prompt Accept input Parse input Create new process Launch specified program there Wait for it to finish Repeat CSE451Shell% /bin/date Fri Jan 16 00:05:39 PST 2004 CSE451Shell% pwd /root CSE451Shell% cd / CSE451Shell% pwd / CSE451Shell% exit

System Calls What’s a system call? Examples? In your shell: Use fork to create a child process Use execve to execute a specified program Use wait to wait until child process terminates

Adding a System Call Add execcounts system call: Count number of times you call fork, vfork, clone, and exec system calls. Steps: Modify kernel to keep track of this information Add execcounts to return this to the user Write an application to use it (your shell)

Example of execcounts CSE451Shell% execcounts clear CSE451Shell% cd / CSE451Shell% pwd / CSE451Shell% date Wed Sep 29 16:52:41 PDT 2004 CSE451Shell% time Usage: time [-apvV] [-f format] [-o file] [--append] [-- verbose] [--portability] [--format=format] [--output=file] [-- version] [--help] command [arg...] CSE451Shell% execcounts Statistics: Fork: 3 27% Clone: 0 0% VFork: 0 0% Execve: 8 72% CSE451Shell% exit

Programming in kernel mode Can’t use application libraries (e.g. libc) E.g. can’t use printf Use only functions defined by the kernel E.g. use printk instead Include files are different in the kernel Don’t forget you’re in kernel space E.g. unsafe to access a pointer from user space directly, use fn’s that perform checks Good way to learn – look at existing code

Computing Resources Develop your code on dedicated 451 Linux hosts: spinlock, coredump Test your code on VMWare PCs in 006 Do not use attu

VMWare Software simulation of x86 architecture Run an OS in a sandbox Easily reset to known good state

Using VMWare All disks are nonpersistent Powering off loses your changes! Use “shutdown –r now” instead Network adapter is host-only Power on/off, reset VMWare config Don’t change!

VMWare basics There is only one user: root The password is rootpassword You will need to: Build a kernel image on spinlock/coredump Transfer it to Linux running inside VMWare Boot Linux in VMWare using your new kernel Use ftp to get your files into VMWare FTP to from the host running VMWare. E.g. using IE, go to

UNIX & C help Unix & C tutorial links on 451 projects page What if my shell crashes? Use gdb to debug gdb tutorials linked on web site What do I use to compile my shell? gcc What do I use to type up my code? I recommend Emacs How do I find stuff in the kernel source? Use grep –r search_string * Use LXR (Linux Cross Reference):