Skip to content

Latest commit

 

History

History

jeongwoo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Overview: The Mental Landscape

1.1 The Fetch and Execute Cycle : Machine Language

CPU - Central Processing Unit(중앙처리 장치)
  • CPU contains an ARU(Arithmetic Logic Unit) and small number of registers

  • also includes special purpose register

  • PC(Program Counter)

  • CPU uses the PC(Program Counter) to keep tack of where it is in the program it is executing

RAM(메인 메모리)
  • When the CPU executes a program, that program is stored in the computer’s main memory(RAM(Random Acess Memory))

  • Mainmemory consists of a sequence of locations

  • This location is called its address

program(프로그램)
  • a list of instructions

  • Each Type of Computer has its own machine language

Transistors(트랜지스터)
  • Each zero or one is called a bit

  • each memory location holds a byte(In modern computers) - 8bit

  • The memory address of the instruction is the address of the first of those bytes

1.2 Asynchronous Events : Polling Loops and Interrupts

  • CPU spends almost all of its time fetching instructions from memory and executing them.

  • Network intercace that allows the computer to communicate with other computers that are connected to it on a network, either wirelessly or by wire.

  • Scanner that converts images into coded binary numbers that can be stored and manipulated on the computer

  • Somehow the CPU has to communicate with and control all these devices. - use device driver

  • A computer system consiting of many devices is typically organized by connecting those devices to one or more busses

Polling(폴링)
  • CPU to keep checking for incoming data over and over

  • This is very Simple, also very inefficient

Interrupts(인터럽트)
  • An interrupt is a signal sent by another device to the CPU

Asynchronous events(비동기 이벤트)
  • In the regular fetch-and-execute cycle, things happen in a predetermined order → happen synchronized

  • But Interrupts make it possible for the CPU to deal efficiently with events that happen 'asynchronously' → unpredictable times

multitasking and timesharing(멀티 태스킹과 시분할)
  • All modern computers use multitasking to perform several tasks at once

  • CPU is so fast, it can quickly switch its attention from one user to another, devoting a fraction of a second to eacch user in turn. - called timesharing.

Thread(스레드)
  • Each of the individual tasks that the CPU is working on is called a thread

  • can yield control

  • While it is waiting → blocked

  • Most computers cam "forcibly" suspend a thread in this way → preemptive multitasking

1.3 The Java Virtual Machine

  • Java, Python, C++ → high-level programming languages

  • high-level → machine language (from compiler)

Compiler(컴파일러)
  • Which translates the program all at once

Interpreter(인터프리터)
  • Which translates it instruction by instruction, (necessary)

JVM
  • Java has compiler and Interpreter

  • JIT Compiler

    • JIT Compiler stored compiled code → Compiler

    • stored code use → Interpreter

    • 2 개의 컴파일러

    • Level 1~3 단순 컴파일 - 컴파일러 1

    • Level 4 컴파일, 캐싱 - 컴파일러 2

1.4 Fundamental Building Blocks of Programs

Programing(프로그래밍은 (두 가지 측면을 가짐))
  • data and instructions

Variable(변수)
  • memory location

  • have types

Subroutine(서브루틴)
  • A subroutine consists of the instructions for performing some task

1.5 Objects and Object-orieted Programming

Object
  • Which is a kind of module containing data and subroutines.

1.7 The Internet and Beyond

  • Computers can be connected together on networks

  • Internet has an IP address ⇒ converter ⇒ domain (use name not number)

Protocol (프로토콜)
  • For communication over the Internet.

  • Internet Protocol(IP)

  • Transmission Control Protocol(TCP)

Packets
  • All communication over the Internet is in the form of packets.

SMTP(Simple Mail Transfer Protocol)
  • to transfer email messages from one computer to another.