Free Teaching Material on Operating Systems and Systems Integration
Purpose of this site
I wrote these notes to teach the subject Operating Systems and Systems Integration in the Department of Information and Communications Technology at the Hong Kong Institute of Vocational Education (Tsing Yi), up to September 2004.
This site has no connection to HKIVE or to the Department of ICT, since I do not work there any more.
I am happy to make this teaching material available under the GPL license; please contact me if you would like me to add the license to specific files that interest you.
Assignment Shell Programming 2004
- Online Submission From Outside College, Online Submission inside College Due 8pm, Sunday, 16 May 2004, Our CA certificate to load into your browser
- The Assignment is here.
- You may submit as many times as you like. No submission will be overwritten by a later one.
- The trapall script for Q6 of the assignment.
- There are a few other example shell scripts on our web site.
- Here is a directory containing my solutions; Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q7 Q9 Q10 Q11 Q12
All 12 answers joined together
Please tell me by email if I made any errors. (I haven't tested any of them :-)
Assignment Shell Programming from 2003
- The Assignment , Here are some possible solutions.
- Here are the scripts in the solutions (so you can try them out): booted, dirsize, root-logged-in, finduidgid, finduidgidcheck.
On Line tests
- On Line tests at CSAlinux
- The main purposes of these on-line tests are:
- To motivate you to work well in the laboratory sessions
- To form a useful part of your laboratory assessment
- To give you instant feedback: you will know the answer straight away, immediately after you answer a question
- I am modelling the format of the program (but not the content of the questions!) on that used by the Linux Professional Institute. At the end of your course, I expect that all of you will be ready to do well in the first two examinations from the LPI after all the practice in this subject.
- The user name and password are the same as you use for your ICT laboratory account, i.e., it comes from the ICT LDAP server.
- After it is in production, access will be restricted to students during the laboratory class hour test times.
Information about this unit
- Teaching Plan: PDF Open Office format Excel format
- Syllabus (PDF)
- Discussion about the syllabus (PDF)
- CSA Year 2 Combined CA Assessment Schedule
Lectures
These are all PDF documents, made using LaTeX and the prosper class. You need a PDF reader such as xpdf, gv, ggv or the proprietary Adobe acrobat reader (note: use 4.x; version 5.x is too buggy to use with Linux) to read them.- Introduction: pdf, 1 slide/page, pdf, 4 slides/page, LaTeX source
- Free Software and Open Standards (pdf, 1 slide/page), handouts for printing, pdf, 4 slides/page, pdf, 8 slides/page, LaTeX source
- What is an operating system? The kernel and booting: pdf, 1 slide/page, pdf, 4 slides/page, pdf, 8 slides/page, LaTeX source
- Bootloader pdf, 1 slide/page, pdf, 4 slides/page, LaTeX source
- Workshop notes, LaTeX source, which Modules we covered Friday, 14 May 2004.
- An introduction to Shell Programming: pdf, 1 slide/page pdf, 4 slides/page pdf, 8 slides/page pdf, handout, LaTeX source Here are some example shell scripts.
- Processes: What are they? How does the operating system manage them? pdf, 1 slide/page pdf, handouts for printing pdf, 4 slides/page pdf, 8 slides/page A simple CPU Flash animation, source, a Non-stop Flash animation, source
- A study guide: 1 slide/page, handout for printing 6 May 2004
- Supplementary reference
Lecture Material from previous years
- The following lecture notes on Processes and threads are
identical to the notes above for 2004, but also include additional
material related to C programming that we did not cover in
2004 lectures
pdf, 1 slide/page with C pdf, handouts for printing, with C pdf, 4 slides/page, with C pdf, 8 slides/page, with C, LaTeX source - Deadlock pdf, 1 slide/page, pdf, 4 slides/page, LaTeX source.
- Memory Management: an introduction pdf, 1 slide/page, pdf, 4 slides/page, LaTeX source
- Systems Integration pdf, 1 slide/page, 4 slides/page, LaTeX source
- Samba pdf, 1 slide/page, pdf, 4 slides/page, LaTeX source
- Input/Output pdf, 1 slide/page, pdf, 4 slides/page, LaTeX source
- Subject Summary (1 slide/page), (4/page): a study guide, 19 July 2003
Quick Quizes in Lectures
Each lecture starts with a short, 5 question multiple-choice test. Three questions review the previous lecture, two are preparation for the current lecture.- First quiz
- Second quiz
- Third quiz
- Fourth quiz
- Fifth quiz
- Sixth quiz
- Seventh quiz
- Eighth quiz
- Nineth quiz
- Tenth quiz
- Eleventh quiz
Workshops
These are all PDF documents, made using PDFLaTeX. You need a PDF reader such as xpdf, gv, ggv or the proprietary Adobe acrobat reader (note: use 4.x; version 5.x is too buggy to use with Linux) to read them.- Workshop notes -- 505 pages. Includes solutions. The LaTeX source is here
- Note for
those who did not attend all the classes: We covered the following
chapters from the workshop notes in class:
- Module 1, Overview
- Module 2, Basic Shell
- Module 3, Basic Tools
- Module 4, More Tools
- Module 5, Basic Filesystem
- Module 6, Finding Documentation
- Module 13, SSH -- The Secure Shell
- Partitioning the hard disk;
- Installing Red Hat Linux version 9
- About root, system administration, su and most importantly of all, about sudo.
- Applying OS updates Applying updates to Linux. This includes many updates :-), including a guide to the RPM Package Manager, cron and yum.
- About Symbolic Links
- A tutorial about file permissions, Solutions
- Questions about Shell Programming, simple example shell script: param, Browsable solutions: Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12; tarball of Solutions, zip file of Solutions for tar challenged students: Saturday, 14 May 2004.
- Exercises with Regular Expressions and sed, Solutions Wednesday, 19 May 2004.
- The (artificially generated) student registration data.
- External Resources:
- The Bash Beginners Guide;
- The free Bash-Scripting Guide, which is an online book, available in other formats.
- I have provided a number of shell script examples here.
- The manual page for the test program is here.
- A Tutorial about Process Control Blocks (PCBs); solutions.
Not taught in the workshop, but still relevant
- A short exercise to understand set user ID permission on a program file
- An intro to Shell programming. Some of the scripts mentioned in the lab sheet: grepforshellcmd, and testquote.
Workshops from last year
- Configuring useradd for creating local (non-LDAP) accounts
- Using grub to Boot Other Operating Systems
- A workshop about processes and writing a simple shell
- A workshop about processes and threads in Windows and the source code: print.c, win-call-print.c, win-hello.c, win-hello-lots.c
- A workshop about POSIX threads and deadlock and the source code: hello.c, deadlock.c, errors.h, hello-with-logs.c, and for the adventurous, we have backoff.c from Programming with POSIX Threads, Buttenhof. Solutions Monday, 2 June 2003.
- Memory Management Tutorial, solutions Saturday, 31 May 2003.
- Installing and testing Samba as a PDC
- Workshop on Inter Process Communciation, pipe.c, signal.sh, signal.c and solutions!
Helpful Web Sites
- Beej's Guide to IPC is a very helpful guide to Inter Process Communication.
Past exams
Note that this year we covered different material from previous years. Changes this year include:- No C programming this year
- Less emphasis on I/O, deadlock.
- A more practical approach to memory management
- Much more shell programming, use of POSIX tools
- Be guided by the study guide above.
- Make sure you are familiar with the supplementary material.
Previous Exam Papers
- Exam from 2000/2001, answers
- Exam from 2001/2002, answers Wednesday, 28 May 2003.
- Supplementary Exam from 2001/2002, answers Wednesday, 28 May 2003.
- Exam from 2002/2003, answers Monday, 9 June 2003.
- Supplementary Exam from 2002/2003, answers
Guides and HOWTOs (mostly by Nick)
- Using grub to Boot Other Operating Systems
- Accessing NTFS from Linux
- Setting up the latest Mozilla with the Java Run Time Environment, Flash 6 and the Acrobat Plugin
- Burning Red Hat CDs with our CD Writer in A204e You still don't have a set of three Red Hat 8.0 CDs? Here are detailed instructions on how to use our CD writer in A204e to burn any of the six Red Hat CDROMs. This also shows how to use the very useful rsync Internet protocol.
- When installing at home, you can usually boot off the CDROM. If you do need a boot disk, there are three kinds: the network installation disk, CDROM and hard disk installation disk, the pcmcia installation disk. The Red Hat Installation Guide has a section on making boot disks.
- Repartitioning your hard disk without deleting Windows. I want all of you to install Linux on your machines at home. This is a quick guide on how to repartition your hard disk without losing Windows. An older document about using fips is here.
- Applying OS updates Applying updates to Linux. This includes many updates :-), including a guide to the RPM Package Manager, cron and yum.
- The automounter lab.
- Booting, init and runlevels In this you rename your main shared library, then recover from the disaster that this would normally be.
Material from previous years
The syllabus has changed since last year, but this material may be helpful to you, as long as you do not get sidetracked into studying material that we did not study this academic year (2002/2003).Assignments
- Assignment 1 about redirection. Due at next laboratory session.
- Diagnostic Tool This homework is due during your lab session in Week 25. You need to demonstrate your work in the lab.
Test on Thursday, December 11, 2003
- Place and Time: during normal lecture period, i.e., on Thursday, 9.30am, in D116
- Topics Covered:
-
- Free Software and Open Standards (pdf, 1 slide/page), pdf, 4 slides/page
- What is an operating system? The kernel and booting: pdf, 1 slide/page, pdf, 4 slides/page, pdf, 8 slides/page,
- The Following Modules from the Workshop notes
- Module 1, Overview
- Module 6, Finding Documentation
- Module 2, Basic Shell
- Module 3, Basic Tools
- Greater weight on more recent work
- Will provide a handout during test with syntax of commands
- The Test questions, and the Test solutions.
Test on Friday, 26 April, 2002
- There will be a written test in the lecture theatre on Friday,
26 April, 2002.
The topics include:
- Shell Programming (See the notes on shell programming). The Shell reference is here.
- The Secure Shell (See the Workshop Notes)
- Types of operating systems (See the slides on the kernel)
- The boot sequence (See the slides on the kernel)
Summary of the subject from last year
Workshop Notes from previous years
- The Rescue Disk, Trouble Shooting and other Related Topics. Also provides an overview of shell programming. You will also find the report program. You will also need the libc5 libraries, as described in the lab sheet.
- Password protecting a directory in Apache.
- How to set up printing from Linux in A306. Very important for the tomsrtbt assignment.
- Setting up WebDAV
Using Mailing Lists (or even asking me questions!)
How To Ask Questions The Smart Way (Eric Raymond)Copyright 2006 Nick Urbanik: all material on this site is available under the terms of the The GNU General Public License. Where is the source? All directories below this one are browsable; all source documents and xfig diagrams are there.
Nick Urbanik <nicku@nicku.org>