CSCI/CMPE 4334 Operating Systems

Spring 2013


Instructor: Xiang Lian

Office: ENGR 3.275



Course: CSCI 4334 Operating Systems

Prerequisites: CSCI 3333 and CSCI 3334.

Time: TR, 2:35pm ~ 3:50pm

Location: ENGR 1.272

Course Webpage:


Instructor's office hour: Tuesday and Thursday (4:00pm ~ 6:00pm); or by appointment


Teaching Assistant: Dave Salinas

Office: ENGR 2.240


Phone: TBD

Office Hours: Monday (2:00pm ~ 3:00pm), Wednesday (12:00pm ~ 1:00pm); or by appointment




Operating Systems - A Modern Perspective, 3rd Edition, by Gary Nutt


Catalog Description

The purpose of this course is to teach the design of operating systems. We will cover major topics such as process management, memory management, file systems, and distributed operating systems.

Learning Outcomes

At the end of this course, the student should be able to:

1.      Explain the organization of the classical von Neumann machine and its major functional units.

2.      Explain how an instruction is executed in a classical von Neumann machine.

3.      Explain different instruction formats, such as addresses per instruction and variable length vs. fixed length formats.

4.      Describe the principles of memory management.

5.      Explain how interrupts are used to implement I/O control and data transfers.

6.      Explain the objectives and functions of modern operating systems.

7.      Describe how operating systems have evolved over time from primitive batch systems to sophisticated multiuser systems.

8.      Analyze the tradeoffs inherent in operating system design.

9.      Describe the functions of a contemporary operating system with respect to convenience, efficiency, and the ability to evolve.

10.  Discuss networked, client-server, distributed operating systems and how they differ from single user operating systems.

11.  Identify potential threats to operating systems and the security features design to guard against them.

12.  Describe how issues such as open source software and the increased use of the Internet are influencing operating system design.

13.  Defend the need for APIs and middleware.

14.  Describe how computing resources are used by application software and managed by system software.

15.  Contrast kernel and user mode in an operating system.

16.  Discuss the advantages and disadvantages of using interrupt processing.

17.  Compare and contrast the various ways of structuring an operating system such as object-oriented, modular, micro-kernel, and layered.

18.  Explain the use of a device list and driver I/O queue.

19.  Describe the need for concurrency within the framework of an operating system.

20.  Demonstrate the potential run-time problems arising from the concurrent operation of many separate tasks.

21.  Summarize the range of mechanisms that can be employed at the operating system level to realize concurrent systems and describe the benefits of each.

22.  Explain the different states that a task may pass through and the data structures needed to support the management of many tasks.

23.  Summarize the various approaches to solving the problem of mutual exclusion in an operating system.

24.  Describe reasons for using interrupts, dispatching, and context switching to support concurrency in an operating system.

25.  Create state and transition diagrams for simple problem domains.

26.  Discuss the utility of data structures, such as stacks and queues, in managing concurrency.

27.  Explain conditions that lead to deadlock.

28.  Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems, such as priority, performance comparison, and fair-share schemes.

29.  Describe relationships between scheduling algorithms and application domains.

30.  Discuss the types of processor scheduling such as short-term, medium-term, long-term, and I/O.

31.  Describe the difference between processes and threads.

32.  Compare and contrast static and dynamic approaches to real-time scheduling.

33.  Discuss the need for preemption and deadline scheduling.

34.  Explain memory hierarchy and cost-performance tradeoffs.

35.  Explain the concept of virtual memory and how it is realized in hardware and software.

36.  Summarize the principles of virtual memory as applied to caching, paging, and segmentation.

37.  Evaluate the tradeoffs in terms of memory size (main memory, cache memory, auxiliary memory) and processor speed.

38.  Defend the different ways of allocating memory to tasks, citing the relative merits of each.

39.  Describe the reason for and use of cache memory.

40.  Compare and contrast paging and segmentation techniques.

41.  Discuss the concept of thrashing, both in terms of the reasons it occurs and the techniques used to recognize and manage the problem.

42.  Analyze the various memory portioning techniques including overlays, swapping, and placement and replacement policies.



Tentative Schedule




Week 1 (Jan. 15)

Introduction and overview of operating systems


Week 1 (Jan. 17)


Exercise (1)

Week 2 (Jan. 22)

Using the operating system


Week 2 (Jan. 24)



Week 3 (Jan. 29)

Operating system organization

Review: Computer organization


Homework 1 (Due at 23:59pm, Feb. 26)

Week 3 (Jan. 31)

Devices and their management


Week 4 (Feb. 5)



Week 4 (Feb. 7)

Process management

Exercise (2)

Week 5 (Feb. 12)



Week 5 (Feb. 14)


Exercise (3) (3 bonus points for Valentine's Day ; please submit to Blackboard; hard deadline: due on Feb. 28)

Week 6 (Feb. 19)

Process scheduling

Exercise (4)

Week 6 (Feb. 21)


Review for Mid-term Exam 1


Week 7 (Feb. 26)



Week 7 (Feb. 28)

Basic synchronization

Exercise (5)



Week 8 (Mar. 5)


Project 1 (15 points; Due at 23:59pm, Mar. 28)

Week 8 (Mar. 7)



Week 9 (Mar. 12)


March 10-15, spring break; No classes

Week 9 (Mar. 14)


Week 10 (Mar. 19)



Week 10 (Mar. 21)

High-level synchronization

Exercise (6)

Week 11 (Mar. 26)


Homework 2 (Due at 23:59pm, Apr. 23)

Exercise (7)

Week 11 (Mar. 28)


Exercise (8)

Week 12 (Apr. 2)



Week 12 (Apr. 4)



Week 13 (Apr. 9)

Memory management



Project 2 (Bonus project; 10 extra points in the final score; Due at 23:59pm, hard deadline: Apr. 30)


Exercise (9)

Week 13 (Apr. 11)

Virtual memory


Week 14 (Apr. 16)



Week 14 (Apr. 18)


Review for Mid-term Exam 2


Week 15 (Apr. 23)



April 24; Last day to drop courses or withdraw through the Office of the Registrar


Week 15 (Apr. 25)


Exercise (10)


File management


Protection & security


Student Survey (Please bring No. 2 pencil with you!)


Week 16 (Apr. 30)

Review, Q/A

Review for Final Exam


Week 16 (May 2)


Study day; No classes or exams

Week 17 (May 4-10)

Final Exam (1:15-3 p.m., May 7, Tuesday)



1 Academic calendar:

NOTE: Exam dates are tentative, exact dates will be announced in class!!!

Drops and drop passes must be handled by you and the admission office; I will sign the necessary documents. But, I will not place a drop or drop pass on the final grade sheet.




UNIX Tutorial for Beginners:




Scoring and Grading

5% - Attendance

25% - 2 major exams

35% - Homework

15% - Programming projects

20% - Final exam


            A = 90 or higher

            B = 80 - 89

            C = 70 - 79

            D = 60 - 69

            F = <60



GUIDELINES FOR Homework/Projects


All projects will be submitted electronically only. Instructions are given separately.


ALL HOMEWORK/PROJECTS ARE DUE AT THE BEGINNING OF THE CLASS PERIOD (5 minutes grace period).  All assignments turned in after the class begins will be considered late (even if you come to class late).


Late Penalty:  5 minutes late to the end of the day -  10% penalty.

                        Next class period                                20% penalty

                        Two class periods                                30% penalty

                        One week+1 day                                 50% penalty

                        Will not accept after one week and one day.


Program Identification Section.


All programs should begin with a comment section that would include the following:


STUDENT NAME:_________________________________________________

STUDENT ID:___________________________________________________________

CLASS:________________________ ASSIGNMENT #:_________________________

DATE DUE:__________________ DATE TURNED IN:_________________________



There will be a number of programming projects relating to the Linux kernel. All projects will use the C programming language. If you have C++ before, you will have no difficulty understanding the source code given. You will not be able to program using classes though.


Project Grading

For each of the projects, I will look for the following items:

·         Clarity: Programs should be well written and well documented.

·         Organization: Programs should be written in well defined modules and interface (parameters) should be well defined.

·         Format: Programs should be clear and very readable.

·         Correctness: Programs should generate correct results.

·         Robustness: Programs should handle unexpected input properly.

·         Simplicity: While achieving the above goals, the simpler the program is, the better.


Electronic Submission of Projects

For every programming project you do, you should create a separate directory. Keep all related files in that directory. When finishing the project, you need to write a readme file, including your full name, project number, and the full name of the directory where your program files reside on the computers in the lab. The source code and all associated files should be sent as a tar attachment (see below). After reading and testing your program, I'll send you an email with my comments and grade. For convenience, please include your email address in every submission. The Linux systems in our lab do not receive email. You need to give me your preferred email account that I can reply to.


For each of the projects, you should submit the following.


·         A README file briefly describing your solution to the problem. The file should be in plain text so I can read it without Word or StarOffice software.

·         A TESTCASE file listing the test cases you have used and the results generated, and explain what they mean.

·         All source code and user-created header files.

·         A makefile that governs the compilation of the project.

·         The full path to where your programs are located. If needed, I can go into your directory to test out the programs.


Each file should contain your name, the class section, the assignment number, the date and instructor's name. When you are ready to submit, create a tar (tape archive) file for the directory and mail the file to Dave Salinas ( Make sure put your full name, student ID, and the course number (CSCI 4334) on the subject line.


Here is an example. Suppose I have files hw1.h, hw1.c, functions.c, README, and TESTCASE in a directory called hw-one which is under my home directory. Do the following to mail the project to the instructor.


% cd                                                      ; takes me to the home directory

% tar -cvf hw-one.tar hw-one               ; creates the archive


(do the appropriate magic to send the file hw-one.tar to me)


After you invoke the mailer, make sure to put your full name, student ID, and course number on the subject

line. For example :


Your Name - Your ID - project one - CSCI 4334


If you forget to do this, I probably will not read the email immediately, or may even delete it as spam! When I receive your email, I will acknowledge the fact by replying to your message. If you don't receive the acknowledgment within a day (or 3 if on a weekend), you are responsible for contacting me and clarifying the situation.


Lecture Attendance Policy

Attendance in the lecture is mandatory. Students are responsible for all materials covered in class, the textbook, tutorials, and homework assignments. Students are expected to attend lectures, study the text, and contribute to discussions. You need to write your name on attendance sheets throughout the course, so please attend every lecture.

Make-up Exam Policy

No make-up exams will be given except for university sanctioned excused absences. If you miss an exam (for a good reason), it is your responsibility to contact me before the exam, or soon after the exam as possible.

Academic Dishonesty Policy

The University expects a student to maintain a high standard of individual honor in his/her scholastic work. Unless otherwise required, each student is expected to complete his or her assignment individually and independently. Although study together is encouraged, the work handed in for grading by each student is expected to be his or her own. Any form of academic dishonesty will be strictly forbidden and will be punished to the maximum extent. Copying an assignment from another student in this class or obtaining a solution from some other source will lead to an automatic failure for this course and to a disciplinary action. Allowing another student to copy one's work will be treated as an act of academic dishonesty, leading to the same penalty as copying.

Note to Students with Disabilities

Students with disabilities are encouraged to contact the Disability Services office for a confidential discussion of their individual needs for academic accommodation. It is the policy of the University of Texas-Pan American to provide flexible and individualized accommodation to students with documented disabilities that may affect their ability to fully participate in course activities or to meet course requirements. To receive accommodation services, students must be registered with the Disability Services office (DS), University Center #108, 665-7005 or


The instructor reserves the right to alter this syllabus as necessary.