EN0572 Operating systems and concurrency
This module introduces the application and implementation of operating
systems and the use of concurrency in systems programming. It presents
fundamental concepts: processes, communication and synchronisation,
and illustrates their implementation using a simple, modern
OS. Students are given the opportunity to apply an OS in their own
programs to solve a variety of problems. Additional topics such as
memory management, file systems and security are required in the
implementation of a full-scale OS and are investigated in this module.
Lectures are the main vehicle for introducing fundamental concepts and
principles and for providing context and motivation. Students will be
expected to prepare for lecture topics and deepen their understanding
of course material by studying course texts and technical
literature. Seminars and laboratory sessions support the lecture
programme by providing students with opportunities to identify and
apply appropriate techniques for the application and implementation of
a variety of OS services.
Formative assessment will be provided in the form of small weekly
exercises, mainly practical in nature and involving
programming. Summative assessment is by way of a single piece of
coursework comprising a programming assignment and a short report.
News
Assignment Specification Published 4th November 2011
The assignment specification is now available. The due date for submission of the final report is 12th January 2012 @ 15.00. You will be required to attend an assessed lab demonstration during the week commencing 12th December 2011 (details to be announced). Please address any queries about the specification to David Kendall.
Module Team
- Module tutor
- David Kendall
- Lecturer
- Michael Brockway
- Lecturer
- Alun Moon
Teaching Arrangements
Lecture (Block A) Tue 16.00 - 17.00 EB A102B
Lecture (Block B) Tue 17.00 - 18.00 NB 149
Lab/Seminar Mon 16.00 - 18.00 PB S2
Lab/Seminar Wed 11.00 - 13.00 PB S2
Lab/Seminar Thu 16.00 - 18.00 PB S2
Lab/Seminar Fri 11.00 - 13.00 PB S2
You should attend both lecture sessions and one of the lab/seminar sessions every week. Refer to your personal timetable to identify the lab session that you should attend.
Synopsis
The aim of the module is to introduce operating system concepts and the principles of concurrency, and to develop a practical understanding of their implementation and application in modern computing systems. Assessment is by course work.
On completion of this module, it is expected that students will be able to:
- Describe the architecture of an operating system (OS) and its services, and evaluate its use in a variety of scenarios.
- Discuss the process model and the scheduling, IPC and synchronisation services provided by an OS and reason informally about the behaviour of a multitasking system under a variety of scheduling algorithms.
- Review the principal concepts and methods of memory management and file system implementation.
- Identify a variety of security threats and examine appropriate OS mechanisms to protect against them.
- Design, implement and evaluate solutions to problems of I/O device handling, synchronisation, communication and timing for multitasking systems, using appropriate OS services and concurrent programming techniques.
Teaching Plan
The following is a provisional guide to the organisation of this part of the module for this year. These arrangements are subject to change during the course of the module.
| Week | W/c | Lecture A | Lecture B | Practical |
|---|---|---|---|---|
| 1 | 26-Sep | Introduction and overview. [Slides] | Introduction/review of development tools/environment. Device drivers. [Slides] | No lab sessions this week |
| 2 | 03-Oct | C programming for OS [Slides] | Interrupts and Interrupt Service Routines (ISR). Context switch. [Slides] | Output device driver: LED [Lab] |
| 3 | 10-Oct | Process concept [Slides] | LPC2378: Interrupts, Vectored Interrupt Controller (VIC), ISR implementation, Timers [Slides] | Input device driver: Buttons and joystick [Lab] |
| 4 | 17-Oct | Process scheduling [Slides] | Introduction to uC/OS-II: tasks, delays, memory layout [Slides] | Installing an ISR and configuring a timer [Lab] |
| 5 | 24-Oct | Memory management 1 [Slides] | Shared variable IPC; interference; race conditions; mutual exclusion [Slides] | uC/OS-II task creation and delay. [Lab] |
| 6 | 31-Oct | Memory management 2 [Slides] | Semaphores [Slides] | uC/OS-II task priorities, mutual exclusion - busy waiting [Lab] |
| 7 | 07-Nov | Storage management 1 [Slides] | Classical problems of synchronisation: producer/consumer, readers/writers [Slides] | Introduction to the assignment, mutual exclusion - semaphores [Lab] |
| 8 | 14-Nov | Storage management 2 [Slides] | Deadlock, Starvation [Slides] | Bounded buffer [Lab] |
| 9 | 21-Nov | Protection and security 1 [Slides] | Priority inversion, mutexes. [Slides] | Deadlock and starvation [Lab] |
| 10 | 28-Nov | Protection and security 2 [Slides] | Monitors [Slides] | Assignment reviews |
| 11 | 05-Dec | Linux overview 1 [Slides] | Mailboxes, message queues. ISR -> task communication. Timer services. [Slides] | Assignment support |
| 12 | 12-Dec | Linux overview 2 [Slides] | Memory management: implementation. [Slides] | Assignment demonstrations |
Assessment
Summative assessment comprises:
- a single course work assignment undertaken in the last 4/5 weeks of the module; students will be required to implement a simple embedded application, making use of operating system services, and to report on possible extensions to, and issues raised by, their work.
Formative assessment comprises a variety of theoretical and practical exercises with opportunities for discussion with tutors and colleagues.
Feedback on formative assessment will be given during the seminar and laboratory sessions. Additionally the eLearning Portal will be used for more formal feedback on summative assessment.
Recommended Reading
There is no essential textbook for this module. [SGG09] is an excellent introduction to operating systems in general. [LAB08] gives full details of the uC/OS-II RTOS used in the module but is too expensive to recommend for individual purchase. The other recommended books and papers give useful information on parts of the syllabus only.
-
Books
- [SGG09] Silberschatz, A., Galvin, P., and Gagne, G., Operating System Concepts, John Wiley, 8th edition, 2009, ISBN-10: 0470233990
-
[DOW08] Downey, A.,
The Little Book of
Semaphores (Local
copy), Green Tea Press, 2002
A free text book by Allen Downey that introduces a variety of interesting synchronisation problems and their solution using semaphores. -
[LAB02] Labrosse, J.,
MicroC/OS-II The Real-Time Kernel (2nd edition), Newnes, 2002
A good textbook that gives a detailed account of (an earlier version of) the real-time operating system used in this module. Too expensive to buy outright but it would be a good idea to have access to it. The library has nine copies. It might cost about a tenner each between 3 or 4 of you to get hold of a copy. -
[WOL08] Wolf, W.,
Computers as Components: Principles of Embedded Computing System
Design, Morgan Kaufmann, 2008
Nice overview of interrupts in Chapter 3 and of RTOS in Chapter 6.
-
Papers
- [SR04] Stankovic, J. and Rajkumar, R., Real-Time Operating Systems, Journal of Real-Time Systems, 28, 237-253, 2004
Resources
- IAR
- Micrium (site)
-
LPC2378
- Olimex LPC2378-STK Documentation for the Olimex development prototype board
- LPC2377_78 Product Specification (external)
- LPC23xx User Manual (external)
- The Insider's Guide to the NXP LPC2300/2400 based Microcontrollers
- LPC2378 Errata Sheet (external)
-
Programming in C
-
[KOC04] Kochan, S.,
Programming in C, Sams, 2004
A gentle introduction to programming in C. I think it's a better starting point than the much-recommended Kernighan and Ritchie. -
[PRI02] Prinz, P.,
C Pocket Reference, O'Reilly, 2002
A concise C reference. Very cheap. Just over a fiver. I suggest you buy a copy and read it from cover to cover. - C Programming An online course on C Programming from the University of Strathclyde.
- Practical Programming in C A detailed introduction to C from the MIT Open Courseware catalogue. If you skip the material on data structures and concurrency, you're left with a good basic introduction to C. The data structures and concurrency sections cover more advanced material.
-
[KOC04] Kochan, S.,
Programming in C, Sams, 2004
-
Miscellaneous
- EE Times Embedded Design Centre for Electrical Engineers.
- Embedded Gurus A blog from a variety of experts on embedded software.
- The Ganssle Group Jack Ganssle's page has lots of useful embedded systems development information and links to other information sources.
- Sticky Bits Niall Cooling's blog on developing software for real-time and embedded systems.





