1
Operating Systems
/.102
2
Main
memory
I/O
bridge
Bus interface
ALU
Register file
CPU
System bus Memory bus
Disk
controller
Graphics
adapter
USB
controller
MouseKeyboard Display
Disk
I/O bus
Expansion slots for
other devices such
as network adapters
hello executable
stored on disk
PC
Computer Architecture
3
8.1
1
2
3
8.2
1
2
8.3
8.4
8.5
4
l
l
l
l
5
n
int main(int argc, char* argv[])
{
int i , to, sum = 0;
to = atoi(argv[1]);
for(i=1; i<=to; i++)
{
sum = sum + i;
}
printf(“%d”, sum);
}
n