Operating Systems

Download Report

Transcript Operating Systems

COSC1078 Introduction to
Information Technology
Lecture 18
Operating Systems
James Harland
[email protected]
Lecture 18: Operating Systems
Intro to IT
Introduction to IT
1 Introduction
2 Images
3 Audio
4 Video
5 Binary Representation
WebTest 1, Assignment 1
6 Data Storage
7 Machine Processing
8 Review
WebLearn Test 2
9 Processes
Assignment 2
10 Internet
11 Internet Security
WebLearn Test 3
12 Future of IT
Assignment 3, Peer and Self Assessment
Lecture 18: Operating Systems
Intro to IT
Overview
 Questions?
 WebTests
 Assignments 1, 2 & 3
 Operating Systems
 CES Survey
Lecture 18: Operating Systems
Intro to IT
Who is this?
Cecily Walker
Teaching and Learning
Advisor
12.10.41
[email protected]
Will administer survey
towards the end of the
lecture ….
Lecture 18: Operating Systems
Intro to IT
WebTests 2 & 3
 Will expire after 1 hour (even if saved)
 Different to Web Test 1
 Tests not intended to be save for long …
 WebTest 3 allows 2 attempts
Lecture 18: Operating Systems
Intro to IT
Assignments
 Assignment 1 still being marked  Most are done,
though
 Assignment 2:
make sure you justify upgrading or not upgrading
No `right’ answer
Submit via Blackboard
 Assignment 3: start thinking about topic
Lecture 18: Operating Systems
Intro to IT
Processes
Lecture 18: Operating Systems
Intro to IT
Processes
A program is a static set of
instructions
A processes is the execution
of a program, which changes
state over time.
Lecture 18: Operating Systems
Intro to IT
Processes Switching
Ready
Scheduler maintains
process table
Ready
Waiting
Lecture 18: Operating Systems
Intro to IT
Processes Switching
Lecture 18: Operating Systems
Intro to IT
Interrupts
 Signals to the CPU
 Often generated by timing circuits
 CPU reacts by jumping to appropriate memory
location
 Dispatcher
 selects a ready process
 resets timing circuit
 starts process
 CPUs often designed to switch process states
efficiently
Lecture 18: Operating Systems
Intro to IT
Interrupts
 Provide mechanism to switch processes
 CPU doesn’t have to wait for I/O transfers
 Switching leads to faster throughput
 `Save document’ means CPU does something
else while the save takes place
Lecture 18: Operating Systems
Intro to IT
Processes Executing in Context
Processor
BB
Program
Counter
Memory
00
BB
Disk
ROM
RAM
Instruction
Register
Lecture 17: Operating Systems
Intro to IT
``Thomas, you wouldn’t! Naughty!’’
Processor
BB
Program
Counter
Memory
00
BB
Disk
ROM
RAM
Instruction
Register
Lecture 17: Operating Systems
Intro to IT
``Thomas, you wouldn’t! Naughty!’’
Processor
BB
Program
Counter
Memory
00
BB
Disk
ROM
RAM
Instruction
Register
Lecture 17: Operating Systems
Intro to IT
``Thomas, you wouldn’t! Naughty!’’
Processor
BB
Program
Counter
Memory
00
BB
Disk
ROM
RAM
Instruction
Register
Lecture 17: Operating Systems
Intro to IT
Memory Management
Memory
Disk
STOP IT!
Mine!
Mine!
Mine!
Lecture 18: Operating Systems
Intro to IT
Virtual Memory
What if memory requirements exceed
memory size?
 Pretend we have more!
 Shuffle required parts (pages) between
disk and memory
 Not every memory cell is needed all the
time…
Lecture 18: Operating Systems
Intro to IT
Virtual Memory
P
r
o
c
e
s
s
s
o
r
Virtual
Memory
Lecture 18: Operating Systems
Physical
Memory
Intro to IT
Disk
Co-ordination and locking
MINE!
MINE!
MINE!
Works fine for one resource …
Lecture 18: Operating Systems
Intro to IT
Deadlock
BORING!
Deadlock: neither can get both resources
Lecture 18: Operating Systems
Intro to IT
Deadlock requirements
Deadlock requires:
1. Competition for nonshareable resources
2. Processes request multiple resources
sequentially
3. Resources cannot be forcibly retrieved
Avoid deadlock by preventing 1 or 2
Detect and correct deadlock by falsifying 3
Lecture 18: Operating Systems
Intro to IT
Deadlock avoidance
Spooling makes nonshareable resources look like
shareable ones …
Lecture 18: Operating Systems
Intro to IT
Operating Systems
 Highly complex software systems
 30-40 million lines of code
 Lots of processes associated with them
 Probably most sophisticated software ever
written
 Not many of them around …
Lecture 18: Operating Systems
Intro to IT
Operating Systems
Lecture 18: Operating Systems
Intro to IT
Conclusion
 Work on Assignment 2
 Start Assignment 3
 Web Quizzes and Web Test 3
 Finish reading book!
Lecture 18: Operating Systems
Intro to IT
Survey time!
Cecily Walker
Teaching and Learning
Advisor
12.10.41
[email protected]
Lecture 18: Operating Systems
Intro to IT