Download Review for Quiz-1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Review for Quiz-1
Applied Operating System Concepts
Patterson & Hennessy
Chap.s 1,2,6,7
ECE3055b, Spring 2005
http://www.csc.gatech.edu/copeland/jac/3055/ppt/Review%20for%20Quiz-1.ppt
What is an Operating System?
• A program that acts as an intermediary between a
user of a computer and the computer hardware.
• Operating system goals:
– Execute user programs and make solving user
problems easier.
– Make the computer system convenient to use.
• Use the computer hardware in an efficient manner.
• Make it easy to write programs by handling common
tasks like text editing and file-selection dialog boxes.
2
What characterizes the following OS types?
• Simple Batch Systems
• Multiprogramming Batched Systems
• Time-Sharing Systems
• Personal-Computer Systems
• Parallel Systems
• Distributed Systems
• Real -Time Systems
• Clustered Systems
3
Computer System Components
1. Hardware – provides basic computing resources
(CPU, memory, I/O devices).
2. Operating system – controls and coordinates the use
of the hardware among the various application
programs for the various users.
3. Applications programs – define the ways in which
the system resources are used to solve the computing
problems of the users (compilers, database systems,
video games, business programs).
4. Users (people, machines, other computers).
4
OS Features Needed for
Multiprogramming
• I/O routine supplied by the system.
• Memory management – the system must
allocate the memory to several jobs.
• CPU scheduling – the system must choose
among several jobs ready to run.
• Allocation of devices.
Types:
Batch, Parallel, Real Time, Interactive (special features)
5
Computer System Environments
• Traditional computing
– PCs, Servers, limited remote access
• Web-Based Computing
– Client-server and web services, convenient
remote access, location-less servers
• Embedded Computing
– Most computers (auto engine controllers,
microwaves)
– Very limited operating system features
– Little or no user interface, remote access
6
Instruction Set Architecture - Must Match CPU Architecture
C code:
X=Y+Z;
Assembly (for MIPS):
lw $8, Y
lw $9, Z
add $10, $8, $9
sw $10, X
Machine Language (for MIPS, “add $10, $8, $9”):
000000 01000 01001 01010 00000 100000
opcode reg-a reg-b reg-w
alu-function
In decimal: op=0, rs=8, rt=9, rd=10, shamt=0, addr/funct=32
MIPS is a RISC. All machine instructions are 32-bits long.
(Name a CISC computer architecture)
7
The Power of Computing comes from Decisions (if’s) and
Iteration (loops and arrays)
Branches (relative, conditional*)
Jumps (absolute address, non-conditional*)
Subroutine calls (return to instruction after call)
* feature of MIPS architecture
(How are arrays positioned in memory?)
8
Memory Addressing Modes
Register (32-bit absolute).
Offset ( 16-bit offset, sign extend, add to 32-bit base from
register).
Instruction Addressing ( 16-bit offset, sign extend, multiply by
4 ("<<2") add to 32-bit base from PC register).
9
Finite-State Machine - PLA (programmable logic array)
Orange dots are AND gates
Op5
Op4
Op3
Op2
Op1
Op0
State3
State2
State1
State0
"1"
Output
PCWrite
PCWriteCond
IorD
MemRead
MemWrite
IRWrite
MemtoReg
PCSource1
PCSource0
ALUop1
ALUop0
ALUsrce1
ALUsrce0
ALUsrce
RegWrite
RegDst
NextState3
NextState2
NextState1
NextState0
10
Pipelining
• Improve performance by increasing instruction throughput
Cycles can be different time durations.
Cycle always the longest time duration.
Ideal speedup is number of stages in the pipeline. Do we achieve this?
What reduces the speedup that is possible?
11
Pipelining Problems
Hazards
–structural hazards: suppose we had only one memory
–control hazards: need to worry about branch instructions
–data hazards: an instruction depends on a previous
instruction (a "Dependency)
What is a "Stall", when is it needed?
What is a "Flush", when is it needed? (Branching, Exceptions,
Subroutine call)
Software Solution: Where do we insert the “nops” ?
sub
and
or
add
sw
$2, $1, $3
$12, $2, $5
$13, $6, $2
$14, $2, $2
$15, 100($2)
What is "Dynamic Scheduling", "Superscalar Architecture"?
12
Memory Hierarchy
What are the three main levels of memory hierarchy found
in modern PC's?
What is "temporal locality", "spatial locality"? How do
they help us?
How do the following work:
Direct mapped cache
Wide-memory (cache) organization
What does the "Valid bit", "Index", and "Tag" do when
looking for data in the cache?
13
Related documents