Vous êtes sur la page 1sur 97

COMPUTER SCIENCE 314: OPERATING SYSTEMS (REVISION 5)

Table of Contents
Unit 0: Introduction
Unit 1: Overview of Computer Organization and Operating Systems
1.1Computer Hardware: Organization, Architecture, and
Operating Systems
1.2Operating System Structures
Assessment
Supplementary Unit Activities
Unit 2: Process Management
2.1Processes
2.2Threads
2.3CPU Scheduling
2.4Process Synchronization
2.5Deadlocks
Assessment
Supplementary Unit Activities
Unit 3: Storage Management
3.1Main Memory
3.2Virtual Memory
3.3File-System Interface and Implementation
3.4Mass-Storage Structure
3.5I/O Systems
Assessment
Supplementary Unit Activities

Unit 4: Protection and Security


4.1Protection
4.2Security
Supplementary Unit Activities
Unit 5: Distributed, Real-Time, and Multimedia Systems
5.1Distributed Systems Overview
5.2Virtual Machines
Assessment
Supplementary Unit Activities

Unit 0: Introduction

Course Overview
COMP 314: Operating Systems introduces the fundamental
concepts, principles, and structures of operating systems. On a
computer, the operating system is the software that
orchestrates the hardware components. Operating systems
provide users and programmers with effcient and convenient
service, as well as a high degree of machine independence in
writing and executing programs, and in managing system
resources. It is assumed that students taking this course are
familiar with the basic structure and the main hardware
components of a computer.
COMP 314 covers the following topics:

computer-system structures and operating-system


structures;
process management: defning a process, CPU
scheduling, process synchronization, deadlocks, and
interprocess communication;
storage management: memory management, virtual
memory, fle-system management, disk management,
and I/O (input/output) systems;
protection and security issues: access matrix and its
implementations, authentication, viruses and other
intruders, encryption; and
distributed and special-purpose operating systems:
distributed operating systems, real-time systems,
embedded systems, and multimedia systems.

Course Learning Outcomes


After completing COMP 314, the student should be able to
describe the overall structure and components of operating
systems, and explain the key concepts and mechanisms of
process management, memory management, storage
management, as well as security and protection of operating
systems. The student should also be able to apply the
appropriate principles and methods to practical tasks such as
analysis, diagnosis, and development of functions and
components that are associated with modern operating
systems.

The following are some specifc learning outcomes:


describe, in general terms, the goals and tasks of an
operating system and the techniques used to handle
these tasks.
explain key terms and principles of process
management, such as kernel, process, thread,
scheduling, synchronization, deadlock handling, and
recovery.
explain how an operating system manages processes
and threads (system queues, scheduling algorithms).
outline the different strategies (such as virtual
memory) used by operating systems to manage
memory.
explain the benefts, limitations, resource overhead
(such as fragmentation and data structures), and
hardware requirements of each memory-management
technique.
list and describe several strategies used by systems
software to manage disks and other devices.
explain the nature of protection for and security
problems of operating systems.
identify and explain the protection features built into
operating systems and their supporting hardware to
enhance security.
describe the concepts, structures, and functions of
real-time, embedded, mobile, multimedia, or
distributed operating systems.
discuss, briefy, how various aspects of the theory of
operating systems are implemented in practice in

systems such as DOS, Windows, UNIX, Solaris 2, and


Mach.
apply the concepts and principles of operating systems
in investigating, exploring, and implementing system
components or the interfaces of modern operating
systems such as Linux, Windows, and Solaris.

Goals of Operating Systems


As you work through this course it is important to keep in
mind the following goals of operating systems:
enable effcient use of computer hardware.
provide a reliable environment in which to run
programs.
handle errors reasonably and with suffcient feedback.
provide services (tools, languages) for users.
hide the details of hardware and resource management
from users.
protect users from one another, and protect the
operating system from users.
At times, these goals may confict with one another; for
example, it is quite common for a designer to trade effciency
for improved security or reduced cost.

Course Outline

TOP

The Study Guide for COMP 314 consists of the following fve
units:

Unit 1: Overview of Computer Organization and


Operating Systems
This brief introduction to computer-system structures and
operating-system structures covers computer organization,
computer architecture, and overall operating-system
structure.

Unit 2: Process Management


Unit 2 will defne process and address processes, threads, CPU
scheduling, process synchronization, deadlocks, and
interprocess communication.

Unit 3: Storage Management


This unit covers memory management, virtual memory, fle
system management, disk management, mass storage
structures, and I/O systems.

Unit 4: Protection and Security


Protection and security issues covered in Unit 4 include access
matrix and its implementations, authentication, viruses (and
other intruders), and encryption.

Unit 5: Distributed, Real-time, and Multimedia


Systems
Unit 5 reviews distributed systems and special-purpose
operating systems, such as real-time systems, embedded
systems, mobile systems, and multimedia systems. This unit
serves as an extension to the core topics of the course.

Course Materials
Both a textbook and other reading materials are assigned for
this course. The required textbook provides systematic and
comprehensive information, while other reading materials
address state-of-the-art topics that the textbook does not
cover.

eTextbook
Before you access your eTextbook, you may need to disable
your pop-up blocker. If you need help doing that, follow these
instructions. Then click on the eTextbook and accept the
license agreement to get online access.
Silberschatz, A., Galvin, P. B., & Gagne, G. (2009). Operating
system concepts (9th ed.). Hoboken, NJ: John Wiley & Sons,
Inc. Note: in the Learning Activities sections of Study Guide,
the textbook is referred to as OSC9ed.
To learn about some of the features of your eText, including

how to download it so you can use it without being connected


to the internet, how to print pages, search, cite passages,
manage notes and highlights, and to learn about privacy
issues and where to go for help, see the eText section in the
Student Manual.

AU Materials
The study schedule, and Study Guide (containing the course
units), assignments, and student evaluation information
provided on the course homepage are important for your
success in this course. The Student Manual also contains noncourse specifc material (e.g., ordering exams, using the
Library, etc.) that may assist you as an AU student.

Supplementary Course Materials

TOP

Supplementary textbook
Stallings, W. (2009). Operating systems: Internals and design
principles (6th ed.). Upper Saddle River, NJ: Prentice Hall.
The supplementary textbook is not required, so it is not
included in the course package. However, you may fnd it
useful, especially when you want to fnd a different
presentation of a certain concept or principle. The Study
Guide refers to the supplementary textbook as OS6ed.
Additional course materials such as journal and conference

papers and online learning objects will be provided through


Web links and AU Library access.

Linux Kernel Source Code


The following books are helpful for examining Linux kernel
source code for further understanding of operating systems.
Bovet, D. P., & Cesati, M. (2006). Understanding the Linux
kernel (3rd ed.). Sebastopol, CA: OReilly Media.
Mauerer, W. (2008). Professional Linux kernel architecture.
Indianapolis, IA: Wiley Publishing.

Textbook Online Resources


Student Companion Site: http://codex.cs.yale.edu/avi/osbook/OS8/os8c/
It is important to visit these websites to download materials
such as solutions to practical exercises in the textbook,
additional online chapters, source code, and lecture slides,
which may help you to complete your assignments.

Athabasca University Library


Visit the Athabasca University (AU) Library online to fnd
many books, magazines, journals, and conference proceedings
about computer organization and operating The following
journals from ACM and IEEE may be most relevant for this
course.

Conference Proceedings of the ACM Symposium on


Operating Systems Principles
Journals and Magazines
Operating Systems Review
ACM Transactions on Computer Systems
IEEE Transactions on Computers
ACM Computing Surveys
Communications of the ACM
IEEE Computers
Linux Journal

Activities
1. Access the AU Library online and locate the databases
(Databases) and the journal index (E-Journals).
2. Locate the following databases:
ACM Digital Library
IEEE/IEE Electronic Library
Science Direct
3. Browse the journals, magazines, and proceedings listed
under Supplementary Course Materials: Athabasca
University Library.
4. Bookmark any links that you wish to save for future
use in the course.
5. Use Google Scholar to fnd introductory articles
discussing operating systems.

6. Browse relevant online resources for this course:


Textbook website
Textbook Student Companion Site
Textbook Solutions to Practice Exercises
Supplementary textbook website
MIT OpenCourseWares 6.828 Operating
System Engineering course
7. Compare notes with your classmates on what you have
found (using the course discussion forum).

TOP

Unit 1: Overview of Computer Organization and Operating


Systems

Unit Overview
Unit 1 has two major tasks. First, it introduces computersystem organization and architecture: that is, how an
operating system manages the hardware of a computer in
which it resides. The design and functions of operating
systems are strongly connected to the hardware
infrastructure, which brings us to the main focus of the
course: operating systems. The second part of the unit

discusses the goals, structures, and major features or


operating systems. It also addresses the history of their
development, as well as current and developing technologies.
This unit is divided into two sections:
1.1Computer Hardware: Organization, Architecture,
and Operating Systems
1.2Operating System Structures
Depending on your background, you may fnd the material in
this unit a review, or entirely new. If you are not familiar with
basic machine components (CPU, data and control bus, logic
unit, registers, memory) you may wish to consult the
Suggested References at the end of the unit, and study these
subjects before you go any further in the course.
The introduction on concepts and principles such as process,
threads, memory, and storage management may not answer
all your questions in detail. However, subsequent units will
elaborate on some important concepts, techniques, and
algorithms introduced in this unit, such as scheduling,
synchronization, and swapping.

Learning Objectives
After you complete Unit 1, you should be able to describe the
overall structures and major components in computer
organization and computer architecture and list some of the

advances in hardware and software that have enabled


contemporary operating systems technology. In addition,
studying the course materials should enable you to identify
and describe the goals and tasks of operating systems, as well
as the techniques used to handle the tasks of operating
systems.

TOP

1.1Computer Hardware: Organization, Architecture, and


Operating Systems

Overview
This section briefy introduces computer hardware; that is,
computer organization and architecture. It is particularly
important for students who are new to the discipline because
knowledge of the underlying hardware of computers is a
necessary foundation for the study of operating systems. If
you are already familiar with computer hardware and
operating-system structure, you may be able to simply review
or skip parts of this section.
In the overview of computer hardware, focus on the overall
structures and components of general computer hardware to
fgure out their functions and tasks in the computer system.
You can consider an operating system from a user view or from

a system view. Overall, an operating system controls the


computer system and allows users to run programs. It consists
of many programs and routines. The operating system
communicates with users (or with a running application) and
performs the services they request. These services may involve
sending a fle for printing, reading or writing to a disk, and
many other functions. While communicating with users, an
operating system is also managing all machine components
(CPU, control bus, data bus, logical unit, registers, memory,
and other devices such as printers and disks). We will look at
this complex task is closely throughout the course.
Understanding the following key concepts related to computer
organization and architecture will help you understand
operating system concepts and functions:
CPU and its main components: arithmetic-logic unit,
control unit, data registers, addresses and control
information, clock, control bus, and data bus
interrupt and system call
instruction-execution cycle
instruction register
multiprocessor
cache
If you are not already familiar with the purpose and function of
the main CPU components, refer to the Suggested References
at the end of the unit before beginning the reading
assignments in Unit 1.

Learning Outcomes
After you have completed Section 1.1, you should be able to
1. describe the overall structure of computer-system
organization.
2. identify major computer hardware components.
3. explain how instructions are executed in a computer.
4. explain how the I/O devices are managed.
5. describe the overall structure and operations of
operating systems.
6. explain the importance of understanding how an
operating system works.
7. defne multiprogramming, time-sharing, dual-mode
operation, privileged instructions, timer, and
caching.
8. describe (briefy) the activities in process management,
memory management, and storage management.
9. discuss (briefy) protection, security, computing
environments, distributed operating systems, specialpurpose operating systems, and open-source operating
systems.

Reading Assignment
Silberschatz, A., Galvin, P. B., & Gagne, G. Operating

system concepts (9th ed.): Chapter 1: Introduction: 1.1


to 1.3.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-4 above.

Key Concepts and Topics


central processing unit (CPU)
memory and RAM (and DRAM)
frmware and ROM (or EEPROM)
input/output (I/O) devices
instruction-execution cycle
instruction register
storage device hierarchy
small computer-systems interface (SCSI)
direct memory access (DMA)
device driver
multiprocessor system (parallel systems)
symmetric multi-processing (SMP)
uniform memory access (UMA)
non-uniform memory access (NUMA)
multiple computing cores
blade server
clustered system
Beowulf clusters

storage-area networks (SANs)

Goals of Operating Systems Software


It is important to keep in mind the following goals of operating
systems as you work through this unit:
provide for effcient use of computer hardware.
provide a reliable environment in which to run
programs.
handle errors reasonably and with suffcient feedback.
provide services (tools, languages) for users.
hide the details of hardware and resource management
from users.
protect users from one another, and protect the
operating system from users.
At times, these goals may confict with one another; for
example, it is quite common for a designer to trade effciency
for improved security or reduced cost.

Study Questions
1. Why are operating systems important for computer
systems? How can you run a program on a computer
system that has no operating system (e.g., a
microcontroller system)?

2. How is an instruction executed on a computer system


with a von Neumann architecture?
3. How does interrupt-driven I/O work through the
relevant device controller and device driver?

Learning Activities
To learn more about CPU and instruction execution,
read Central processing unit (especially the Operation
section) and Instruction cycle at Wikipedia.org.
Search the Internet to fnd some animation for an
instruction execution cycle, and share your links with
your classmates on the course discussion forum.
Complete Exercises 1.17, 1.18, 1.22, 1.23 and 1.26 in
OSC9ed.

Reading Assignment
Operating system concepts (9th ed.): Chapter 1:
Introduction: 1.4 to 1.13.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 5-9 above.

Key Concepts and Topics

multiprogramming
job pool and job scheduling
time sharing or multitasking
interactive (hands-on) computer system
response time
process
virtual memory
swapping
interrupt driven
trap or exception
dual-mode
user mode
kernel mode
privileged instructions
timer
process management
program counter
memory management
instruction-fetch cycle
data-fetch cycle
fle
mass-storage
caching
cache management
I/O subsystem
protection

security
network operating system
real-time operating systems
handheld system
multimedia system
client-server
peer-to-peer
open-source operating system
Linux
BSD UNIX
Solaris

Study Questions
1. What do you think are the major aspects of operating
systems?
2. Why do kernel mode and user mode need to be
separated, and what mechanisms are used for the
separation?
3. What are interrupt and trap (or exception), and how
are they used to support multi-programming and
multi-tasking?
4. Compare open-source operating systems such as Linux
with closed-source systems such as Windows. Which
one do you prefer under what conditions (or
circumstances)?

Learning Activities
Complete Practice Exercises 1.1 to 1.12 in OSC9ed.
Try Practice Exercises 1.13 to 1.16, 1.19, 1.24, 1.25, 1.27,
1.28, 1.31, and 1.32 in OSC9ed.
Download the PowerPoint slides or pdf for Chapter 1 of
OSC9ed.
Supplemental Reading: Chapter 1: Computer System
Overview in of the supplemental textbook, Operating
systems: Internals and design principles (9th ed.)
(OS9ed). This chapter provides some explanation for
computer hardware for you to review.
Solutions to the Practice Exercises are available at the
textbook website.

TOP

1.2Operating System Structures

Overview
Now that you are equipped with the necessary knowledge of
computer hardware and systems, you will cover more details
about operating system structures in this section. You will
view an operating system from several vantage points: of a

user, a programmer, and a designer of operating systems. You


will examine the services and interface that the system
provides, and also the components and their interconnections
in the system.
This section still addresses the overall structure of operating
systems, but from a higher level of abstraction. Seeing the
operating system as a whole will help you to understand each
of its components.
This section looks at the following key concepts of operating
systems:
system call
microkernel
performance tuning
operating system generation
system boot
system and application programs

Learning Outcomes
After you have completed Section 1.2, you should be able to
1. identify the services and interfaces that an operating
system provides to users, to processes, and to other
systems.
2. defne system calls and types of system calls, and
explain how system calls work in an operating system.

3. list the main system programs that an operating


system usually provides.
4. describe several main structures of operating systems,
and compare their structure and performance.
5. describe the design, implementation, debugging, and
generation of operating systems.
6. explain the system boot function of operating systems.

Reading Assignment
Operating system concepts (9th ed.): Chapter 2:
Operating-System Structures: 2.1 to 2.5.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-3 above.

Key Concepts and Topics


operating system services helpful to users
graphical user interface (GUI)
command interpreter
program execution
I/O operations
fle-system manipulation
communications

error detection
operating-system functions that ensure the effcient
operation of the system itself
recourse allocation
accounting
protection and security
system calls
system-call interface
types of system calls
application programming interface (API)
systems programs
fle manager programs and text editors
logging, registry, system information viewer
compilers, interpreters, assemblers, and
debuggers
communication programs such as Web
browser

Study Questions
1. What are the three different vantage points for
considering operating systems?
2. What services are designed for performance, and what
services are designed for usability?
3. What are system calls, and how does a system call
work in a dual-mode context?
4. How do you see the relationship between Linux system

calls and a standard C Library?

Learning Activities
Take a look at Assignment 4: Part 2: Research Project:
Option 2: Programming Project and evaluate whether
adding a system call to the Linux Kernel may be
something you may wish to try for this assignment.
Take a look at system calls in Linux to get a sense
about their coverage. Consider consulting the
supplemental Linux books listed in Unit 0.
Complete Exercises 2.12, 2.13, and 2.16 to 2.18 of
OSC9ed.

Reading Assignment
Operating system concepts (9th ed.): Chapter 2:
Operating-System Structures: 2.7 and 2.8.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 4 and 5 above.

Key Concepts and Topics

operating system structure


layered approach
kernel
microkernel approach
mach
modular kernels
virtual machine and virtualization
para-virtualization
zones or containers
simulation
VMware architecture
Java virtual machine
just-in-time (JIT) compiler

Study Questions
1. What do you think about operating systems based on
microkernel structure compared with their layered
and modular kernel counterparts?
2. Why is it important to separate kernel from user
space?
3. How are user mode and kernel mode issues dealt with
under a virtual machine environment?

Learning Activities

Complete Exercises 2.20, 2.21, 2.22, 2.24, and 2.25 of


OSC9ed.

Reading Assignment
Operating system concepts (9th ed.): Chapter 2:
Operating-System Structures 2.6, 2.9, 2.10, and 2.11.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 6 and 7 above.

Key Concepts and Topics


operating-system design: goals, mechanisms, and
policies
operating-system implementation: language issue
operating-system debugging
debugger
core dump
crash dump
operating-system performance tuning
profling
operating-system generation
system boot
boot block

GRUB

Study Questions
1. What is the reason (besides a few core codes
programmed by assembly) for using high level
language in OS design?
2. Why is operating-system generation and booting
needed in most operating systems? What is the twostep process for system boot?

Learning Activities
If you dont have a Linux operating system running on
your computer, it is recommended that you install
Fedora or Ubuntu now.
If you have diffculty in setting up a separate computer
with Linux, you may download the ISO fle of a Live
Desktop version of Fedora (or Ubuntu), burn it on a
blank CD, and then directly boot your computer from
the CD. You can use most of the functions of the Linux
operating system without installing it into the hard
drive. Make sure you always save your working fles to
a USB fash drive before logout or shutting down so
they are not lost. You may share your experience
doing this on the course discussion forum.
Search the Internet to assess the number of efforts that

exist in developing operating systems. Will you


contribute to the community for Linux kernel
development (for example)?
Complete Practice Exercises 2.19 and 2.23 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 2 of OSC9ed.
Complete Practice Exercises 2.1 to 2.11 of OSC9ed. You
can check your answers to these questions at
Operating System Concepts (9th ed.): Solutions to
Practice Exercises.

TOP

Assessment

Assignment 1
Please submit Assignment 1 to your tutor at this time, using
the designated Assignment Drop Box at your course
homepage. Assignment 1 is worth 10% of your fnal grade.

TOP

Supplementary Unit Activities


Explore surveys and technical documents about the
structures and components of modern computer
organization, architecture, and operating systems.
Based on this exploration, try to identify an existing
problem of your interest and a possible solution to it
(you may continue this work in the following units,
until you fnd a suitable topic for Assignment 4 of this
course).
Share your fndings and opinions with your classmates
and tutor on the course discussion forum.
If you need to know more about computer organization
and architecture, please access materials on the
following Suggested References through the AU
Library.

Suggested References
AU Library: Electronic Resources
To access these e-books, you will need to login to the AU
Library.
Patterson, D. A., & Hennessy, J. L. (2009). Computer
organization and design: The hardware/software interface
(4th ed.). Burlington, MA: Morgan Kaufmann/Elsevier.

Mostafa, A-E-B, & Hesham, E-R. (2005). Fundamentals of


computer organization and architecture. Hoboken, NJ:
Wiley.
Dandamudi, S. P. (2003). Fundamentals of computer
organization and design. New York: Springer.

AU Library: Print Resources


Stallings, W. (1996). Fundamentals of computer organization
and design (4th ed.). Englewood Cliffs, NJ: Prentice-Hall.
Baron, R. J. (1992). Computer architecture: Case studies.
Reading, MA: Addison-Wesley.
Hwang, K. (1993). Advanced computer architecture:
Parallelism, scalability, programmability. New York:
McGraw-Hill.
Mano, M. M. (1993). Computer system architecture (3rd ed.).
Englewood Cliffs, NJ: Prentice-Hall.

TOP

Unit 2: Process Management

Unit Overview

This unit elaborates on process management, which is at the


core of modern operating systems. An operating system must
ensure that all processes, and their threads as applicable, are
assigned proper resources (CPU time, memory, fles, I/O
devices, etc.) to accomplish their tasks in a time sharing,
multi-processor, and multi-core computer system. Process
management covers processes, threads, CPU scheduling,
process synchronization, and deadlock handling.
Unit 2 is divided into fve sections:
2.1Processes
2.2Threads
2.3CPU Scheduling
2.4Process Synchronization
2.5Deadlocks

Learning Objectives
After you complete Unit 2, you should be able to describe the
behaviour and characteristics of processes in computing
systems, and discuss the relationship of processes to
resources. With this understanding, you should be able to
explain how an operating system manages processes and
threads (addressing system queues and the scheduling of
algorithms). You should also be able to explain key terms and
principles of process management, such as kernel, process,

thread, scheduling, synchronization, deadlock handling, and


recovery; and discuss how various aspects of the process
management are implemented in practice in systems such as
Linux, Windows, and Solaris.

TOP

2.1Processes

Overview
This section introduces the key concepts of processes, process
states, process control block (PCB), and threads. From this
basis, it moves on to the basic principle of process scheduling
the main task of process management.
It also elaborates on interprocess communication (IPC) and
introduces client-server communication, both of which are
important for interaction among programs and processes.
The concepts of data structures and principles are key to
understanding the remaining sections of Unit 2. Take special
note of the following issues:
the notion of process
the meaning of process states
the queuing diagram of process scheduling
process creation and termination

interprocess communication through shared memory


and message passing
sockets, pipes, and RPC (remote process calling)

Learning Outcomes
After you have completed Section 2.1, you should be able to
1. defne process, process states, and process scheduling.
2. outline the differences between processes and
programs.
3. describe how the states of processes change during
their execution.
4. explain how process control block (PCB) is used during
central processing unit (CPU) switches from process
to process.
5. describe the queuing diagram representation of
process scheduling.
6. explain how processes are created and terminated, and
how to apply them in multi-process programming in
Linux or Windows operating systems.
7. defne interprocess communication (IPC).
8. explain the foundational functions behind the two
models of interprocess communication (IPC): sharedmemory and message passing.
9. explain how shared-memory and message passing
functions are realized in real systems such as POSIX
and Windows.

10. explain the mechanisms of communication in clientserver systems, including sockets, remote procedure
calls (RPC), pipes, and named pipes.
11. apply IPC and client-server communication API in
system programming.

Reading Assignment
Operating system concepts (9th ed.): Chapter 3:
Processes: 3.1 to 3.3.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-6 above.

Key Concepts and Topics


process
process states
new
running
waiting
ready
terminated
process control block
process scheduling

process scheduler
job scheduler, or long-term scheduler
CPU scheduler, or short-term scheduler
medium-term scheduler
swapping
context switch
scheduling queues
job queue
ready queue
device queue
degree of multiprogramming
process creation
fork ()
process termination

Study Questions
1. What are the main features of processes?
2. What information is included in PCB?
3. What data structures are involved in process
scheduling?
4. What is the rationale for each kind of scheduler: longterm, short-term, and medium-term schedulers?
5. How do you use fork() to create a process?

Learning Activities
Run the following online animations:
the dynamic state of a process
CPU switching between processes due to
system calls or interrupts
example of a process life cycle
Try Exercises 3.6 to 3.10 and 3.13 of OSC9ed.

Reading Assignment
Operating system concepts (9th ed.): Chapter 3:
Processes: 3.4 to 3.6.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 7-11 above.

Key Concepts and Topics


process cooperation
interprocess communication (IPC)
shared-memory
message passing
producer-consumer problem
bounded and unbounded buffer

direct and indirect communication


naming
mailbox or port
synchronization
buffering
zero, bounded, and unbounded capacity
POSIX shared memory
message passing in Mach
local procedure calls in Windows
communication in client-server systems
sockets
remote procedure calls (RPCs)
port
stub
matchmaker
ACK message
pipe
named pipe

Study Questions
1. Why is process cooperation supported in modern
operating systems? What are the benefts?
2. What is the difference between IPC and RPC?
3. How are shared memory, message passing, RPC,
sockets, and pipes implemented practically in systems
such as POSIX, Mach, and Windows?

Learning Activities
Test and run the sample c or Java source code of IPC
and client-server communication provided on the
textbooks website.
Try Exercises 3.11 to 3.12 and 3.14 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 3 of OSC9ed.
Read 3.23 POSIX Message Passing in the
Programming Projects section near the end of Chapter
3 of OSC9ed., and consider whether a similar
programming project might interest you for
Assignment 4.
Complete Practice Exercises 3.1 to 3.5 of OSC9ed. You
may check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.

TOP

2.2Threads

Overview

This section addresses threads and discusses multithreading


models and thread libraries. Basically, a thread is a basic unit
of a CPU, and a multithreaded process can bring signifcant
benefts, such as improved responsiveness, scalability, and
resource sharing. Most modern operating systems support
multithreading mechanisms, and many system programs use
multithreading to improve their performance. It is necessary
to understand multithreading mechanisms to do system or
service-related implementation and programming.

Learning Outcomes
After you have completed Section 2, you should be able to
1. defne thread and multithreaded process.
2. describe the motivation for and benefts of
multithreaded programming.
3. briefy describe multicore programming, and explain
its connection with multithreaded programming.
4. identify multithreading models (e.g., many-to-one,
one-to-one, and many-to-many modes), and explain
how they map user threads to kernel threads.
5. describe thread libraries such as Pthreads, Windows
threads, and Java threads.
6. discuss issues that must be considered with
multithreaded programs, such as thread cancellation,
thread pool, lightweight process (LWP), etc.
7. describe how threads are implemented in Linux and

Windows.

Reading Assignment
Operating system concepts (9th ed.): Chapter 4:
Threads: 4.1 to 4.7.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-7 above.

Key Concepts and Topics


thread
multithreaded programming
multithreaded process and single-threaded process
multicore programming
multithreading models
many-to-one model
one-to-one model
many-to-many model
two-level model
user threads
kernel threads
thread libraries
Pthreads

Java threads
Windows threads
thread cancellation
signal handling in multithreaded programs
thread pool
lightweight process (LWP)
thread-specifc data
scheduler activations
fork(), exec(), and clone()
threads implementation in operating systems
Linux threads
Windows threads

Study Questions
1. What is the motivation for using multiple threads in a
process?
2. What are the benefts of using multithreaded
programming?
3. What are the differences between user-level threads
and kernel-level threads?
4. How do POSIX, Java, and Windows implement their
thread libraries?
5. How can thread libraries be used for multithreaded
programming?

Learning Activities
Test and run the sample c or Java source code of
multithreaded programs provided on the textbooks
website.
Try Exercises 4.9, 4.10, and 4.15 of OSC9ed.
Download the PowerPoint slides or pdf for Chapter 4
of OSC9ed.
Read Project 1: Naming Service Project and Project
2: Matrix Multiplication Project in the Projects
section of Chapter 4 of OSC9ed to see whether such a
programming project might interest you for
Assignment 4.
Complete Practice Exercises 4.1 to 4.6 of OSC9ed. You
may check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.

TOP

2.3CPU Scheduling

Overview
CPU scheduling is the basis of modern operating systems that
can execute multiple processes and threads simultaneously.

This section covers the concepts, criteria, algorithms, and


examples of CPU scheduling, and introduces scheduling issues
related to thread (thread scheduling), multiple-processors
(multiple-processor and multicore processor scheduling), and
virtualization.

Learning Outcomes
After you have completed Section 2.3, you should be able to
1. defne CPU scheduling, and explain the rationale for
using it in modern operating systems.
2. explain the concepts and criteria associated with
various CPU scheduling algorithms.
3. explain the implementation of CPU scheduling in
current operating systems such as Linux, Solaris, and
Windows.
4. describe and evaluate methods for CPU scheduling
algorithms for a particular system.

Reading Assignment
Operating system concepts (9th ed.): Chapter 6: CPU
Scheduling: 6.1 to 6.9.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning

Outcomes 1-4 above.

Key Concepts and Topics


CPU scheduling
process scheduling
thread scheduling
CPU burst and I/O burst
CPU scheduler or short-term scheduler
pre-emptive scheduling
non-pre-emptive or cooperative scheduling
dispatcher
dispatcher latency
scheduling criteria
CPU utilization
throughput
turnaround time
waiting time
response time
Gantt chart
scheduling algorithms
frst-come, frst-served (FAFS)
shortest-job-frst (SJF)
shortest-next-CPU-burst
shortest-remaining-time-frst
priority scheduling
aging

starvation of indefnite blocking


round-robin (RR) scheduling
multilevel queue scheduling
multilevel feedback queue scheduling
thread scheduling
process-contention scope (PCS)
system-contention scope (SCS)
Pthread scheduling
multiple-processor scheduling
asymmetric multiprocessing
symmetric multiprocessing (SMP)
processor affnity
soft affnity
hard affnity
load balancing
multicore processor scheduling
scheduling in virtual machines
Linux scheduling
Windows scheduling
Solaris scheduling
scheduling algorithm evaluation
deterministic modeling
queueing model
Littles formula
queueing-network analysis
simulation
implementation

Study Questions
1. Why is CPU scheduling very important in modern
operating systems?
2. What are the differences between pre-emptive and
cooperative scheduling? How are pre-emptive
scheduling and cooperative scheduling used in
operating system design?
3. What are the main CPU scheduling algorithms, and
how do they work?
4. What are the issues unique to multiple processor
scheduling compared to single CPU scheduling?
5. In practice, how do operating systems perform CPU
scheduling?

Learning Activities
Test the sample c source code of Pthread scheduling
provided on the website of OS6ed.
Try Exercises 6.1-6.9 and 6.16-6.20 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 6 of OSC9ed.
Complete Practice Exercises 5.1 to 5.8 of OSC9ed. You
may check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.

TOP

2.4Process Synchronization

Overview
This section introduces process synchronization, which aims to
provide mutually exclusive access to data and resources that
are shared by a collection of cooperating sequential processes,
to ensure that the data consistency is maintained. This section
discusses various process synchronization mechanisms such
as critical-section, locking, semaphores, monitors, and
synchronization implementation in Linux, Solaris, and
Windows.
This section also provides an overview of concepts and
techniques of concurrent atomic transactions, such as logbased recovery, locking protocol, and timestamp-based
protocols.
Key concepts and problems in this section:
critical-section problem
semaphores
monitors
classic problems of synchronization

Learning Outcomes
After you have completed Section 2.4, you should be able to
1. defne critical-section problem.
2. explain hardware and software solutions for the
critical-section problem.
3. describe semaphores and monitors, and explain how
they are implemented.
4. explain how to use semaphores and monitors to handle
classic problems of synchronization such as boundedbuffer problems, readers-writers problems, and
dining-philosophers problems.
5. describe synchronization mechanisms in Linux,
Solaris, and Windows.
6. discuss the concept of atomic transactions and the
mechanisms by which to ensure atomicity.

Reading Assignment
Operating system concepts (9th ed.): Chapter 5:
Process Synchronization: 5.1 to 5.11.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-6 above.

Key Concepts and Topics


synchronization
race condition
critical-section and critical-section problem
mutual exclusion
progress
bounded waiting
Petersons solution
hardware instructions executed atomically
swap()
testandset()
semaphores
wait(S)
signal(S)
mutex locks or binary semaphore
counting semaphore
spinlock
busy waiting
block() and wakeup(P)
deadlocks
starvation or indefnite blocking
priority inversion
classic problems of synchronization
bounded-buffer problem
readers-writers problem
dining-philosophers problem

monitors
monitor type
conditions
synchronization
in Solaris
in Windows
in Linux
atomic transaction
commit, abort, and roll back
write-ahead logging
log-based recovery
checkpoints
concurrent atomic transactions
serializability
serial schedule
nonserial schedule
conficting operations
confict serializable
locking protocol
two-phase locking protocol (2PL)
timestamp-based protocol

Study Questions
1. What is the purpose of process synchronization?
2. What requirements should be satisfed to solve the

critical-section problem?
3. What are the differences between hardware instruction
and semaphore-based solutions?
4. What are the differences between semaphore and
monitor? How are they used for solving the classic
problems of synchronization?
5. How do Windows and Linux support process
synchronization?
6. What is confict serializability, and how can locking
protocols be used to ensure it?

Learning Activities
Try to run the following animations provided on the
website of OS6ed:
Process Synchronization: Producer/Consumer
Problem
The Critical Section Problem: Algorithm 3
Mutual Exclusion Achieved through
Semaphores
Producer/Consumer Workbench Semaphore
Solution
Producer/Consumer Workbench Monitor
Based Solution
Simple Solution to the Bounded Buffer
Problem
Implementation of the Bounded Buffer

Problem Using a Counter Variable


Mutex: A Binary Semaphore
Process Synchronization with Semaphores
Try Exercises 5.7, 5.8, 5.11, 5.17, and 5.34 of OSC9ed.
Download the PowerPoint slides or pdf for Chapter 6
of OSC9ed.
Read Producer-Consumer Problem in the
Programming Projects section of Chapter 5 of
OSC9ed, to see whether a similar programming
project might interest you for Assignment 4.
Complete Practice Exercises of OSC9ed. You may
check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.

TOP

2.5Deadlocks

Overview
The fnal section in this unit discusses deadlocks, which may
occur when several processes compete for a fnite number of
resources. Topics in this section include techniques to detect,
prevent, and avoid deadlocks. As operating systems typically
do not provide deadlock-prevention facilities, programmers

are responsible for ensuring that the programs they design are
deadlock free. The information in this section will help welltrained programmers to analyze and address deadlock-related
issues in their programs.

Learning Outcomes
After you have completed Section 2.5, you should be able to
1. defne deadlock, and discuss the conditions under
which a deadlock may arise.
2. summarize the different ways of and methods for
handling deadlock.
3. describe how to realize deadlock prevention, deadlock
avoidance, deadlock detection, and deadlock recovery.
4. explain the resource-allocation-graph algorithm,
Bankers algorithm, and deadlock detection algorithm.

Reading Assignment
Operating system concepts (9th ed.): Chapter 7:
Deadlocks: 7.4 to 7.7.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-4 above.

Key Concepts and Topics


deadlock
necessary conditions for a deadlock to arise
mutual exclusion
hold and wait
no pre-emption
circular wait
resource-allocation graph
deadlock prevention
deadlock avoidance
safe state
safe sequence
resource-allocation-graph algorithm
Bankers algorithm
safety algorithm
resource-request algorithm
deadlock detection
wait-for graph
detection algorithm
recovery from deadlock

Study Questions
1. Why is it important to learn to handle deadlock issues?
2. What are the necessary conditions for a deadlock to

happen, and how can knowledge of these conditions


be used in deadlock prevention?
3. How can one determine whether a state is safe state
(deadlock free)? How can this knowledge be used to
avoid deadlock?
4. What data structures are used in deadlock avoidance
and deadlock detection?

Learning Activities
Try to run the Resource Allocation Graph animation
provided on the website of OS6ed.
Try Exercises 7.10, 7.11, 7.20, and 7.21 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 7 of OSC9ed.
Complete Practice Exercises 7.1 to 7.9 of OSC9ed. You
may check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.

TOP

Assessment

Assignment 2
Please submit Assignment 2 to your tutor at this time, using
the designated Assignment Drop Box on your course
homepage. Assignment 2 is worth 15% of your fnal grade.

TOP

Supplementary Unit Activities


Explore surveys and technical documents about
process management such as processes, threads, CPU
scheduling, process synchronization, and deadlock
handling in widely used systems such as Linux, Mac,
Windows, and Solaris.
You may also explore Linux processes, threads, CPU
scheduling, and process synchronization to see what
features are provided.
Compare other operating systems such as PDA, cell
phone, and iPhone, and see whether their operating
systems have the same issues in process management
as those discussed in this unit, and explain why or why
not.
Share your fndings and opinions with your classmates
and tutor on the course discussion forum.

TOP

Unit 3: Storage Management

Unit Overview
Unit 3 discusses how memory, fle systems, mass storage, and
I/O (input/output) are handled in modern computer systems.
In a multiprogramming system, a process may change its state
from waiting to running several times before completing
its task. Clearly, if each process were loaded from secondary
storage into the main memory in its entirety, a large fraction
of machine time would be wasted on loading and unloading
processes to and from the main memory during each section
of process execution. To minimize the overhead associated
with loading and unloading, operating systems allocate
memory to several processes simultaneously. This complex
task requires effective memory management schemes and
their hardware support (major topics in this unit).
The other major topic in this unit is secondary storage, in
particular, fle systems and disk management. Disks serve as
extensions and backup for the main memory, and as
economical online storage devices for program and data fles.
The operating system organizes fles in the framework of a fle
system. Disk access is much slower than access to memory

and, in general, several processes compete for disk access. For


these reasons, in many computers, disk access is the main
bottleneck to improved performance. As such, section 3.4
examines the software and hardware mechanisms employed
to improve disk performance.
Input-output operations are among the main jobs of a
computer system. As various I/O devices vary widely in their
function and speed, different methods are needed to control
them, and those methods form the I/O subsystem of the
kernel. The fnal section of this unit covers the structure,
principles, and performance aspects of I/O hardware and
software.
Unit 3 is divided into fve sections:
3.1Main Memory
3.2Virtual Memory
3.3File-System Interface and Implementation
3.4Mass-Storage Structure
3.5I/O Systems

Learning Objectives
When you complete Unit 3, you will be able to describe the
different strategies that operating systems employ to manage
memory, with knowledge of the benefts, limitations, resource

overhead (such as fragmentation and data structures), and


hardware requirements of each management technique. You
will also learn how developers can write applications
(program and data structures) that reduce overhead for
memory in a shared environment and that use memory more
effciently. In modern application environments, in which
virtual memory is becoming increasingly important, it is
important that you can explain this concept and its
importance, and that you can list and describe several
strategies that systems software uses to manage disks and
other devices. Finally, you should be able to describe the
structure, principles, and performance issues of I/O hardware
and software.

TOP

3.1Main Memory

Overview
This section focuses on memory management in the main
system. Memory is an important fnite resource that has a
signifcant impact on system throughput. As such, it must be
managed carefully. In a multiprogramming environment, the
operating system attempts to complete as much work as
possible at one time by allowing processes to share memory.
To do this, it is critical that the operating system manage

memory in such a way that many processes may share it and


that the memory space for each process is protected from
other processes. This security measure requires that all
memory addresses be validated. The overhead resource cost of
verifying every memory access makes hardware support
necessary.

Learning Outcomes
After you have completed Section 3.1, you should be able to
1. describe address binding at compile, load, and
execution time.
2. explain the different strategies that operating systems
use to manage the sharing and allocation of memory
among several processes, including contiguous
allocation, paging, segmentation, and segmentation
with paging.
3. discuss how relocation, sharing, and protection are
considered in memory management.
4. describe how an operating system may implement
shared memory.

Reading Assignment
Operating system concepts (9th ed.): Chapter 8: Main
Memory: 8.1 to 8.7.

As you do the assigned reading, focus on the Key Concepts and


Topics outlined below to ensure that you can meet Learning
Outcomes 1-4 above.

Key Concepts and Topics


address binding
compile time binding
execution time binding
load time binding
logical address
virtual address
memory management unit (MMU)
dynamic loading
static and dynamic linking
swapping
contiguous allocation
partitioning
variable-partition scheme
fragmentation
external fragmentation
internal fragmentation
compaction
paging
page
frame

page table
frame table
page-table base register (PTBR)
translation look-aside buffer (TLB)
hit-ratio
frame protection
multilevel paging
hash-page table
inverted page table
segment
segment table
segmentation
segmentation with paging
local descriptor table (LDT)
global descriptor table (GDT)

Study Questions
1. What is address binding?
2. What are the main purposes of swapping, paging, and
segmentation in memory management?
3. When should an operating system designer consider
using hashed paging and inverted paging instead of
hierarchical paging?
4. How does an Intel architecture support both paging
and segmentation?

Learning Activities
Download and review the PowerPoint slides or pdf for
Chapter 8 of OSC9ed.
Try 8.1-8.5 of OSC9ed.
Complete Exercises 8.11, 8.20, and 8.28 of OSC9ed.
You may check the answers to these questions at
Operating System Concepts (9th ed.): Solutions to
Practice Exercises.
Try to run the following animations from the website
of OS6ed:
Overlays for Primitive Memory Management
Dynamic Relocation Using a Relocation
Register
Multiple Partition Contiguous Memory
Allocation
Compaction
Paging Hardware
Paging Model of Logical and Physical Memory
Paging Example for a 32-Byte Memory with 4Byte Pages
Segmentation Hardware
Paged Segmentation

TOP

3.2Virtual Memory

Overview
For users, the tangible beneft of virtual memory is that it
removes the restriction that the size of the computers
memory places on the size of an executable program. The key
idea behind virtual memory is easy to state but much harder
to implement: keep only those (code and data) parts of a
process in the memory that are needed in the current CPU
burst of the process. This section examines the software and
hardware mechanisms needed to implement virtual memory.

Learning Outcomes
After you have completed Section 3.2, you should be able to
1. explain the concept of virtual memory, and discuss the
benefts, implementation, and overhead.
2. defne demand paging and page replacement.
3. describe the page replacement algorithms and
strategies listed below in terms of algorithms, data
structures, overhead, and benefts.
frst-in frst-out (FIFO)
optimal
least-recently-used (LRU) and variations
page buffering

4. outline the decision problems associated with frame


allocation.
5. explain the phenomenon of thrashing and the
strategies and techniques deployed to deal with this
problem.
6. describe how memory mapping fles and shared
memory operate in the Win32 API.
7. discuss the following factors that affect the character
and performance of a paging system: prepaging, page
size, program structure, and I/O interlock.

Reading Assignment
Operating system concepts (9th ed.): Chapter 9:
Virtual Memory: 9.1 to 9.10.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-7 above.

Key Concepts and Topics


virtual memory
demand paging
lazy swapper
pager

page fault
locality of reference
page fault rate
copy-on-write
page replacement
reference string
frst-in frst-out page replacement
optimal page replacement
Beladys anomaly
least-recently-used page replacement
page-buffering algorithm
frame allocation
global page replacement
local page replacement
thrashing
working-set model
memory-mapped fles and I/O
shared memory
prepaging
I/O interlock

Study Questions
1. Why is virtual memory an important feature of modern
operating systems?
2. What is page replacement? How should different page
replacement algorithms be chosen?

3. How are memory-mapped fles used for memory


sharing?

Learning Activities
Download and review PowerPoint slides or pdf for
Chapter 9 of OSC9ed.
Try Exercises 9.3, 9.6, 9.8, 9.21, 9.27, and 9.32 of
OSC9ed.

TOP

3.3File-System Interface and Implementation

Overview
The main criterion for a good fle system is that it provide the
user with convenient (user friendly), effective, and secure
means of organizing and accessing his or her fles. This section
examines the fle-system concepts familiar to most users, such
as fle names, fle types, directory structures, and fle
protection. Section 3.3 also discusses some of the practical
problems, block-allocation schemes, performance criteria, and
backup and recovery schemes that system designers must
consider when they implement fle systems on disk.

Learning Outcomes
After you have completed Section 3.3, you should be able to
1. explain the function of fle systems and their
interfaces.
2. describe the concepts of fle, fle attributes, fle
operations, fle organization, and fle access.
3. outline the different directory structures.
4. describe fle system mounting and fle sharing.
5. describe the nature of protection schemes, including
the concept of owner, group, and universe (world)
categories, and the concept of access lists.
6. explain the layered approach to fle system
organization.
7. describe the implementation of a local fle system and
directory.
8. explain contiguous, linked, and indexed disk allocation
strategies, and the overhead, benefts, and problems
associated with each.
9. discuss free-space management and its possible
implementations.
10. discuss the importance of backup and recovery.
11. discuss effciency and performance issues related to fle
systems and organization.

Reading Assignment
Operating system concepts (9th ed.): Chapter 11: FileSystem Interface: 11.1 to 11.6.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-5 above.

Key Concepts and Topics


open fle table
fle organization
fle structure
packing
internal fragmentation, fles
access method
sequential access
relative access
logical record
random access
indexed
indexed sequential access
relative block number
directory
tree structured directory
subdirectory

device directory
acyclic graph directory
symbolic link
mount point
immutable shared fles
access control list

Study Questions
1. What are the different fle access methods? How are
they related to fle organization?
2. How does access control support fle sharing and fle
protection?

Learning Activities
Download and review the PowerPoint slides or pdf for
Chapter 11 of OSC9ed.
Complete Practice Exercises 11.1 to 1.9 of OSC9ed. You
may check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.
Try Exercises 11.10 to 11.13 and 11.17 of OSC9ed.

Reading Assignment

Operating system concepts (9th ed.): Chapter 12: FileSystem Implementation: 12.1 to 12.9.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 6-11 above.

Key Concepts and Topics


basic fle system
logical fle system
fle-control block
mount table
virtual fle systems
dynamic storage allocation
external fragmentation
fle allocation table (FAT)
index block
linked allocation
combined index
backup
recovery
consistency checking

Study Questions

1. What are the drawbacks of a layered structure in a flesystem implementation?


2. When would you consider designing a special fle
system instead of using the one distributed with an
operating system?
3. What are the two most important functions of the
Virtual File System (VFS) layer?
4. What are the problems associated with linked
allocation of disk space routines?

Learning Activities
Complete Practice Exercises 12.1 to 12.8 of OSC9ed.
You may to check the answers to these questions at
Operating System Concepts (9th ed.): Solutions to
Practice Exercises.
Try Exercises 12.11, 12.15, 12.16, and 12.20 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 12 of OSC9ed.
Analyze a fle system familiar to you, and list the
features and characters introduced in this section.

TOP

3.4Mass-Storage Structure

Overview
A fle system can be viewed logically as consisting of three
parts: the interface to the fle system (for users and
programmers), the internal data structures and algorithms for
implementing the interface, and the secondary and tertiary
storage structures. The frst two parts were covered in Section
3.3; this section addresses the third. Secondary storage
structure topics include the physical structure of disks, diskscheduling algorithms, disk management (disk formatting,
boot block, and bad blocks), and swap-space management.
Section 3.4 also introduces RAID structure, stable-storage,
and tertiary storage structure.

Learning Outcomes
After you have completed Section 3.4, you should be able to
1. describe overall disk structure.
2. explain and compare several algorithms for scheduling
disk requests, including FCFS, SSTF, SCAN, C-SCAN,
and LOOK.
3. describe issues related to disk management such as
disk initialization, booting from disk, and bad-block
recovery.
4. describe swap-space management, disk reliability,

RAID structure, and tertiary storage structures.

Reading Assignment
Operating system concepts (9th ed.): Chapter 10:
Mass-Storage Structure: 10.1 to 10.9.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-4 above.

Key Concepts and Topics


magnetic disk and tape
logical block
constant linear velocity (CLV)
constant angular velocity (CAV)
host-attached and network-attached storage
SCSI
fber channel (FC)
storage-area network
disk scheduling
seek time
rotational latency
bandwidth
frst-come, frst-served (FCFS)

shortest-seek-time-frst (SSTF)
scan scheduling (SCAN) or elevator algorithm
circular SCAN (C-SCAN)
look scheduling (LOOK)
disk formatting
logical formatting
physical formatting
boot block
master boot record (MBR)
bad blocks
swap-space management
redundant arrays of independent disks (RAIDs)
data striping
bit-level striping
block-level striping
RAID levels
stable-storage implementation
tertiary-storage structure
removable media

Study Questions
1. What is disk attachment? Name several kinds of disk
attachment, outline their differences, and outline their
differences in usability.
2. What are the main disk scheduling algorithms, and
how do they work?

3. What are the main tasks in disk management?


4. What are RAID levels, and how does one determine
which level to use for a specifc computer system?
5. What technologies are used in new tertiary storage
devices?

Learning Activities
Try Practice Exercises 10.1 to 10.7 of OSC9ed. You may
check the answers to these questions at Operating
System Concepts (9th ed.): Solutions to Practice
Exercises.
Try Exercises 10.11, 10.13, and 10.17 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 12 of OSC9ed.

TOP

3.5I/O Systems

Overview
Input-output (I/O) is one of the two main jobs of a computer
(the other is processing/computing). This section briefy
introduces I/O systems, including I/O hardware, services, and

interfaces. It covers some concepts that are basic to computer


systems such as bus structure, device drivers, direct memory
access (DMA), kernel I/O subsystems, and I/O performance
issues.

Learning Outcomes
After you have completed Section 3.5, you should be able to
1. describe (briefy) I/O hardware components and
mechanisms such as bus, interrupt-driven I/O cycles,
and DMA.
2. outline and describe the main functions of the kernel
I/O subsystem.
3. briefy explain how I/O requests are transformed to
hardware operations.

Reading Assignment
Operating system concepts (9th ed.): Chapter 13: I/O
Systems: 13.1 to 13.7.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-3 above.

Key Concepts and Topics


device drivers
bus structure
memory-mapped I/O
registers for I/O ports
busy-waiting or polling
interrupt-driven I/O
programmed I/O (PIO)
DMA
block and character devices
blocking and nonblocking I/O
kernel I/O subsystem
I/O scheduling
buffering
caching
spooling

Study Questions
1. How are data transferred between an I/O device and
memory?
2. What is DMA, and why do we need it as an alternative
to standard memory access systems such as
programmed I/O?
3. What is the purpose of device drivers in operating

systems?
4. What are the main tasks of the kernel I/O subsystem?

Learning Activities
Complete Practice Exercises 13.1 to 13.6 of OSC9ed.
You may check the answers to these questions at
Operating System Concepts (9th ed.): Solutions to
Practice Exercises.
Try Exercises 13.9, 13.10, and 13.12 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 13 of OSC9ed.

TOP

Assessment

Assignment 3
Please submit Assignment 3 to your tutor at this time, using
the designated Assignment Drop Boxon your course
homepage. Assignment 3 is worth 15% of your fnal grade.

TOP

Supplementary Unit Activities


Explore surveys and technical documents about the
memory, fle-system, mass-storage and I/O
subsystems. Try to identify an existing problem of
interest and a possible solution to it (you may
continue this work in the following units until you fnd
a suitable topic for Assignment 4 of this course).
You may also explore Linux kernel to see what features
it provides for fle-system interface and
implementation, storage management, and I/O
systems. Share your fndings and opinions with your
classmates and tutor on the course discussion forum.

TOP

Unit 4: Protection and Security

Unit Overview

Protection and security have become major issues infuencing


the advancement of computing and information systems in
the last two decades, especially for network and operating
systems. Protection and security have become a necessary part
of modern operating systems. Unit 4 provides a brief
introduction to these related issues. The learning activities in
this unit consist primarily of readings.
Unit 4 is divided into two sections:
4.1Protection
4.2Security

Learning Objectives
When you complete Unit 4, you will be able to explain the
nature of protection and security problems of operating
systems, and discuss the protection features that are built into
operating systems and supporting hardware to enhance
security. You will also be able to describe the main
mechanisms used to ensure security, such as cryptography,
encryption/decryption, and authentication.

TOP

4.1Protection

Overview
Computer systems contain many objects that need to be
protected from misuse. Protection refers to mechanisms for
controlling access to objects such as programs, processes,
data, and fles. Protection can be regarded as internal security,
whereas security (discussed in Section 4.2) is external. This
section discusses the goals and principles of protection, and
introduces several mechanisms such as access matrix,
capability-based protection, and language-based protection.

Learning Outcomes
After you have completed Section 4.1, you should be able to
1. explain the nature of policies, mechanisms, and
domains of protection, and discuss the alternatives for
the representation of an access matrix.
2. explain revocation of access rights.
3. outline the main features, advantages, and
disadvantages of language-based protection.
4. discuss protection implementation, using an example
such as UNIX, Cambridge CAP, Hydra, or Java.

Reading Assignment

Operating system concepts (9th ed.): Chapter 14:


Protection: 14.1 to 14.9.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-4 above.

Key Concepts and Topics


protection policies and mechanisms
protection domain
domain switching
access matrix
access list
capability list
lock-key scheme
access control
capacity-based protection
language-based protection

Study Questions
1. Why is it important to distinguish between
mechanisms and policies of protection?
2. What are the differences between capacity-based
protection and language-based protection?

3. What is access matrix, and how is it implemented?

Learning Activities
Try Practice Exercises 14.1 and 14.5 to 14.10 of
OSC9ed. You may check the answers to these
questions at Operating System Concepts (9th ed.):
Solutions to Practice Exercises.
Download and review the PowerPoint slides or pdf for
Chapter 14 of OSC9ed.

TOP

4.2Security

Overview
Security is a much broader topic than protection. Security
requires not only an adequate protection system but also
consideration of the external environment within which the
system operates. Security measures aim to safeguard
computer systems against unauthorized access by intruders,
against malicious destruction, and against accidental
inconsistency.

Learning Outcomes
After you have completed Section 4.2, you should be able to
1. discuss security threats and attacks (viruses, Trojan
horses, trap doors, worms, human intruders, etc.).
2. explain the fundamentals of cryptography,
encryption/decryption, and authentication; and
examine their uses for security purposes.
3. outline some of the physical and human security issues
that are external to operating systems.

Reading Assignment
Operating system concepts (9th ed.): Chapter 15:
Security: 15.1 to 15.9.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-3 above.

Key Concepts and Topics


denial-of-service (DOS)
replay attack
man-in-the-middle attack

session hijacking
phishing
dumpster diving
back-door demon
Trojan horse
spyware
covert channels
trap door
logic bomb
virus
worm
zombie system
distributed DOS
cryptography
decryption
encryption
symmetric encryption
data encryption standard (DES)
advanced encryption standard (AES)
asymmetric encryption
RSA (Rivest, Shamir, and Adleman)
public key
private key
authentication
message-authentication code (MAC)
digital-signature
digital certifcate
certifcate authorities

SSL
session key
user authentication
security through obscurity
auditing, accounting, and logging
computer-security classifcation

Study Questions
1. What are the common program threats, and how can
people protect computer systems from these threats?
2. How can symmetric encryption and asymmetric
encryption help in authentication?
3. What are the user authentication methods, and how
are they effective?

Learning Activities
Try Exercises 15.2, 15.4, and 15.9 to 15.14 of OSC9ed.
Download and review the PowerPoint slides or pdf for
Chapter 15 of OSC9ed.

TOP

Supplementary Unit Activities


Explore surveys and technical documents about the
protection and security that an operating system
provides. Try to identify an existing problem of
interest and a possible solution to it. Check to see
whether this may be a suitable topic for Assignment 4
of this course.
You may also explore Linux kernel to see what
protection and security features are provided and how
they are realized. Share your fndings and opinions
with your classmates and tutor on the course
discussion forum.

TOP

Unit 5: Distributed, Real-Time, and Multimedia Systems

Unit Overview
Unit 5 provides an extension to the core topics of operating
systems. It introduces distributed systems and specialpurpose operating systems such as real-time systems and
multimedia systems. This extension introduces the everchanging information technologies and products in which

operating systems play an important role. In fact, with many


operating systems, different versions are developed for
different computing environments to meet the needs of
different applications. For instance, both Linux and Windows
have desktop, server, mobile, and embedded system versions
for different devices and applications. Note: The learning
activities in this unit consist primarily of readings.
Unit 5 is divided into two sections:
5.1Distributed Systems Overview
5.2Virtual Machines

Learning Objectives
When you complete Unit 5, you will be able to defne the terms
distributed operating system, distributed fle system (DFS),
and real-time computer system. You will move on to describe
the general structure of distributed systems and the way in
which real-time operating systems must be constructed to
meet stringent timing requirements. Finally, you will be able
to identify the characteristics of multimedia data and indicate
how multimedia operating systems can meet the requirements
of continuous-media data.

TOP

5.1Distributed Systems Overview

Overview
This section briefy introduces distributed systems and
discusses the general structures and interconnections in a
distributed system. This section also discusses concepts
directly related to distributed operation systems, such as
distributed fle systems (DFS).

Learning Outcomes
After you have completed Section 5.1, you should be able to
1. describe the overall structure of distributed systems.
2. discuss communications in a distributed system.
3. outline the particulars of a distributed fle system.

Reading Assignment
Operating system concepts (9th ed.): Chapter 17:
Distributed System.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-3 above.

Key Concepts and Topics


distributed system
network operating system
distributed operating system
data migration
computation migration
process migration
network structure
communication structure
naming
name resolution
routing
connection
contention
communication protocols
distributed fle system (DFS)
naming structures
name scheme
remote fle access
fle replication

Study Questions
1. What is a distributed operating system, and what are

the main tasks that a distributed system supports?


2. What is a distributed fle system, and what are the
naming schemes of DFS?

Learning Activities
Download and review the PowerPoint slides or pdf for
Chapter 17 of OSC9ed.

TOP

5.2Virtual Machines

Overview
This section covers types of virtual systems, and differences in
purpose and implementation. It is not that important to go
into details of memory management and tables, as much as
knowing general confgurations and structure.

Learning Outcomes
After you have completed Section 5.2, you should be able to

1. describe various virtual machines technologies.


2. describe methods used to implement virtualization.
3. list the most common hardware features that support
virtualization.

Reading Assignment
Operating System Concepts (9th ed.): Chapter 16:
Virtual Machines.
As you do the assigned reading, focus on the Key Concepts and
Topics outlined below to ensure that you can meet Learning
Outcomes 1-3 above.

Key Concepts and Topics


virtual machines
virtual machine manager (VMM)
hypervisor
Paravirtualization
Emulators
Disk partitioning
Xen
VMware
Live migration
Cloud computing

Virtual CPU (VCPU)


Page tables
Virtual machine control structure
Control partition
Java virtual machine (JVM)
Memory overcommitment
Network address translation (NAT)
Bytecode
Garbage collection

Study Questions
1. What are the three types of traditional virtualization?
2. What are four benefts of virtualization?

Learning Activities
Find some articles and technical documents on
modern virtual machines. Explain the reason behind
the recent success of virtual machines, although they
have been around for a long time. What forms of
virtualizations are expected in the future?
Download and review the PowerPoint slides or pdf for
Chapter 16 of OSC9ed.

TOP

Assessment

Assignment 4
Please submit Assignment 4 to your tutor, using the
designated Assignment Drop Box on your course homepage.
Assignment 4 is worth 20% of your fnal grade.

TOP

Supplementary Unit Activities


Explore surveys and technical documents about
distributed operating systems, and virtual machines.
Try to identify an existing problem of interest and a
possible solution to it. You may consider this problem
for Assignment 4 of the course.
Share your fndings and opinions with your classmates
and tutor on the course discussion forum.

TOP

Vous aimerez peut-être aussi