Building and running programs - PowerPoint PPT Presentation

About This Presentation
Title:

Building and running programs

Description:

Display. Disk. I/O bus. Expansion slots for. other devices such. as network adapters ... prints 'hello, worldn' string on display. 1. User types 'hello' at the ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 14
Provided by: david2212
Learn more at: https://www.cs.uaf.edu
Category:

less

Transcript and Presenter's Notes

Title: Building and running programs


1
printf.o
Pre- processor (cpp)
Compiler (cc1)
Assembler (as)
Linker (ld)
hello.i
hello.s
hello.o
hello
hello.c
Source program (text)
Assembly program (text)
Modified source program (text)
Relocatable object programs (binary)
Executable object program (binary)
2
CPU
Register file
ALU
PC
System bus
Memory bus
Main memory
I/O bridge
Bus interface
I/O bus
Expansion slots for other devices such as network
adapters
USB controller
Disk controller
Graphics adapter
Mouse
Keyboard
Display
Disk
hello executable stored on disk
3
CPU
Register file
ALU
PC
System bus
Memory bus
Main memory
"hello"
I/O bridge
Bus interface
I/O bus
Expansion slots for other devices such as network
adapters
USB controller
Disk controller
Graphics adapter
Mouse
Keyboard
Display
Disk
User types "hello"
4
CPU
Register file
ALU
PC
System bus
Memory bus
Main memory
"hello,world\n"
I/O bridge
Bus interface
hello code
I/O bus
Expansion slots for other devices such as network
adapters
USB controller
Disk controller
Graphics adapter
Mouse
Keyboard
Display
Disk
hello executable stored on disk
5
CPU
Register file
ALU
PC
System bus
Memory bus
Main memory
"hello,world\n"
I/O bridge
Bus interface
hello code
I/O bus
Expansion slots for other devices such as network
adapters
USB controller
Disk controller
Graphics adapter
Mouse
Keyboard
Display
Disk
hello executable stored on disk
"hello,world\n"
6
CPU chip
Register file
L1 cache (SRAM)
ALU
Cache bus
System bus
Memory bus
Main memory (DRAM)
Memory bridge
Bus interface
L2 cache (SRAM)
7
L0
Smaller, faster, and costlier (per byte) storage
devices
Registers
CPU registers hold words retrieved from cache
memory.
On-chip L1 cache (SRAM)
L1
Off-chip L2 cache (SRAM)
L2
Main memory (DRAM)
L3
Larger, slower, and cheaper (per
byte) storage devices
Local secondary storage (local disks)
L4
Remote secondary storage (distributed file
systems, Web servers)
L5
8
Application programs
Software
Operating system
Processor
Main memory
I/O devices
Hardware
9
Processes
Virtual memory
Files
Processor
Main memory
I/O devices
10
shell process
hello process
Time
Application code
Context switch
OS code
Application code
Context switch
OS code
Application code
11
Memory invisible to user code
0xffffffff
Kernel virtual memory
0xc0000000
User stack (created at runtime)
Memory mapped region for shared libraries
printf() function
0x40000000
Run-time heap (created at runtime by malloc)
Read/write data
Loaded from the hello executable file
Read-only code and data
0x08048000
Unused
0
12
CPU chip
Register file
ALU
PC
System bus
Memory bus
Main memory
I/O bridge
Bus interface
Expansion slots
I/O bus
USB controller
Network adapter
Disk controller
Graphics adapter
Mouse
Keyboard
Monitor
Disk
Network
13
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com