week seven agenda
DESCRIPTION
Week Seven Agenda. Link of the week Review week six lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines Questions and answers. Link of the week. http://www.kernel.org/ http://www.kernelnewbies.org/ Define: kernel - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/1.jpg)
![Page 2: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/2.jpg)
Week Seven Agenda
•Link of the week•Review week six lab assignment•This week’s expected outcomes•Next lab assignment•Break-out problems•Upcoming deadlines•Questions and answers
![Page 3: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/3.jpg)
Link of the week
http://www.kernel.org/http://www.kernelnewbies.org/Define: kernelLegacy terms: nucleus or coreDefine: Kernel spaceDefine: User spaceDefine: monolithic kernelDefine: microkernel
![Page 4: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/4.jpg)
Link of the week
• Configure Unix Kernel Parameters
http://vista.intersystems.com/csp/docbook/DocBook.UI.Page.cls?KEY=GCI_unixparms#GCI_unixparms_notes_hpux
Swap space
Number of global/routine buffers
Number of users
Number of inodes
Maximum database size
Number of semaphores
![Page 5: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/5.jpg)
Review week six lab assignment• makefile rule has the following format:
target : prerequisites (dependencies)commands_1commands_2
• Target is typically the name of the file to be generated. A target may also be an action to be performed.
• Prerequisites are files that this target depends on.
• command_n are the SHELL commands necessary to produce the target (one command per line). Each line MUST be prefixed with a TAB. Any other spacing will cause your script not to execute.
![Page 6: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/6.jpg)
Review week six lab assignment
prog : a.o b.o c.o g++ a.o b.o c.o -ly –o proga.o : prog.h a.c g++ –c prog.h a.cb.o : prog.h b.c g++ –c prog.h b.cc.o : c.c
g++ –c c.cc.c : c.y
yacc c.ymv y.tab.c c.c
![Page 7: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/7.jpg)
Review week six lab assignment
• What is a dependency between source files?main.cpp employee.cpp address.cppSome source files depend on other source files.
• What are the two parts of a dependency rule? 1) What files a file is dependent on
2) Rule that tells how to recompile the file
• What part of the dependency line is considered the target?
• What is considered the action line?
• We use the –c option on g++ to compile the source files to create object files.
• We use the –o option to create the executable program from the object files.
![Page 8: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/8.jpg)
Review week six lab assignment
Linker combines a number of object and archive files, relocates their data and ties up symbol references. Usually the last step in compiling a program is to run linker. Link object files into an executable whose name is “myProgram”
g++ -o myProgram a.o b.o c.o.cpp is C++ source code file formatCompile source code main.cppg++ -c main.cpp
![Page 9: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/9.jpg)
Review week six lab assignment• Installing the software package
Package managerAnt is extended using Java classes and written in
XML.Manual
makefileconfigure
• Source(s) code compiler Object Module(s) linker Load Module loader
• What are the differences between a makefile and a shell script?
• The rules in the makefile are executed based upon dependency, and not sequential order. The “make” utility performs a recursive decent through the target tree building the lowest level targets first.
• A target is rebuilt if any of its prerequisites have a newer timestamp than itself.
![Page 10: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/10.jpg)
Review week six lab assignments
prog
a.o b.o c.o
a.c prog.h b.c c.c
c.y
![Page 11: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/11.jpg)
Review week six lab assignments
myProgram
main.o employee.o address.o
employee.cppemployee.h main.cpp address.haddress.cpp
![Page 12: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/12.jpg)
Review week six lab assignment1. touch everything - everything should buildg++ -c main.cppg++ -c employee.cppg++ -c address.cppg++ -o myProgram main.o employee.o address.o
2. touch nothing - nothing should buildmake: `myProgram' is up to date.
3. touch address.h - main and employee should buildg++ -c employee.cppg++ -o myProgram main.o employee.o address.o
4. touch main.cpp - only main.o should buildg++ -c main.cppg++ -o myProgram main.o employee.o address.o
5. touch employee.cpp - only employee.o should buildg++ -c employee.cppg++ -o myProgram main.o employee.o address.o
6. touch address.cpp - only address.o should buildg++ -c address.cppg++ -o myProgram main.o employee.o address.oRemoving myProgram and all object files (.o)
![Page 13: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/13.jpg)
Week seven expected outcomes
Upon successful completion of this module, the student will be able to:
• Create make file scripts for software programs.
• Use pattern rules in make files. • Create an effective PowerPoint
presentation. • Create make files with multiple targets. • Install software packages on a server.
![Page 14: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/14.jpg)
Next lab assignment
• Links can be viewed as entries in a directory that reference other files.
• In Unix we can create two types of links:
Physical (hard) links
Symbolic (soft) links
![Page 15: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/15.jpg)
Next lab assignment• A Physical Link references the exact same file
(inode) as the file entry itself.
• An inode is a unique number assigned to a file by the file system.
• A file name in the directory can be viewed as a physical link and is no different than any other physical link. A directory is a list of physical links.
ln test_file_1 test_file_hard_linkls –li (long listing with inodes)ls –i
![Page 16: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/16.jpg)
Next lab assignment
• A Symbolic Link references a “pointer file” which has its own inode
• The pointer file points to the directory entry that references the target file (inode)
• The inode for the symbolic link and the target are different.
![Page 17: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/17.jpg)
Next lab assignment
• Every file is associated with one inode• The inode contains the following information:
file modecount of hard linksowner idgroup idtime of last file accesstime of last file modificationfile sizefile addresses
![Page 18: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/18.jpg)
Next lab assignment
![Page 19: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/19.jpg)
Next lab assignment
• The directory maps file names to inodes.
• Each file has one inode.
• The number of inodes is a kernel parameter value.
• Each file may have more than one directory entry.
• Inodes contain a list of disk block addresses.
![Page 20: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/20.jpg)
Next lab assignment
![Page 21: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/21.jpg)
Next lab assignment
• When there are multiple hard links, more directory entries point to the same inode (same file name)
• An inode can only hold a fixed number of direct data block addresses (10 for Linux). Large files use indirect block addresses.
• The inode keeps a count of the number of hard links that point to it.
• Deleting a file deletes and entry from a directory.
• If the number of hard links is 1, removing or deleting that file will also delete the inode.
![Page 22: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/22.jpg)
Next lab assignment
![Page 23: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/23.jpg)
Next lab assignment
Inode 300 isn’t concerned about symbolic link 555
The symbolic link isn’t updated even if “your file” is deleted.
ln –s test_file_1 test_file_symbolic_link
![Page 24: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/24.jpg)
Next lab assignmentDefine: tar
tar –cf newpack.tar /export/home/dandreartar –xvf origpack.tartar –tvf origpack.tar
Define: gzipgzip filename.targzip –d filename.tar.gzgunzip filename.tar.gz
Define: bzip2 / bunzip2bzip2 filename.tarbunzip2 –d filename.tar.bz2
![Page 25: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/25.jpg)
Break-out problems• awk• Algorithm• Semaphore• Tunable Unix parameters• Block (chunk of data)• Call by value• Call by reference• Interpreter• Pointer (Perl)• Shared memory
![Page 26: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/26.jpg)
Upcoming deadlines
• Review Lab Assignment 14-1 presentations.
• makefile Exercise, 7-2 is due 6/15/08.
• Programming Assignment 1, 6-1 is due 6/22/08.
• Installation Exercise, 8-1 is due 6/29/08.
• Startup/Shutdown Exercise, 10-1 is due 7/6/08.
![Page 27: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/27.jpg)
Questions and answers
• Questions
• Comments
• Concerns
• I am available after this Franklin Live session to discuss any problems and/or concerns regarding the lab assignments
![Page 28: Week Seven Agenda](https://reader035.vdocuments.us/reader035/viewer/2022062519/5681525f550346895dc091ea/html5/thumbnails/28.jpg)