BSc in Computer Science / Бакалавр в Області Комп'ютерних Наук

Course Details

Course Information Package

Course Unit TitleSYSTEMS PROGRAMMING
Course Unit CodeACSC372
Course Unit DetailsBSc Computer Engineering (Required Courses) - BSc Computer Science (Required Courses) -
Number of ECTS credits allocated6
Learning Outcomes of the course unitBy the end of the course, the students should be able to:
  1. Recall operating system concepts, and review the UNIX operating system and environment by explaining the structure and organisation.
  2. Implement shell configuration and programming, and making use of UNIX shell commands.
  3. Examine process creation, communication and management by inspecting the use of system calls, signals and interrupts.
  4. Recognize and implement low level File Input/Output.
  5. Design programs for inter-process communications, and develop client-server models with the aid of socket programming.
Mode of DeliveryFace-to-face
PrerequisitesACSC183,ACSC271Co-requisitesNONE
Recommended optional program componentsNONE
Course Contents

UNIX System Overview: UNIX operating system overview. Access to the Resources of a Computer. Basic Elements of the Kernel. System calls. Shell / Shell programming. UNIX history. UNIX for PC.

UNIX commands: Elementary and advanced UNIX shell commands. Directories structure, Files and directories manipulation, Files examination, Input/Output streams, Files redirection, Pipes, Access permissions, Regular expressions, Process control.

Bash Environment: Introduction to bash shell. Shells evolution. Environment and variables. Shell initialization files. Shell variables. Default global variables. User shell variables. Creating, deleting and exporting variables. Built-in shell commands. Executing shell scripts. Read user input data. Command line arguments. Special characters and quotes. Printing in the shell.

Bash Programming: Exit status code. Conditional statement if. Relational operators. File testing. Command line parameters. Logical operators. Arithmetic expressions. The case statement. The while loop and the until loop. Commands break and continue. The for loop. Shell functions. Parameters in functions. Scope of function variables. Initialization and processing of arrays. Advanced Shell Programming: Debugging bash scripts, Catching signals, Pipes and devices, Implementation of pipes with files, Implementation of pipes with two variables, The File descriptor table, Standard in/out/err, Devices, Input/Output redirection.

File I/O: Error handling in C. Introduction to files and file system. File types in UNIX. How files are stored (Partitions, i-Nodes, Blocks). Example of finding a file using the i-nodes. File processing operations. Standard I/O vs. System Calls (Low-level I/O). System calls advantages and disadvantages. System calls for I/O.

Process Environment & Control: Process Identifiers. Memory layout of a process. Creation of processes (When it is needed, What is not inherited). Environment Variables. Orphan process vs. Zombie process. Processes and files. Waiting of processes. How to avoid zombie processes.

Processes and Signals: exec() Functions. System call system(). Signals Handling. Signals and Processes. Asynchronous avoidance of Zombie processes using Signals. System call alarm(). Inter-process signals. System call kill().

Inter-Process Communication: Processes and Files. System calls dup() & dup2(). Inter-Process Communication (IPC) – Introduction. IPC with Pipes. System call pipe(). IPC with Named Pipes (FIFO). FIFOs in the shell. FIFOs in C. Pipes vs. FIFO.

Socket Programming: Socket definition. Ports. Port numbers assignment. Socket domain families. Socket types. Client/Server TCP connection. Basic server functions. Basic client functions. Byte-order transformations. Socket descriptors. Socket creation. Socket address formats, Associating addresses with sockets. Listening to incoming connection requests. Accepting incoming connection requests. Connection establishment. Data transfer. Closing the connection. IP address conversions. More miscellaneous functions. Client/Server Example.

Laboratory Work: Familiarise students with the development of system-level software in the C programming language, while providing an understanding of the UNIX operating system. Perform various important tasks using UNIX commands and formulate shell scripts using structured shell programming. 

Recommended and/or required reading:
Textbooks
  • Richard Stevens, Stephen A. Rago, Advanced Programming in the UNIX Environment, Addison-Wesley, 2nd Ed., 2005
References
  • Kay A. Robins, Steven Robins, UNIX SYSTEMS Programming: Communication, Concurrency, and Threads, Prentice Hall, 2nd Ed., 2003
  • Notes on Unix commands & system utilities, Bash shell programming, and Socket Programming – all available on the Course’s Web Site
Planned learning activities and teaching methods

Students are taught the course through lectures by means of computer presentations. Laboratory work and homework consist of practical problems aiming to help students familiarising with the development of system-level software in the C programming language, while providing an understanding of the UNIX operating system. Further students perform various important tasks using UNIX commands and formulate shell scripts using structured shell programming.

Lecture/Laboratory notes and presentations are available through the web for students to use in combination with the textbooks.
Assessment methods and criteria
Lab Assignments25%
Tests15%
Final Exam60%
Language of instructionEnglish
Work placement(s)NO

 Друк  E-mail