Lecture 24CS311 – Operating Systems 1 1 CS311 – Lecture 24 Outline Final Exam Study Guide Note: These lecture notes are not intended replace your notes.

Slides:



Advertisements
Similar presentations
1 CS345 Operating Systems Φροντιστήριο Άσκησης 1.
Advertisements

Introduction to UNIX CSE 2031 Fall May 2015.
1 Introduction to UNIX 2 Ke Liu
CS 497C – Introduction to UNIX Lecture 22: - The Shell Chin-Chih Chang
1 Processes Professor Jennifer Rexford
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
Now, return to the Unix Unix shells: Subshells--- Variable---1. Local 2. Environmental.
Linux+ Guide to Linux Certification, Second Edition
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
The Unix Shell. Operating System shell The shell is a command interpreter It forms the interface between a user and the operating system When you log.
T UTORIAL OF U NIX C OMMAND & SHELL SCRIPT S 5027 Professor: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015.
Lecture 02CS311 – Operating Systems 1 1 CS311 – Lecture 02 Outline UNIX/Linux features – Redirection – pipes – Terminating a command – Running program.
Introduction to Linux and Shell Scripting Jacob Chan.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
LIN 6932 Unix Lecture 6 Hana Filip. LIN 6932 HW6 - Part II solutions posted on my website see syllabus.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 8 Shell.
The UNIX Shell. The Shell Program that constantly runs at terminal after a user has logged in. Prompts the user and waits for user input. Interprets command.
Linux+ Guide to Linux Certification, Second Edition
Introduction to Unix – CS 21 Lecture 9. Lecture Overview Shell description Shell choices History Aliases Topic review.
Chapter 4 UNIX Common Shells Commands By C. Shing ITEC Dept Radford University.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Introduction to Bash Programming Ellen Zhang. Previous three classes What have we learnt so far ?
1 Week 2 The Crunchy Shell to the Soft and Chewy Kernel… Sarah Diesburg 8/3/2010 COP4610 / CGS5765.
1 Operating Systems Lecture 2 UNIX and Shell Scripts.
Lesson 2 1.Commands 2.Filename Substitution 3.I/O Redirection 4.Command Grouping 5.Shell Responisibilites Review of the Basics.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands cal – will print a calendar.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
Final Exam Review May 3 rd, 2004 Class Meeting 15.
UNIX An Introduction. Brief History UNIX UNIX Created at Bell Labs, 1969 Created at Bell Labs, 1969 BSD during mid 70s BSD during mid 70s AT&T began offering.
40 Years and Still Rocking the Terminal!
LIN Unix Lecture 5 Unix Shell Scripts. LIN Command Coordination ; && || command1 ; command2 Interpretation: Do command 1. Then do command.
CS252: Systems Programming Ninghui Li Slides by Prof. Gustavo Rodriguez-Rivera Topic 7: Unix Tools and Shell Scripts.
Basic of UNIX For fresh members of SPARCS
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CS241 Systems Programming Discussion Section Week 2 Original slides by: Stephen Kloder.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
UNIX Review CS 2204 Class meeting 15. (C) S. S. Gifford, Virginia Tech, Study Hints You should have: Read all required material Finished all labs.
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Lecture 18CS311 – Operating Systems 1 1 CS311 – Lecture 18 Outline Midterm 2 Review Note: These lecture notes are not intended replace your notes. This.
Tutorial of Unix Command & shell scriptS 5027
Chapter 11 Command-Line Master Class
UNIX Review CS 2204 Class meeting 15.
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Part 1: Basic Commands/Utilities
Some Linux Commands.
Tutorial of Unix Command & shell scriptS 5027
Basic UNIX OLC Training.
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
CS 60 Discussion Review.
Tutorial of Unix Command & shell scriptS 5027
UNIX Reference Sheets CSE 2031 Fall 2010.
Tutorial Unix Command & Makefile CIS 5027
Linux Shell Script Programming
CSE 303 Concepts and Tools for Software Development
Shell Control Structures
Chapter 3 The UNIX Shells
Introduction to Bash Programming, part 3
Introduction to UNIX EECS July 2019.
Review.
LPI Linux Certification
Presentation transcript:

Lecture 24CS311 – Operating Systems 1 1 CS311 – Lecture 24 Outline Final Exam Study Guide Note: These lecture notes are not intended replace your notes. This is what I expect your notes to already look like, but with more explanation as needed. 1

Lecture 24CS311 – Operating Systems 1 2 Shell Commands and Utilities shell commands – know all the basic ones with common options. ls, cd, chmod, mkdir, rm, rmdir, cat, echo, ps, sleep, sort, wc, man, mv, cp, pwd, kill, chgrp, chown, newgrp, touch, gcc input and output redirection (, >>) command line pipes like ls | wc built in variables like $#, $1, $2, $USER, $PATH, … 2

Lecture 24CS311 – Operating Systems 1 3 Shell Commands and Utilities background processes -- sort $file1 & variable substitution -- Example: echo "$x was entered by the user" command substitution -- Example: listOFiles=`ls` wildcards -- Example: ls *.java What are the 3 steps the shell goes through to find the command? Use of double quotes vs. single quotes vs. back ticks 3

Lecture 24CS311 – Operating Systems 1 4 Bash Script Can you write a simple bash script on the exam? – What is the proper shebang line if you want the bash shell to interpret the script? – Can you write an if statement correctly? – Can you use the test command to see if 2 variables are equal or if a file exists? – Can you write a for loop correctly? 4

Lecture 24CS311 – Operating Systems 1 5 Powerful Unix Utilities awk – You might be asked to interpret a simple awk program. – awk variables: NR, NF, $0, $1 sed – Can you use sed to delete certain lines? – Can you use sed to substitute occurrences of a regular expression with a string? grep - can you use grep to find a specific pattern 5

Lecture 24CS311 – Operating Systems 1 6 Regular Expressions You should know the extended regular expressions –., *, +, ?, ^, $, [...], [^...], \, ( ) – Can you say whether or not a line will match a given regular expression? – Can you say exactly what will match? – Given a description of what to match, can you write a regular expression that works 6

Lecture 24CS311 – Operating Systems 1 7 Features of modern operating systems multiprogramming vs. time-sharing Explain why multiprogramming and timesharing are important for modern operating systems. Reproduce the diagram of the organization of Unix. Describe the memory organization of a typical process in a common operating system. What is a context switch? – Ans: It is when a process is switched out of the microprocessor and another is switched in. It is costly in terms of cycles because so much information must be saved so that when the old process is resumed, everything is as it was. 7

Lecture 24CS311 – Operating Systems 1 8 Process Management What does a child process inherit from its parent? – I'm looking for things such as: variables, open file descriptors, signal handling. What is different between parent and child? – They have different pid numbers, different parents, different physical memory, different CPU usage statistics What is a zombie? What is an orphan? 8

Lecture 24CS311 – Operating Systems 1 9 makefiles I could ask you to look at a makefile and predict what will print to the screen after certain commands from the command line. I could ask you to write a simple makefile. 9

Lecture 24CS311 – Operating Systems 1 10 System Calls You will be reading / writing code with any of the following system calls: – open – close – lseek – read – write – dup2 – fork--know what fork returns to the parent and to the child (and what if it fails) – wait or waitpid (What do these functions return?) – exec family of calls - know how to write execlp or execvp for the exam – pipe 10

Lecture 24CS311 – Operating Systems 1 11 File System If I give you a sequence of commands (fork, dup2, open, close), can you draw the diagrams of the processes' file descriptor tables, the system file table, and the in-memory i-node table? What information is contained in an i-node? What is NOT in an i-node? How are an i-node's direct, single indirect, double indirect, and triple indirect pointers used to access a file's data blocks? Name some types of files. 11

Lecture 24CS311 – Operating Systems 1 12 File System - Hard links and Soft links What is the difference between hard links and soft links? What happens if a user types (draw a picture of directory, inodes, data blocks) ln oldFile newFile What happens if a user types (draw a picture of directory, inodes, data blocks) ln -s oldFile newSoftLinkFile 12

Lecture 24CS311 – Operating Systems 1 13 Signals Can you follow code that – creates signal handlers with sigaction? – sends signals with kill? – contains fork()? You will be asked to predict the outcome of typing Ctrl-C at specific times. What is the difference between ignoring a signal and blocking a signal? Can you kill one of my processes? Can you kill one of your own? What is the default action for SIGINT? 13

Lecture 24CS311 – Operating Systems 1 14 Version Control Why use version control? Can you set up an SVN repository, check in a file, and check it out for editing? 14