Ex:
- Ubuntu 16.04, 20.04.
- Fedora
- Debian
-
Fedora
/Ubuntu
/Red Hat Enterprise
/CentOS
- The CSIE server:
Ubuntu
- My laptop:
Ubuntu 16.04
- The CSIE server:
-
With GNU tool-chain
gcc
(the C compiler)gdb
(the GNU debugger)
- Academic research
- Lots of open-source free software
- Innovative software appears on
UNIX
first - Network computing research (cluster/grid)
- Embedded system and SoC (system-on-chip)
- Most of embedded software are Linux-based
- MOST IMPORTANT: - Make me more familiar on playing computer!
UNIX
architecture- File System Operations
- Terminal I/O
- Concurrent Programming
- process/thread, signals, semaphores, IPC, etc.
- Network Computing
- Socket, RPC
-
Setup my Linux environment
- Use the embedded system LAB (dual-boot w/ Fedora)
- Use my own computer
- Most of Linux distribution (e.g.
Fedora 9+
) supports dual-boot - I can still have my M$-Windows with Linux
- Most of Linux distribution (e.g.
-
Test the following software works
- Shells:
bash
,tcsh
, etc - Programming tools:
gcc
,gdb
,make
- My favorite X-window:
KDE
/Gnome
- My favorite GUI debugger (
ddd
,kdbg
, etc.) - My favorite text editor (
kwrite
,emacs
,vi
, etc.)
- Shells:
- man
man command
to look for how to use certain command- Example:
man gcc
- Example:
- info
- Example:
info gcc
for detailed manual of gcc compiler
- Example:
-
Write the first program:
-
Write the Makefile to build the executable program in sub-folder
hw_01
.- Three functions spread across multiple files: main, calculate, mult.
- There is no source code for function mult, only the compiled object code in
lib_mult.a
. - The correct execution result is X=610.
-
The executable program I build should:
- Correctly execute, and
- Be able to run in a debugger
-
-
Define my own fstream class.
- Build a standard
C++
class using system calls. - Write a class named
myfstream
.- Similar functionality to the standard
C++
class fstream. - Contains at least these methods:
- Open
- Close
- Read
- Write
- Operator <<
- Operator >>
- Similar functionality to the standard
- Requirements to my program(Learn how
C/C++
standard libraries are built):- Build the library and deliver to other users.
- Separate
.h
file. - Build the library file
libmyfstream.a
.
- Separate
- Test my program by other users.
- Deliver only
.h
and.a
files. C++
source code on methods implementation should not be delivered to the test users.
- Deliver only
- I am not allowed to use any
C/C++
standard library functions/classes.- Only
UNIX
system calls are allowed.
- Only
- Build the library and deliver to other users.
- Build a standard
-
Recursive into a directory tree and visit each file.
-
On-line messenger.
-
Database management program with auto recovery.
- A database management program with auto recovery.
- Back-end Process:
- Always alive even the front-end is closed.
- Store data in a linked list.
- Auto-Recovery:
- Automatic save data to disk:
Ctrl+c
- Automatic save data to disk:
-
Matrix mulplication in parallel.
- There are three projects that I could choose.
-
Parallel sorting over 1M floating-point numbers
- Sort 1M floating point numbers in non-descending order.
- Execute on a 4-core PC.
- Scored by the execution time, the smaller is better.
-
File syncing to the cloud
- Major Function: sync all files in a dedicated directory to a remote server.
- Like
dropbox
- Not contributing much system workload
- Like
- Expected Result:
- Automatic backup files (in a flat directory) to another directory.
- Extra Function:
- Automatic upload to a remote server.
- Automatic sync the whole directory tree.
- Major Function: sync all files in a dedicated directory to a remote server.
-
Login shell
- A shell program capable of execution a single command each time.
- Basic functionality:
cd
,mkdir
, set environment variables.- Automatic path search.
- Single machine.
- Login shell through network.
- Basic functionality:
- Bonus:
- Redirect outcome to files.
- Piped job execution.
- Execute background job.
- A shell program capable of execution a single command each time.
-
- I chose the first selection one as my final project: Matrix mulplication in parallel.