pipeline 1 (lecture in kmd 2015 fall: internet technology slot)
TRANSCRIPT
OTAKU CULTURE()OC-101
Innovation Pipeline TECH 1Computer ArchitectureKazunori Sugiura phDKeio UniversityNovember 2, 2015FACEBOOK:Kazunori UHYO SugiuraPietoro Woo Hiyo HiyoTWITTER: uhyouhyo11/02/2015Keio Media Design1
1
Objective of this SlotTo become KMD ready inBasic Computer and Network LiteracyContents DistributionCreating Web contentsCreating Web ServerBasic Network and Computer ManagementSecurity, Service extension and Management
11/02/2015Keio Media Design2
PreparationsWhat you will need:Fully Charged Notebook ComputerOr plug in your AC adapter Wireless ConnectivityCan you access KMD Wireless network?11/02/2015Keio Media Design3
What is Computer?What is PC?What is an important role for PCs?11/02/2015Keio Media Design4
What are the difference betweenMacs and PCs?
11/02/2015Keio Media Design5
Remember the Crash Course?CPUMemorySystem Device (Chipset, I/O)External Storage DeviceHDD, SSD, FDD, USB MemoryCommunication DeviceEthernetInput DeviceKeyboard, Mouse, Tablet, CameraDisplay DeviceVideo Card, LCD
11/02/2015Keio Media Design6
How Do They Treat the Data?11/02/2015Keio Media Design7
DigitalInformation expressed by number(s)Every information (text, picture, movies, audios) are expressed by numerical valuesDigital is not 0 and 1sEasy processSame expressions and rulesAccurate copyAccuracyDepends on digitization process11/02/2015Keio Media Design8
Binary Digits1bit = 0 or 11byte = 8bits = 00000000KKilo = 1000MMega = 1000K = 1000000GGiga = 1000M = 1000000000TTera = 1000G = 1000000000000P(Peta) = 1000T = 1000000000000000E(Exa) = 1000P = 1000000000000000000Z(Zeta) = 1000E = 11/02/2015Keio Media Design9
9
Google (Googol)1 Googol = 101000000000000000000000000000000000000000000000000000000000000Graham number33 = 3^3 = 2733 = 3(33) = 327 = 762559748498733 = 3(3) = 37625597484987 = 3(76255974849877625597484987)so define 3( if possible )10011/02/2015Keio Media Design10
Digital is FUN!
11/02/2015Keio Media Design11
HAL2001: A Space Odyssey
11/02/2015Keio Media Design12
HALHAL9000Heuristically-programmed ALgorithmic computer)
Clark Not intentionally named H A LI B M+1+1+111/02/2015Keio Media Design13
Using Digital Expression
11/02/2015Keio Media Design14
Amount of Digital Data
English = 7bitJapanese16bit
ChatShort MailCellular CamerareportShort report
Digital CameraDV CameraWEBCamCellular TVVideo CD
1K
1M1G1T1P1E103106109101210151018
TelephoneCD
CDDVDBlu-Ray
HDV Camera
HD Camera
Digital Cinema
Nuclear SimulationForecast simulation
AmountOfInformation(Bit)DNA11/02/2015Keio Media Design15
15
How Doesthe Computer interact?11/02/2015Keio Media Design16
How do they treat Digital?Using electric currentSwitching on and offLogic
01010111/02/2015Keio Media Design17
AND
ABXABXOFFOFFOFFOFFONOFFONOFFOFFONONON
ABX000010100111
+-
11/02/2015Keio Media Design18
OR
ABXOFFOFFOFFOFFONONONOFFONONONON
ABX000011101111
+-
11/02/2015Keio Media Design19
NOT (Relay)
ABCPCoil PA BA COFFOFFONONONOFFAAA
11/02/2015Keio Media Design20
NANDABXOFFOFFONOFFONONONOFFONONONOFF
ABX001011101110
11/02/2015Keio Media Design21
NOR
ABXOFFOFFONOFFONOFFONOFFOFFONONOFF
ABX001010100110
11/02/2015Keio Media Design22
11/02/2015Keio Media Design23
SwitchingWhat is Clock? Oscillator?11/02/2015Keio Media Design24
ClockWhat is clock?Synchronization scheme(Hz) KHz, MHz, GHz
clock
job
time3 clock job
Quartz crystals(14.318MHz)
11/02/2015Keio Media Design25
Speed and clock
clock
3 clock job
time
DoubleFrequency
3 clock jobs
11/02/2015Keio Media Design26
Babbage Difference Engine
Computer Museum 200911/02/2015Keio Media Design27
11/02/2015Keio Media Design28
11/02/2015Keio Media Design29
The Difference Engine
ISBN-10: 067091020111/02/2015Keio Media Design30
19781980198219841986198819901992199419961998200020022004200620082010VAX-11/780010100100010000Performance(VAX11/780)YearVAX 8700Sun-4/2605913182451801171832804816499931267177925844195536457646505757810208133801735527890MIPS M/120MIPS M2000IBM RS6000/540HP PA-RISC 500MHzAlpha 21064 200MHzPowerPC 604 100MHzAlpha 21064A 300MHzAlpha 21164 300MHzAlpha 21164 500MHzAlpha 21164 600MHzAlpha 21264 600MHzAlpha 21264A 700MHzIntel Pentium III 1GHzAMD Athlon 1.6GHzIntel Pentium 4 3.0GHzAMD Opteron 2.2GHzIntel Xeon 3.6GHzIntel Xeon 3.6GHz 64BitIntel Core i7 2.66GHzIntel Xeon 5760 2.26GHzIntel Core2 2.6GHzIntel Core2 Quad 3.0GHz11/02/2015Keio Media Design31
Moores Law
4004800880808086808880286Intel i386Intel 486Intel PentiumIntel Pentium ProIntel MMX PentiumIntel CeleronIntel Pentium IIIntel Pentium 3Intel Pentium 4Intel Pentium M19701975198019851990199520002005201010,000100,0001M10M100M1GIntel Penryn
TransistorsYear
Intel Xeon11/02/2015Keio Media Design32
8Bit 16 bit 32 bit 64 bitWhat is Bit and Byte?11/02/2015Keio Media Design33
What is ??Bit OS?Data Bus Address BusMemory
CPUDISKNetworkVideoAudioAddressData
000000000000000FFFFFFFF0FFFFFFFF:0000004011/02/2015Keio Media Design34
Address
000000000000000F000000100000001F0000002000000030000000400000005000000060000000700000008000000090000000A0000000B0000000C0000000D0000000E0
000000F0000000FF8Bit Address28= 256000000000000FFFF00000000FFFFFFFF00000000FFFFFFFF216= 65536232= 4GB= 64KBFFFFFFFF00000000264= 16EB16Bit32Bit64Bit11/02/2015Keio Media Design35
?? Bit CPU8Bit CPUProcessor capable of 8 bit operation16Bit CPUProcessor Capable of 16 bit operation32Bit CPU64Bit CPU11/02/2015Keio Media Design36
8Bit vs 32Bit00101100+0011110011111110011100010010111110101011111011011010110001011011111010001110110000011101110000111111111011111110101100000101100+00111100111111100111000100101111101010111110110110101100010110111110100011101100000111011100001111110010111000101011000carrycarry1,541,991,4531234111/02/2015Keio Media Design37
Preparing SpaghettiNot Making a Spaghetti Program11/02/2015Keio Media Design38
Preparing SpaghettiStartOpen the tapWater enough?Close the tapTurn on the stoveBoiling?Open the spaghetti container Put spaghetti 9 minutes?Turn off the stoveTake out spaghettiYou are doneNOYESYESYESNONO11/02/2015Keio Media Design39
Designing Spaghetti Boiling MachineMemoryAdd CounterDecoderALU(Operator)INPUT UNITOUTPUT UNITCLOCK
TapSpaghetti
Temp.11/02/2015Keio Media Design40
Spaghetti Program0OUT 21161INP 1172CMP 20, 3, 1189 minuts3OUT 22191004OUT 2620200ml5INP 221Open tap6CMP 19, 7, 522Close tap7OUT 2523Insert spaghetti8OUT 2324Turn off stove9INP 325Open the spaghetti container10CMP 18, 11, 926Turn on the oven11OUT 2427Take out spaghetti12OUT 272813HLT2914301531
OUTOutput instructionINP:Input instructionCMPcompare instructionHLTstop instruction
Allocate the memoryAnd run from thebeginning11/02/2015Keio Media Design41
Inside the CPUPre fetchUnitInstructionDecoderRegisterALUMemoryInterface
CPU InternalMemoryRead dataControls forinstructionsAlgorithmic Operator11/02/2015Keio Media Design42
ComputersCPUMemory, calculation,controlMain MemoryProgram MemoryData MemoryInput OutputBusOutputDeviceExternalStorageInputDeviceNetwork
11/02/2015Keio Media Design43
CPUNorth Bridge(Memory Controller HUB)Front-side busClockGeneratorSouth Bridge( I/O Controller HUB)Internal bus
Memory SlotsMemory bus
PCI ExpressGraphic Card
PCI busPCI slotsIDESATAEthernetAudioUSBCMOS MFLASHROMSUPERI/OSerialParallelKey/MouseFloppy11/02/2015Keio Media Design44
Brief history on Computer Architecture
11/02/2015Keio Media Design45
Who is she?
moma11/02/2015Keio Media Design46
Rear Admiral ()Grace Murray Hopper (Dec. 9, 1906 Jan. 1, 1992)http://www.hopper.navy.mil/
Got Ph.D in Mathematics and Physics from Yale University Worked with Howard Aiken on the Mark I computer (the first person to debug a computer)Invented the first compiler in 1952 (on UNIVAC I)A-0B-0 (later known as FLOW-MATIC)Invented COBOL (Common Business Oriented Language) in 1959
moma moma11/02/2015Keio Media Design47
The First Computer BugMoth found trapped between points at Relay #70, Panel F, of the Mark II Aiken Relay Calculator while it was being tested at Harvard University, 9 September 1945.
In the mid 1950's, Hopper extended the meaning of the term "debug" to include removing programming errors. moma11/02/2015Keio Media Design48
ReallityThe Term Bug was already used at that time. when one technician found a moth trapped inside Mark II computer. She was amazed that a REAL BUG was hidden inside the computer and reported as a BUGhttp://ei.cs.vt.edu/~history/Hopper.Danis.htmlIEEE Annals of the History of Computing, Vol 22 Issue 1, 200011/02/2015Keio Media Design49
ENIAC (Electronic Numerical Integrator and Computer)
General View of the ENIAC, 1946 Built at the University of Pennsylvania's Moore School of Electrical Engineering
30 x 50 [ft] Room5000 Addition/Sec300 Multiplication/Sec momahttp://www.library.upenn.edu/special/gallery/mauchly11/02/2015Keio Media Design50
ENIAC11/02/2015Keio Media Design51
Vacuum Tube3 conductor vacuum tube
2ch(Push-Pull)CathodeGridPlate
EmitterCollector(Output)Base(input)
Filament
11/02/2015Keio Media Design52
DEBUG
11/02/2015Keio Media Design53
Soldering11/02/2015Keio Media Design54
SolderSolderTin(Sn)60%Lead(Pb)40%Melting Point: 183c. Lead Free SolderTin 99.3% Copper Nickel 0.7% Melting Point: 227c.Tin 96.5% Silver 3%Copper 0.5% Melting Point: 217c.Soldering Iron30W
11/02/2015Keio Media Design55
11/02/2015Keio Media Design56
Power SupplyCPU memory hard disk interface everythingConvert AC to DC+5V-5V+12V-12VReducing voltage = reduces energy consumption+3.3V, +2.5V,+1.8V
Voltage
18V5VFast!Time11/02/2015Keio Media Design57
Hardware
11/02/2015Keio Media Design58
BeginningFirst PC built in Japan (1976/8/3)TK-80 Kit(88500 Yen )PD8080A(Intel 8080 Compatible)Memory 512Byte
11/02/2015Keio Media Design59
TK-80
Display DeviceKeyboardDMA refresh 83F8h 83FFh
Memory (standard 512Byte picture shows 1Kbyte)(8000h 83FFh)11/02/2015Keio Media Design60
IBM The PC
1981/8/12Processor : 8088Mem: 16KByte Max 64Kbyte8Bit XT Bus (4.77MHz)MDA(Monochrome Display Adapter) 320 x 200Interrupt controller (i8259)DMA controller (i8237)
11/02/2015Keio Media Design61
Importance of BUSMemoryAdd CounterDecoderALU(Operator)INPUT UNITOUTPUT UNITCLOCK
TapSpaghetti
Temp.Arrows are Buses11/02/2015Keio Media Design62
BUSWhat needs to be transported?Power SupplyData linesAddress linesSpecial Command Lines
11/02/2015Keio Media Design63
Tap device
Power +12v(Tap motor power)
Tap MotorTap motor ControlPower +v(Tap motor control board)Ground
Busy(Interrupt)Address BusData BusAddressDataContents10Tap Status21Tap Motor On31Tap Motor Direction
11/02/2015Keio Media Design64
CPU
11/02/2015Keio Media Design65
Intel CPU Architecture400480088085808680186 *BUGGY*802868038680386SX80486SX,80486DXPentium(i586), MMX Pentium (MMX)Pentium Pro, Pentium II, Pentium III (SSE)Pentium 4 (sse2, Hyper Threading)XeonCoreCore2AtomCore QuadI7i511/02/2015Keio Media Design66
Rivals: Motorola6800(1974)68000(1979)1982 Sun Microsystems SUNStanford University Network1983 Apple LISA68020(1984) 32Bit MPUMacintosh II68030(1987)68040(1990)88000(1990)11/02/2015Keio Media Design67
Intel 4004
First production microprocessorchip(4mm x 3mm)4Bit 10m rule2300 transistorsFrequency108KHzMax 750KHzcalculators
11/02/2015Keio Media Design68
8086 and 80888086 Processor29000 transistor16Bit Data Bus 20Bit Address Bus(1MB)5MHz(8,10MHz)3m8088 Processor8Bit Data Bus 20Bit Address BusAMD and NEC as Second Source
11/02/2015Keio Media Design69
32Bit Requirement80386 80386SX80386(80386DX)275000 Transistor32Bit Data Bus, 32Bit Address Bus16 33MHz80387 FPU80386SX16Bit Data Bus 32Bit Address Bus
11/02/2015Keio Media Design70
Faster: 80486
80486120Transistor32Bit/32Bit25 50 MHzFPU8Kbyte Internal Cache(4way Set)Socket (Socket 1/2/3)
11/02/2015Keio Media Design71
Intel Core I Mobile Processor
Picture from Wikipedia11/02/2015Keio Media Design72
Intel Core I SeriesNew Intel CPUs2008/11/16X86:32,64BitCode Name: Nahalem45nmShift to 32nmTDP: 130WIntel Core 2 Extreme (QX9775, 3.20GHz)
: Core i7 http://intelcorei7.jp/
11/02/2015Keio Media Design73
Hyper-Threading
CORE 1CORE 2CORE 3CORE 4No Hyper-Threading
CORE 1CORE 2CORE 3CORE 4Hyper-Threading
Thread11/02/2015Keio Media Design74
Intel Turbo Boost Impress Intel
CORE 1CORE 2CORE 3CORE 4FrequencyCORE 1CORE 2CORE 3CORE 4
11/02/2015Keio Media Design75
Embedded memory controller
CORE
CORE
CORE
CORE
FSB
CHIPSETMCH
memorymemory
Video Card
CORE
CORE
CORE
CORE
QPI
CHIPSETIOH
memorymemory
Video Card
To: ICH
To: ICH11/02/2015Keio Media Design76
Embed graphics controller as well
MemoryController
CPU
GPU
DMI
CHIPSETPCH
Video Card
To: ICH
FDI
Clarkdale11/02/2015Keio Media Design77
HeatTDPThermal Design Power
11/02/2015Keio Media Design78
Memory
11/02/2015Keio Media Design79
MemoryROM = Read Only MemoryRAM = Random Access Memory
ROM
RAM11/02/2015Keio Media Design80
Faster MemoryCache memory
DataDataDataClockD-RAMPipelined BurstSRAMProcessorCacheTIME11/02/2015Keio Media Design81
Memory Size expansionComplexity in Operating System and ApplicationMulti MediaMBYear11/02/2015Keio Media Design82
Cost efficiency of memoryYenYEAR11/02/2015Keio Media Design83
Secondary Storage
11/02/2015Keio Media Design84
Floppy disk
From Wikipediafd1440|floppy|floppy3|3in|3.5in High Density Floppy:\ :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ :pa#2880:oa#0:ba#4096:fa#512:\ :pb#2880:ob#0:bb#4096:fb#512:\ :pc#2880:oc#0:bc#4096:fc#512:Sector size x sector per track xCylinderx surface 512 x 18 x 2 x 80 = 1474580 byte = 1440KByte11/02/2015Keio Media Design85
Hard Disk
11/02/2015Keio Media Design86
ARMCylinderHEADTRACK
SECTORSector:512byte 11/02/2015Keio Media Design87
Fujitsu Eagle (M2351A)
10.5
11/02/2015Keio Media Design88
Higher RPMs = faster accessRPM11/02/2015Keio Media Design89
HDD CapacityMByte11/02/2015Keio Media Design90
How they recordHorizontal Magnetic Recording
NSNS1342Electric MagnetCoil
SignalMagnetic surfaceHorizontal recording andVertical recording
11/02/2015Keio Media Design91
Vertical Magnetic recording
11/02/2015Keio Media Design92
Zone1Zone2Zone 3:Zone n
B1 Mb/SecB2 Mb/SecB3 Mb/SecBn Mb/SecB1 > B2 > B3 > Bn (Mb/Sec)11/02/2015Keio Media Design93
0204060800.20.40.60.81.01.21.4Transfer Rate (Million Byte/Sec)Progress (Million Byte)01234567Power Consumption (Watts)Toshiba MK1422FCV HDD232480MB PIO
Power Consumption (Watts)Transfer Rate (Million Byte/Sec)Access Avg. : 23.4 [ms]CPU Utilization: 0.85%11/02/2015Keio Media Design94
0204060510152025Transfer Rate (Million Byte/Sec)Progress (Billion Byte)0123Power Consumption (Watts)Hitachi DK23EA-60B60GB ATA-2/3/4/5 UDMA100
Power Consumption (Watts)Transfer Rate (Million Byte/Sec)30Access Avg. : 19.4 [ms]CPU Utilization: 12.7%11/02/2015Keio Media Design95
030601801020304050Transfer Rate (Million Byte/Sec)Progress (Billion Byte)0IBM IC35L180AVV207-1180GB ATA-2/3/4/5 UDMA100
Power Consumption (Watts)Transfer Rate (Million Byte/Sec)Access Avg. : 14.3 [ms]CPU Utilization: 76.1%90120150246810Power Consumption (Watts)
11/02/2015Keio Media Design96
Hard disk recording SectorByte block
147
Track 1Track 2Track 3Track 4Track 5Track 6Track 7Track 8Track9
258
36
SURFACE 1SURFACE 2SURFACE 3512 Byte Data123456781234567811/02/2015Keio Media Design97
11/02/2015Keio Media Design98
11/02/2015Keio Media Design99
SSD Access scheme
impresshttp://pc.watch.impress.co.jp/docs/2008/1128/hirasawa010.htm11/02/2015Keio Media Design100
11/02/2015Keio Media Design101
File and DirectoryUnit of DataText, Graphics, Sounds, VideosFile name and ExtensionsProgram and Applications are also filesStoring Files into Directory11/02/2015Keio Media Design102
File and Directory/binetcusrbootdevshlspasswdbinlibvmlinuztty01sda1gccssh()11/02/2015Keio Media Design103
Current and Parent/usrbinlibgccssh...Current DirectoryParent Directory11/02/2015Keio Media Design104
Static Link/usrbinlocalgcc...Current DirectoryParent DirectorybinG++Gcc-4.311/02/2015Keio Media Design105
File system Commandcd ls (dir) pwd (cd) cp (copy) mv (move, ren) rm (del) mkdir (md) rmdir (rd)11/02/2015Keio Media Design106
Command Option rm r (del /s) rm f (del /f) rm rf (del /sfpow cp r (xcopy) ls a ls -al11/02/2015Keio Media Design107
UNIX Directory/tmp /usr/bin /usr/bin/dev/etc/home/var11/02/2015Keio Media Design108
File system in UNIX
I nodeData blockBoot blockSuper block11/02/2015Keio Media Design109
File systemAbstraction based on files
root directory/dev/homejunsd0aPlain FilesDirectorySpecial Files
11/02/2015Keio Media Design110
Index node60298150junuhyoI node number9860100105secretappointment10098160203Licence.cOops.c10598178205Presentation.pptGirlfriend.jpg
11/02/2015Keio Media Design111
Access Control-rw-r--r-- 1 uhyo kmd 30 2009-06-05 18:20 main.c
-rwxrwxrwxusergroupalltype 001execute 010write 100read11/02/2015Keio Media Design112
Partition
FreeBSDWindows XPNetBSDInfernoFDISK Partition
/ PartitionSwap Partition/usr PartitionInternal Partitioncp3540|Conner Peripherals 540MB SCSI:\ :ty=winchester:dt=SCSI:se#512:nt#12:ns#49:nc#1806:rm#4500: \ :pa#18816:oa#0:ta=4.2BSD:ba#4096:fa#512: \ :pb#75264:ob#18816:tb=swap: \ :pc#1061928:oc#0: \ :pf#217560:of#94080:tf=4.2BSD:bf#4096:ff#512: \ :pg#199920:og#311640:tg=4.2BSD:bg#4096:fg#512: \ :ph#550368:oh#511560:th=4.2BSD:bh#4096:fh#512:
11/02/2015Keio Media Design113
Turning on Your PCs
11/02/2015Keio Media Design114
POWER ONPOSTBOOTSTRAPIPLOSCOMMANDINTERPRETERProcess 2Process 1Process 3Processor starts running from address 0 after hard reset. UsuallyFrom reset vector.I/O CheckMemory CheckRead IPLRead OS and run as a system taskInitialize OS, run the command interpreterStart user command
InitializationRunning
11/02/2015Keio Media Design115
AgendaInstalling server on your LaptopKnowing server from A to Z
11/02/2015Keio Media Design116
Q: What kind of service do you want to provide?
? What is a Server?Computers Providing ServicesNetworkWebsiteSoftwareApplicationDatabaseFileetc.
What is Server?Providing service to whom requested24hrs 365, 366 days, foreverContinuous OperationUnless service orientedStability, Safety, Security (3 Ss)
Very Basics of an ApplicationINPUT and OUTPUTWhen was the first application?Operating System and Application
11/02/2015Keio Media Design120
What is [email protected] % telnet narcia.narcia.net smtpTrying 210.238.180.250...Connected to narcia.narcia.net.Escape character is '^]'.HELO cpu.sfc.wide.ad.jp220 narcia.narcia.net ESMTP Sendmail 8.14.2/8.14.2; Mon, 17 Nov 2008 05:41:46 +0900 (JST)250 narcia.narcia.net Hello cpu.sfc.wide.ad.jp [203.178.142.143], pleased to meet youMAIL FROM: [email protected] 2.1.0 [email protected]... Sender okRCPT TO: [email protected] 2.1.5 [email protected]... Recipient okdata354 Enter mail, end with "." on a line by itselfTHIS IS A TEST MAIL.250 2.0.0 mAGKfkmO040256 Message accepted for deliveryquit221 2.0.0 narcia.narcia.net closing connectionConnection closed by foreign host.11/02/2015Keio Media Design121
What is this? [email protected] % telnet narcia.narcia.net wwwTrying 210.238.180.250...Connected to narcia.narcia.net.Escape character is '^]'.GET /~uhyo/uhyo.html
OH YOU CAN SEE ME !!!
Connection closed by foreign host.11/02/2015Keio Media Design122
122
Do you want a Server?513,325http://jp.fujitsu.com/platform/server/primergy/products/lineup/rx600s6/
Turning on Your PCs
11/02/2015Keio Media Design124
POWER ONPOSTBOOTSTRAPIPLOSCOMMANDINTERPRETERProcess 2Process 1Process 3Processor starts running from address 0 after hard reset. UsuallyFrom reset vector.I/O CheckMemory CheckRead IPLRead OS and run as a system taskInitialize OS, run the command interpreterStart user command
InitializationRunning
11/02/2015Keio Media Design125
Operating SystemWindows OSUnix OSMac OS
11/02/2015Keio Media Design126
Basic principle in OSVirtual MachinesResource ManagementOperating SystemhardwarehardwarehardwarehardwarehardwarehardwareApplicationApplicationApplication11/02/2015Keio Media Design127
Why OS?Keyboard
11/02/2015Keio Media Design128
Mouse
11/02/2015Keio Media Design129
Variety of Storage DevicesOperating SystemIDE HDDSATA HDDSCSI HDDIDE DeviceAccessSATA DeviceAccessSCSI DeviceAccessE-mail ApplicationAccessing stored e-mail11/02/2015Keio Media Design130
Resource ManagementApplications access limited resourcesPC = resourceRacing ConditionsLets watch Anime in Christmas eve!But I also need to meet with my close friendWhich should I choose?Of course Anime?!11/02/2015Keio Media Design131
Sharing PrinterOne Printer with many users and trying to use printer at same time
OSPrinterIm printingOKprintingWAIT!Done!Your turn11/02/2015Keio Media Design132
Why OS was born?Batch processingResident Monitor, JCL, IOCSResident MonitorUser Program AreaSingle jobSingle programMinimum controlling mechanism
Fortran Job Card$JOB$FORTRAN$LOAD$RUN$END11/02/2015Keio Media Design133
Batch Process
CPU
Job 3Job 2Job 1Courses in RestaurantsEnjoy one dish at a timeAppetizersSoupMain dish11/02/2015Keio Media Design134
Time Sharing System
Share the dishes
JOB 1JOB 2JOB 3Welcome to the UNIX worldCPU11/02/2015Keio Media Design135
Emulator andvirtualization technology
11/02/2015Keio Media Design136
Virtualization TechnologiesHardware (CPU, Memory, SCSI, etc )Operating SystemApplicationVirtualization SoftwareGuestOSGuestOSGuestOSGuestOSGuestOS11/02/2015Keio Media Design137
Virtualization TechnologiesUsing No Operating SystemHardware (CPU, Memory, SCSI, etc )Virtualization Software( Hyper-visor Virtual machine monitor )GuestOSGuestOSGuestOSGuestOSGuestOSGuestOSGuestOSGuestOS11/02/2015Keio Media Design138
Virtualization TechnologiesUsing Firmware SolutionHardware (CPU, Memory, SCSI, etc )FirmwareGuestOSGuestOSGuestOSGuestOSGuestOSGuestOSGuestOSGuestOSVirtualizationSoftware11/02/2015Keio Media Design139
Virtual Boxhttp://www.virtualbox.org/11/02/2015Keio Media Design140
VM & Application
Local VMRemote VMAlpha, Beta...Real ServerDeploymentDevelopmentReleaseTest
DebugNew Feature
Release Process
How to use VM?Local VM: Virtualbox
Remote VM: KMD VM
Hands OnInstall VirtualBoxInstall Debian OS
Hard Disk Partition1DK Partition Windows Partition Linux Partition
C:D:........WindowsProgramDocumentsUser dataUser data//etcswap/usrbinshare/var...logopt.../homeDocuments...Pictures...
UNIX/Linux Mount points / root directory/Top level of Tree directory structure
/home home directory/Users dataeg. /home/userA /home/userB/usr user directory/Softwares/var, /tmp.../System Files
11/02/2015Keio Media Design146
11/02/2015Keio Media Design147
11/02/2015Keio Media Design148
11/02/2015Keio Media Design149
11/02/2015Keio Media Design150
LOGIN ()LOGOUT()AuthenticationWho are you?passwordUser ID(UID)Account(User name and UID)Logout11/02/2015Keio Media Design151
Login()PC(CPU)11/02/2015Keio Media Design152
/Terminal Operation
11/02/2015Keio Media Design153
CUI and GUIWhat is the difference?
PC
11/02/2015Keio Media Design154
SHELL UNIX CUICharacter User InterfaceGraphical User InterfaceShell Interpreter sh, csh, bash, ksh, zsh, tcsh11/02/2015Keio Media Design155
$ or % #
11/02/2015Keio Media Design156
who Who WHO cleargroupshoge11/02/2015Keio Media Design157
UNIX/Linux/ Basic Command:E-learning
VI Editor
VI Editor /StartCommand:vi filename
If given file doesnt exist, this command will create a new file with the file name.
VI Editor /Mode
/Basic Command:E-learning
How to Use vi editor11/02/2015Keio Media Design163
vi command launchvi (filename)----open the file by vivi +/(expression) (filename) ------ open and start the file at the fist (expression)vi + (filename) ----open and start at the last linevi +(line number) (filename) ---- open and start at the line number11/02/2015Keio Media Design164
vi editor functionTwo type of the mode in viCommand ModeCursor Move, Copy & Paste, Replacement, Save file and so onInput ModeInput the characters into the body
11/02/2015Keio Media Design165
Changing Both ModesCommand mode to Input modei means inserting the characters into the left side of the cursor.a means inserting the characters into the right side of the cursor.Input mode to Command modeesc change mode from input mode to command mode.
11/02/2015Keio Media Design166
Command Mode -cursor movement-h -> left, j -> down, k -> up, l -> rightShift + g goes to the last linegg goes to the first line$ goes to the last column in the line0 zero goes to the fist column in the linectrl+f goes up to 1 pagectrl+b goes down to 1 page11/02/2015Keio Media Design167
Command Mode -file manipulation-:e reread the file:wq save the file and quit the vi:wq! save the file and quit the vi forcedly:w saves the file:help open the help page:q! quit the vi forcedly
11/02/2015Keio Media Design168
EditingRemove the one character (x)yyy replace xxx (:s /xxx/yyy/)yyy replace xxx in all the lines (:%s /xxx/yyy/g)Copy the line (yy)Paste the copied line (p)11/02/2015Keio Media Design169
Workshop for vi editorMake 1 text file by viWrite your name in each line by 20 lines.Move to 1st line, then remove the 1st line.Rewrite the Hello vi in 1st line and copy it into 3rd, 5th and 10th.Replace your name by Kazunori Sugiura
samplevi.txt11/02/2015Keio Media Design170
Type this source codeType the following source code.#include
int main(void){printf(hello vi\n);printf(hello vi and linux debian\n);
return(0);}hellovi.c11/02/2015Keio Media Design171
Learn more Just do by yourselfUse vi for configuration and making source codeUtilize vi for writing down the memo
11/02/2015Keio Media Design172
File and Directory(Folder)binetcusrProgram Files(x86)Usersshlspasswdbinlib cos.txtSOI.pptgccsshuhyokeikoMozillafirefoxDocumentsDocuments\ /11/02/2015Keio Media Design173
Current and Parent/UserkeikouhyoSOI.txtGC.txt...Current DirectoryParent Directory11/02/2015Keio Media Design174
Basic Commands WinMac/Change directorycd pathcd path()/Show current pathcdpwd/Clear the screenclsclear/Displays the contents of a directorydirls
http://itpro.nikkeibp.co.jp/article/COLUMN/20080805/312154/http://webya.in/archives/3676
Basic Commands WinMac/Make directorymd foldermkdir folder/Delete directoryrd folderrmdir folder/Copy a filecopy file1 file2cp file1 file2/Delete filedel filerm file/Move file, Rename filemove path1/file path2/filemv path1/file path2/file/Write text in to fileecho text > file.txtecho text > file.txt/Displays the contents of a text file.type filecat file
Manage your files with commandCreate a new directorymkdir dir1(win)mkdir dir1(mac)Enter that directorycd dir1See whats in the directorydir (win)ls (mac)
Manage your files with commandThere is nothing inside, its a new directoryCreate a new fileecho hello world > a.txtSee whats in the filetype a.txt (win)cat a.txt (mac)Copy the filecopy a.txt b.txt (win)cp a.txt b.txt (mac)
Manage your files with commandSee whats in file b.txtFogot the commands? Press See whats in the directory now
Manage your files with commandGo to upper directorycd ..Copy the directorycopy dir1 dir2 (win)cp r dir1 dir2 (mac)Go see the new directory contentsWindows: folder2 should be created first Mac: -r option is used for recursive copy through directory
Manage your files with commandSee whats in dir2
Rename a.txtmove a.txt c.txt (win)mv a.txt c.txt (mac)Delete b.txtdel b.txt (win)rm b.txt (mac)
Manage your files with commandSee whats in dir2
See whats in dir1
Delete directoryrmdir dir1 (win)rm r dir1
Access Control-rw-r--r-- 1 uhyo kmd 30 2009-06-05 18:20 main.c
-rwxrwxrwxusergroupalltype 001execute 010write 100read11/02/2015Keio Media Design183
Static Link/usrbinlocalgcc...Current DirectoryParent DirectorybinG++Gcc-4.311/02/2015Keio Media Design184