Upload
saranyu-srisrontong
View
220
Download
1
Tags:
Embed Size (px)
DESCRIPTION
com sci major
Citation preview
Basic Computer Systems Design
& Architecture01418114 – Introduction to Computer Science
Prasertsak U., Ph.D
Computer Architecture
• Von Neumann Architecture
2
The input unit - moves data from the outside into the computer.
The output unit -moves results from inside the computer to the outside
The control unit -acts as the stage unit to ensure that all the other components act in concert.
The arithmetic/logic gate unit - performing arithmetic and logic operations on data
The memory unit - holds both data and instructions
Memory
Address Contents
00000000 11100011
00000001 01010101
… …
11111100 00000000
11111101 11111111
11111110 10101010
11111111 00110011
3
Memory is a collection of cells, each with a unique physical
address. For example, if the addressibility is 8, and there are 256 cells of memory, the cells would be addressed as follows:
The bits in address 1111110 are
numbered as follows:
Memory Hierarchy
4
Picture from: http://people.nas.nasa.gov/
Memory Access Time
5
Picture from: http://www.embedded.com/
Control Unit
6
There are two special registers in the control unit. • Program Counter (PR)• Instruction Register (IR)
BUS
7
A communication system that transfers data between components inside a computer, or between computers
Multi-core processor
8
In consumer technologies, multi-core is usually the term used to describe two or more CPUs working together on the same chip.
Parallelism and Performance in Multi-Core CPUs
9
สถาปัตยกรรมคอมพิวเตอร์แบบ Centralized System
• บางคร้ังเรียกวา่ Host Based System หรือแบบรวมศูนย ์เป็นสถาปัตยกรรมแบบรองรับผูใ้ชห้ลายคน โดยทุกคนจะใชท้รัพยากรต่าง ๆ ร่วมกนั แบบ Time Sharing
เคร่ืองคอมพิวเตอร์ ณ ส่วนกลางจะเป็นเคร่ืองขนาดใหญ่ เช่น Server Computer
หรือ Mainframe Computer
10
ข้อดี / ข้อเสีย ของการประมวลผลแบบรวมศนูย์
• ขอ้ดี▫ การติดตั้งระบบ หรือโปรแกรมต่าง ๆ ท าไดง่้าย เน่ืองจากสามารถติดตั้ง ณ ศูนยก์ลาง
เพียงจุดเดียว▫ การควบคุมต่าง ๆ ท าไดง่้าย▫ สะดวกในการจดัการขอ้มูลและเรียกใชข้อ้มูล เช่น การรวบรวมขอ้มูลเพื่อออกรายงาน
หรือติดตามความเคล่ือนไหวต่าง ๆ ท าไดร้วดเร็ว เน่ืองจากขอ้มูลพร้อมอยูแ่ลว้ ณ ส่วนกลาง
▫ การรักษาความปลอดภยัท าไดง่้าย
11
ข้อดี / ข้อเสีย ของการประมวลผลแบบรวมศนูย์
• ขอ้เสีย▫ อาจเกิดปัญหา Single point of Failure (ความลม้เหลวของจุดเดียว) เน่ืองจาก
หากระบบส่วนกลางล่ม จะท าใหร้ะบบโดยรวมล่มทั้งหมด จึงมีความเส่ียงสูง▫ ท างานไดช้า้ลงเม่ือมีจ านวนผูใ้ชเ้พิ่มมากข้ึน เน่ืองจากอาจเกิดจากปัญหาคอขวด
(Bottle Neck) ของระบบ▫ ค่าใชจ่้าย ในการด าเนินการสูง▫ การปรับเปล่ียนหรือเพิ่มเติมศกัยภาพของระบบ เป็นเร่ืองใหญ่และใชทุ้นสูง
12
สถาปัตยกรรมคอมพิวเตอร์แบบ Decentralized System
• มีลกัษณะการท างานคลา้ยกบัแบบรวมศูนย ์แต่ศูนยร์วมไม่ไดมี้จุดเดียวเกิดจากการแยกตวัของหน่วยงานออกเป็น เขตหรือภาคท าใหเ้กิดความตอ้งการในการกระจายระบบการท างานออกไป แต่ยงัคงเช่ือมต่อขอ้มูลระหวา่งกนั
13
สถาปัตยกรรมคอมพิวเตอร์แบบ Distributed System
• สถาปัตยกรรมแบบกระจาย เกิดข้ึนเน่ืองจากตอ้งการลดขนาดของการท างานณ ศูนยก์ลางใหเ้ลก็ลง เพื่อประหยดัค่าใชจ่้าย และเน่ืองจากการส่ือสารท าได้รวดเร็วข้ึน เคร่ืองคอมพิวเตอร์มีประสิทธภาพมากข้ึน การกระจายการท างานออกไปยงัส่วนต่าง ๆ จึงสามารถท าไดโ้ดยไม่ท าใหง้านเกิดปัญหา และยงัเป็นการช่วยกนัท างานไปพร้อมกนัได้
14
ข้อดี / ข้อเสีย ของการประมวลผลแบบกระจาย
• ขอ้ดี▫ ใชเ้วลาในการตอบสนองเร็ว เน่ืองจากไม่ตอ้งรอการประมวลผลจากศูนยก์ลาง▫ ลดตน้ทุนตวัประมวลผลกลาง▫ ระบบน่าเช่ือถือมากข้ึน เน่ืองจากทนต่อความผดิพลาดไดดี้ เม่ือหน่วยใดไม่สามารถ
ท างานได ้หน่วยอ่ืน ๆ จะไม่กระทบ สามารถท างานต่อไปได้▫ แบ่งปันทรัพยากรร่วมกนั ไดมี้ประสิทธิภาพมากข้ึน เน่ืองจากระบบมีขนาดเลก็ลง
• ขอ้เสีย▫ การดูแลรักษาท าไดย้ากข้ึน เน่ืองจากมีการกระจายตวัของระบบไปตามจุดต่าง ๆ ▫ ความถูกตอ้งของขอ้มูล อาจเกิดผลกระทบเน่ืองจากขอ้มูลกระจายอยูห่ลายจุด▫ การรักษาความปลอดภยัขอ้มูลท าไดย้ากมากข้ึน
15
สถาปัตยกรรมการท างานแบบ Client-Server
• เป็นการแบ่งการท างานออกเป็น 2 ส่วน ไดแ้ก่ ส่วนใหบ้ริการ (Server) และส่วนขอใชบ้ริการ (Client) ซ่ึงกระบวนการประมวลผลจะเนน้หนกัในส่วนของ Server จากนั้นจึงส่งผลลพัธ์ท่ีไดก้ลบัไปยงัผูข้อใชบ้ริการ ซ่ึงโดยส่วนมากจะตอ้งมีการร้องขอใชบ้ริการมาจากฝ่าย Client
ก่อนจากนั้น Server จึงตอบสนองความตอ้งการนั้นกลบัไป (Response)
16
สถาปัตยกรรมการท างานแบบ Cluster-Server
• เป็นการแบ่งการท างานในส่วนใหบ้ริการ (Server) เพิ่มข้ึนมากกวา่ 1 จุด โดยในแต่ละจุดท างานเหมือนกนั เน่ืองจากตอ้งการ 1) รองรับการขอใชบ้ริการจ านวนมาก 2) เพื่อใหท้นต่อความผดิพลาดท่ีเกิดข้ึน เช่น
17
สถาปัตยกรรมการท างานแบบ Cluster-Server (ตอ่)
• แนวทางการติดตั้งเคร่ืองใหบ้ริการ (Server) เพื่อใหท้นต่อความผดิพลาดท่ีเกิดข้ึน และเพื่อแบ่งการท างานไม่ใหห้นกัมากเกินไป
18
สถาปัตยกรรมคอมพิวเตอร์แบบ Peer-to-Peer (P2P)
• P2P คืออะไร - “Peer-to-Peer เป็นระบบ Self organizing โดยปราศจากการควบคุมจากศูนยก์ลาง และประกอบไปดว้ยเพียร์ (Peer) ท่ีสามารถแชร์ทรัพยากร (resource) ให้กบัเพียร์อ่ืนๆเขา้มาใชง้านได”้
19
น าเสนอโดย http://javaboom.wordpress.com/ อา้งอิงจาก: A. Oram et al., Peer-to-Peer:Hardnessing the Power of
Disruptive Technologies, Oreilly, 2001
สถาปัตยกรรมคอมพิวเตอร์แบบ Peer-to-Peer (P2P)
• Robust - คงทน ไม่ล่มง่าย ๆ เม่ือมี Peer ใดออกจากการเช่ือมต่อ ระบบโดยรวมยงัคงท างานต่อไปได้
• High Availability - ระบบจะใชก้ารท าซ ้ าขอ้มูล (Redundancy) เพื่อช่วยใหข้อ้มูลกระจายตวัอยูใ่นเครือข่าย และสามารถใชแ้ทนกนัไดเ้ม่ือตอ้งการ จึงท าใหค้วามพร้อมในการใชง้านสูง
• Load Balancing - ระบบสามารถช่วยแบ่งภาระการท างานออกไปไดดี้ เม่ือมีคนตอ้งการขอ้มูลเดียวกนัมาก ๆ ขอ้มูลท่ีกระจายอยูใ่น Peer ต่าง ๆ จะถกูน ามาใชเ้พื่อช่วยกนัแบ่งปันใหก้บัผูท่ี้ตอ้งการ จึงเป็นการช่วยแบ่งเบาภาระการท างานไดอ้ยา่งดี
• มีความเป็นอิสระสูง (High Freedom) เน่ืองจากไม่มี Admin ในระบบ ไม่มีศนูยก์ลางในการควบคุม การเขา้ออกจากระบบสามารถท าไดโ้ดยอิสระ ซ่ึงไม่ท าใหร้ะบบล่ม ดงันั้นจึงมีความยดืหยุน่และอิสระสูง
20
อา้งอิงจาก http://javaboom.wordpress.com/
Peer-to-Peer Example in Network
• Napster Architecture▫ Centralized Indexing
▫ Centralized Searching
21
Peer-to-Peer Example in Network
• Gnutella & BitTorrent
22
สถาปัตยกรรมการท างานแบบ Client-Server ในลกัษณะ Web Based• การท างานแบบ Web Based นั้นมีลกัษณะการท างานแบบ Client-Server
แบ่งออกเป็น 3 ลกัษณะ ไดแ้ก่▫ 2-Tier Architecture – Application Server + DB
Server รวมอยูท่ี่เดียวกนั▫ 3-Tier Architecture – Application Server และ DB
Server แยกกนัอยูค่นละระบบ▫ n-Tier Architecture - หรือ multi-tier ลกัษณะน้ี Application
Server และ DB Server แยกกนัอยูค่นละระบบ รวมทั้งมี Frontend
Server เพื่อใหบ้ริการในการจ่ายงานไปยงัจุดต่าง ๆ ในลกัษณะแบ่งภาระงาน(Load Balancing) หรือมี Server ใหบ้ริการหลายตวัท างานร่วมกนั
23
สถาปัตยกรรมการท างานแบบ Web Based
• 2-Tier Architecture – Application Server + DB Server
รวมอยูท่ี่เดียวกนั
24
สถาปัตยกรรมการท างานแบบ Web Based
• 3-Tier Architecture – Application Server และ DB
Server แยกกนัอยูค่นละระบบ
25
สถาปัตยกรรมการท างานแบบ Web Based
• n-Tier Architecture - หรือ multi-tier มี Server ใหบ้ริการหลายตวั ( > 3 ระดบั) ท างานร่วมกนั
26
Virtualization Technology & Cloud
Computing
• เม่ือระบบเครือข่ายมีประสิทธิภาพมากข้ึน เม่ืออุปกรณ์คอมพิวเตอร์มีสมรรถนะเพิ่มข้ึน การใช้งานอุปกรณ์ใหเ้กิดประโยชน์สูงสุด ยอ่มน ามาซ่ึงความคุม้ค่าในการลงทุน ฉะนัน้จะท าอยา่งไรใหอุ้ปกรณ์ท่ีมีอยูใ่นระดบัเทพ..!! ถูกใชใ้หเ้กิดประโยชน์สูงสุด
• Virtualization Technology คืออะไร ใช่ค าตอบหรือไม่ และเก่ียวอะไรกบัค าวา่ Cloud Computing
27
Data center implementation
28
Total Cost of Ownership
• .
29
Purchasing cost20-25%
Post purchase/Maintenance cost75-80%
Data center implementation on Cloud
30
Introduction to Cloud Computing
(cont.)
• Overview Concept ▫ Package of computing resources, such as computation and
storage
▫ Service individual homes and offices across the country via
the network
▫ Readily available on demand
31
Computing Facilities(SW/HW/Network)
Access Provide
ProvidersConsumersPay for Accessing
IT Platform Evolution
• IT Platform Evolution
32
Picture from: Cloud Computing for Dummiesby John Hamrick
Introduction to Cloud Computing
(cont.)
• Mobility of Contents
33
Your Desktop on a Thin Client
Your Desktop on a SmartPhone
Your Desktop on an iMac
Your Desktop on a PC
As you move between devices, your desktop follows you!
*This slide from: Andre Coetzee in the presentation name “The Future of Technology”
Some of the key providers
• .
34
From: Courtesy Gravitant, Inc from Cloud Technology Spectrum
Hosted Instances
• Host Instances is the physical representation of a computer for running on a virtualization environment.▫ H/W Configuration on demand (RAM, CPU, HD
space, Network, etc.)
▫ Any OS, Applications
▫ Pay as you use
35
Sample of Instances Request
• .
36
Virtualization
• Virtualization, Why?
37
Optimized Resources
Virtualization (cont.)
• Virtualization is the ability to run multiple operating systems on a single physical system and share the underlying hardware resources.*▫ A Virtual machine (VM) is an isolated runtime
environment (guest OS and applications)
▫ Multiple virtual systems (VMs) can run on a single physical system
38
*VMware white paper, Virtualization Overview
Virtualization Architecture (cont.)
• .
39
*VMware white paper, Virtualization Overview
Virtualization (cont.)
• Hypervisor - A hypervisor, a.k.a. a virtual machine manager/monitor (VMM), or virtualization manager, is a program that allows multiple operating systems to share a single hardware host.▫ Controlling the host processor and resources, allocating
▫ To make sure that the guest operating systems (called virtual machines) cannot disrupt each other.
40
Type of Hypervisor
• Hypervisors in Virtualization
41
Picture from: http://www.cisco.com
Virtualization infrastructure
• .
42
Benefits of Virtualization in Cloud
Computing
• Consumers don’t need to own hardware
• Resources are rented as needed from Cloud providers
• The providers allow creating virtual servers▫ Choose the OS and software to run on each instance
▫ The VM will run on a large server farm
▫ Virtual server can initiate within a minute
• Pay per use
43
Software in the Cloud
• Two perspective of software in the cloud*
44
*Source: Software Architecture and the Cloud, Grace A. Lewis, Research, Technology and Systems Solutions
(RTSS) Program, SASI 2012
Services Models
• .
45
From : Cloud Security and Privacy by Mather and Kumaraswamy
Services Models (cont.)
• Data Privacy
46
*Source: Software Architecture and the Cloud, Grace A. Lewis, Research, Technology and Systems Solutions
(RTSS) Program, SASI 2012
What are the services?
• .
47
Picture from: http://info.apps.gov
Deployment Models
• .
48
Why isn’t everyone to use cloud?
• The cloud acts as a big black box, nothing inside the cloud is visible to the clients
• Clients have no idea or control over what happens inside a cloud
• Clouds are still subject to traditional data confidentiality, integrity, availability, and privacy issues, plus some additional attacks
49
Why isn’t everyone to use cloud? (cont.)
• .
50
Disadvantage of Cloud Computing
• Technical Issues▫ Possible downtime
▫ Lack of support
▫ Inflexibility – Locking into their proprietary application and format of services
• Security Issues▫ Prone to attack
▫ How safe is your data?
• Long-running cost – Does the cloud application have all the features that the software does and if not, are the missing features important to you?
51