Introduction to Python II Fall 2013 Carola Wenk Where do programs - - PowerPoint PPT Presentation

introduction to python ii
SMART_READER_LITE
LIVE PREVIEW

Introduction to Python II Fall 2013 Carola Wenk Where do programs - - PowerPoint PPT Presentation

Introduction to Python II Fall 2013 Carola Wenk Where do programs live? Hard Drive lw $t0, 1 lw $t1,0 lw $t2, n CPU Memory loop: bgt $t0,$t2,done add $t0, $t1, $t1 add $t0, 2 jmp loop done: Where do programs live? Hard


slide-1
SLIDE 1

Introduction to Python II

Fall 2013 Carola Wenk

slide-2
SLIDE 2

Where do programs “live”?

Memory Hard Drive CPU

lw $t0, 1 lw $t1,0 lw $t2, n loop: bgt $t0,$t2,done add $t0, $t1, $t1 add $t0, 2 jmp loop done:

slide-3
SLIDE 3

Where do programs “live”?

Memory Hard Drive CPU

lw $t0, 1 lw $t1,0 lw $t2, n loop: bgt $t0,$t2,done add $t0, $t1, $t1 add $t0, 2 jmp loop done:

How is the program executed once it is stored on the disk drive?

slide-4
SLIDE 4

Where do programs “live”?

Memory Hard Drive CPU How is the program executed once it is stored on the disk drive? How do we choose a program to run?

slide-5
SLIDE 5

Where do programs “live”?

Memory Hard Drive CPU On modern computers, a program called the operating system is in charge of running one or more programs on the CPU. Each software program being executed is given appropriate access to system resources (e.g., memory, disk, I/O).

Operating System

slide-6
SLIDE 6

Operating System History

Computer programs were first manually loaded and executed on

  • mainframes. “Terminals” became popular in the 1970s as CRTs

became inexpensive.

slide-7
SLIDE 7

Operating System History

In the early 1980s, the concept of a graphical user interface became an integral component of operating systems. The graphical component of software is just a layer that is useful for input/output.

slide-8
SLIDE 8

Where do programs “live”?

Hard Drive CPU sum = 0 for i in range(1,n+1,2): sum += i Memory

Operating System

Compiler Interpreter

The compiler / interpreter is specific to an operating system and creates binary executables in the correct format.

slide-9
SLIDE 9

Python Programming

Operating System

Python Interpeter

sum = 0 for i in range(1,n+1): sum += i

Python is an “interpreted” language, so each statement is executed one at a time by the interpreter.

>>> 2+24 26

  • r