Académique Documents
Professionnel Documents
Culture Documents
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 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:
Course Outline
TOP
The Study Guide for COMP 314 consists of the following fve
units:
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
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.
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
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.
TOP
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
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
TOP
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
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
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)?
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.
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
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
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.
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.
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
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.
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
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.
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
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
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.
TOP
Unit Overview
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,
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
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.
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.
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
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.
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.
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
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.
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
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.
Study Questions
1. Why is it important to learn to handle deadlock issues?
2. What are the necessary conditions for a deadlock to
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
TOP
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
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
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
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.
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
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.
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?
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
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.
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.
Study Questions
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,
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.
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?
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
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.
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
TOP
Unit Overview
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
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?
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.
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
TOP
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
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
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.
Study Questions
1. What is a distributed operating system, and what are
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
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.
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
TOP