Upload
phungkhue
View
230
Download
7
Embed Size (px)
Citation preview
Chapter 1Computer System
OverviewSeventh Edition
By William Stallings
Operating Systems:Internals
and Design
Principles
HardwareBefore mid
ProcessBefore mid
SchedulingBefore and after mid
DeadlockBefore and after mid
MemoryAfter mid
Course Outline & Marks Distribution
Linux Scripting
C/C# programming
• Quizzes = 4 (each of 2.5 marks)• Assignments
– Programming =3 (each of 2 marks)– Reading/ writing=3 (each of 2 marks)– Term Report=1 (of 8 marks)
• Midterm • Final Term
Course Outline & Marks Distribution
Text Book: Operating Systems by William StallingReference: 1. Tanenbaum's "Modern Operating Systems", 2nd or 3rd Edition
2. Operating System Principles (7th edition) by Silberschatz
The students will be able to:• Learn the role of system software’s • Learn the theory of how operating systems are constructed.• Develop practical skills that can help to understand and to
modify the coding of operating systems(Minix, Unix)• Learn the use of middleware in the combination with
Operating systems.• Acquire the knowledge of various kinds of operating systems• Learn the concept of THREADS that will be helpful for the
students interested in CLIENT-SERVER applications.
Objectives
What we learn this week.üWhat is an Operating System?üBasic Elements.üInstruction Execution.üInterruptüI/OüMemory
Internals and Design Principles
Operating System
• An operating system (OS) is the interface between the user and the hardware
• An OS provides standard services (System calls ) which are implemented on the hardware, including:
• Processes , I/O devices , CPU scheduling, memory management, file system, networking
• A Manager — allocates resources efficiently and fairly, protects users from each other, provides safe and secure communication
Goals of Operating SystemSystem view
Goals of Operating System
• Exploits the hardware resources of one or more processors (cores)
Goals– Execute user programs and make
solving user problems easier.– Make the computer system convenient to use.– To use the computer hardware in an efficient
manner.
Convenience
Efficiency
Logical UnitsGraphical Processing Unit: Provide efficient computation on arrays of data using Single-Instruction Multiple Data (SIMD) techniques . Used for general numerical processing .Physics simulations for games . Computations on large spreadsheets
Digital Signal Processor: Deal with streaming signals such as audio or video. Used to be embedded in devices like modems. Encoding/decoding speech and video .Support for encryption and security
System on a Chip: Components such as DSPs, GPUs, codecs and main memory, in addition to the CPUs and caches, are on the same chip
Instruction Execution
A program consists of a set of instructions stored in memoryProcessorReads the instructionFrom main memory
ProcessorExecutes each instruction
A CPU Cycle refers to a single pulse of the computer clock. For example, a 4 Mhz CPU will have 4 million CPU cycles per second.
Characteristics of a Hypothetical Machine
Program Execution
load 940
add 941
Store 940
Interrupts
•Deviation from the normal sequencing of theprocessing•Provided to improve processor utilization
ü most I/O devices are slower than the processor
ü processor must pause to wait for deviceü wasteful use of the processor
Program Timing: Short I/O Wait
Example Time Sequence of Multiple Interrupts
Memory Hierarchy
Major constraints in memoryÆamountÆspeedÆExpense (cost)
Less capacity, Fast access speedGreater capacity, Slower access speed
Memory Types
1. Registers 1 KB 2. Cache (SRAM) 1 MB 3. Main Memory 512 MB 4. Disk 40 GB5. Magnetic tape 1TB6. Removable media 4GB
Secondary Memory:Also referred to as auxiliary memoryüExternalüNonvolatileüUsed to store program and data files
Cache is the smallest memory placed between main memory and processorü Invisible to OSüContains a copy of a portion of
main memoryüProcessor first checks cache
Primary memory is computer memory that is accessed directly by the CPU
Cache and Main Memory
Disk Cache:A portion of main memory used as buffer to (temporarily) hold data (for disk)
Main categories
are:
cache size
block size
mapping function
replacement algorithm
write policy
number of cache levels
DMADirect Memory access
CPU
Memory
Device
Cache
1- Transfers a block of memory w/o going through CPU
2- Interrupt is sent when task is done.
3- CPU involves in the beginning &ending4- Free to perform other operations
More efficient than interrupt-driven or programmed I/O
Multicore ComputerMulticore ComputernAlso known as a chip multiprocessor
nCombines two or more processors (cores) on a single piece of silicon (die)n each core consists of all of the components of
an independent processor
n In addition, multicore chips also include L2 cache and in some cases L3 cache
Intel Intel Core i7Core i7
Figure 1.20 Intel Corei7 Block Diagram
Summary
qBasic Elements•processor, main memory, I/O modules, system bus
qGPUs, SIMD, DSPs, SoC
qInstruction execution•processor-memory, processor-I/O, data processing, control
qInterrupt/Interrupt ProcessingqMemory HierarchyqCache/cache principles and designsqMultiprocessor/multicore