































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of computer hardware, focusing on cpu state, synchronization, and interrupt handling. It includes information on user and non-user registers, processor status registers, floating point number registers, and the story of getpid(). Students of the 15-410 course at carnegie mellon university will find this document useful for understanding the concepts of cpu state and interrupt handling.
Typology: Slides
1 / 39
This page cannot be seen from the preview
Don't miss anything!
15-410, F’
Dave Eckhardt
Dave Eckhardt
Garth Gibson
Garth Gibson
L04_Hardware
15-410, F’
Partner signups
Partner signups
11 group signups so far – thanks!
Please sign up as soon as you decide!
This helps other students
Both partners please sign up!
This helps course staff detect “love triangles”
15-410, F’
Personal Simics licenses
Personal Simics licenses
Simics machine-simulator software is licensed
We have enough “seats” for the class
Should work on most CMU-network machines
Will not work on most non-CMU-network
machines
CMU operates a VPN server for off-campus users
»
http://www.cmu.edu/computing/network/vpn
»
There is an open-source alternative (OpenConnect)
15-410, F’
Simics on Windows?
Simics on Windows?
Simics simulator itself is available for Windows
15-410 build/debug infrastructure is not
Can be hacked up, issues may arise
»
Version skew, partner, ...
Options
Options
Dual-boot Linux/Windows, run Linux in VMware
Usability via X depends on network latency
May be too slow – though we are experimenting
Port to cygwin (may be non-trivial)
There are some cluster machines...
WeH 5205/5207, GHC 3000, GHC 5201/
15-410, F’
15-410, F’
AGP Graphics
15-410, F’
User registers (on Planet IA32)
User registers (on Planet IA32)
General purpose - %eax, %ebx, %ecx, %edx
Stack Pointer - %esp
Frame Pointer - %ebp
Mysterious String Registers - %esi, %edi
15-410, F’
Non-user
Non-user registers, a.k.a....
registers, a.k.a....
Processor status register(s)
Processor status register(s)
Currently running: user code / kernel code?
Interrupts on / off
Virtual memory on / off
Memory model
small, medium, large, purple, dinosaur
15-410, F’
Time for some fairy tales
Time for some fairy tales
The getpid() story (shortest legal fairy tale)
The read() story (toddler version)
The read() story (grade-school version)
15-410, F’
User process is computing
User process is computing
User process calls getpid() library routine
Library routine executes TRAP $
In Intel-land, TRAP is called “ INT ” (because it
isn't one)
REMEMBER: “ INT ” is not an interrupt
The world changes
The world changes
Some registers dumped into memory somewhere
Some registers loaded from memory somewhere
The processor has
The processor has entered kernel mode
entered kernel mode
15-410, F’
15-410, F’
15-410, F’
Process runs in kernel mode
Process runs in kernel mode
running->u_reg[R_EAX] = running->u_pid;
Return from interrupt”
Return from interrupt”
Processor state restored to user mode
(modulo %eax)
User process returns to computing
User process returns to computing
Library routine returns %eax as value of getpid()
15-410, F’