Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Computer Software Computer Software - ชุดคำสัง่ หรื อกลุ่มของโปรแกรม ซึ่งคอมพิวเตอร์จำเป็ นต้องใช้ เพื่อกำรทำหน้ำท่่ต่ำง ในระบบคอมพิวเตอร์ ฮาร์ ดแวร์ เพื่อให้ สามารถประมวล ผลตำมท่่ผใู ้ ช้ตอ้ งกำรได้อย่ำงม่ประสิ ทธิภำพ ประเภทของ Computer Software แบ่งออกเป็ น 2 ประเภท ดังน่้คือ 1. โปรแกรมระบบ (System Software or Operations Software) 2. โปรแกรมประยุกต์ (Application Software) Cost HARDWARE SOFTWARE 195 0 199 Year 0 Software classification 1. System Software เป็ นกลุ่มของโปรแกรมท่่ออกแบบเพื่อควบคุมกำร ทำงำนของโปรแกรมอื่น และจัดกำรเก่่ยวกับกำรใช้ Hardware ให้ทำงำนอย่ำงม่ประสิ ทธิภำพ 2. Application Software เป็ นโปรแกรมท่่ออกแบบเพื่อกำรใช้ควำมสำมำรถ ของคอมพิวเตอร์ ซึ่งผูใ้ ช้จะต้องเข่ยนโปรแกรมด้วยภำษำ คอมพิวเตอร์ภำษำใดภำษำหนึ่ง เพื่อให้คอมพิวเตอร์ สำมำรถทำกำรประมวลผลให้ได้ผลลัพธ์ตำมท่่ตอ้ งกำร Application Software (Computer Languages) แบ่งออกเป็ น 3 ประเภท คือ 1. Machine language ภำษำเครื่ องประกอบด้วย กลุ่มของเลขฐำนสองและเป็ นภำษำเด่ยวท่่คอมพิวเตอร์ เข้ำใจ แต่ละคำสัง่ ประกอบด้วย 2 ส่ วน คือ - operation code or “op code” - operand Example ADD 0184 00010000000000000000000 0000010111000 2. Low-Level language เป็ นภำษำท่่พฒั นำมำจำก ภำษำเครื่ อง ม่ภำษำเด่ยวเท่ำนั้น คือ Assembly language โดยกำรใช้สญ ั ลักษณ์ (Symbols) แทนเลขฐำนสอง Example S CREDIT, TOTAL 011111 011111111111 000000 op code 2047 0063 (S) (CREDIT) (TOTAL) The composition of an instruction for the machine Decoding the instruction 35A7 An encoded version of the Instructions Decoding the instruction B258 3. High-Level language เป็ นภำษำท่่พฒั นำขึ้น เพื่อให้ผเู ้ ข่ยนโปรแกรมเข่ยนโปรแกรมได้ง่ำยขึ้น โดย ไม่ตอ้ งสนใจกำรทำงำนของเครื่ องว่ำจะนำข้อมูลจำก address ใด มำทำกำรคำนวณ และคำสัง่ ต่ำง ก็เป็ น คำในภำษำอังกฤษท่่เข้ำใจได้ง่ำย Example READ A,B INPUT X,Y Generations of programming languages The evolution of programming paradigms ภำษำ High-Level ได้ม่กำรสร้ำงและพัฒนำขึ้นมำ อย่ำงมำกมำยหลำยภำษำ แต่ละภำษำจะม่ควำมเหมำะสม กับลักษณะงำนท่่แตกต่ำงกันในกำรท่่จะเข่ยนโปรแกรม เพื่อแก้ปัญหำ ซึ่ งขอยกตัวอย่ำงภำษำท่่อยูใ่ นระดับน่้ คือ 1. ภำษำท่ ่ เ หมำะกั บ กำรแก้ ป ั ญ หำทำง วิทยำศำสตร์ และคณิ ตศำสตร์ เช่น BASIC (Beginner’s All-purpose Symbolic Instruction Code), FORTRAN (FORmula TRANslator), WATFIV (Waterloo FORTRAN IV), PL/I, ALGOL, Pascal, Ada, APL และ C เป็ นต้น 2. ภำษำท่่เหมำะกับงำนด้ำนธุรกิจ เช่น COBOL (COmmon Business Oriented Language), RPG 3. ภำษำท่่ใช้กบั งำนกำรจำลองแบบ (Simulation) เช่น GPSS, SIMSCRIPT 4. ภำษำท่่สร้ำงขึ้นมำเพื่อใช้เฉพำะงำน เช่น - PILOT (Programmed Inquiry Learning Or Teaching) - SNOBOL, LISP ใช้กบั งำนท่่ไม่ใช่ตวั เลขล้วน - APT (Automatically Programmed Tooling) ใช้ กบั งานควบคุมเครื่ องมือในโรงงาน - FORTH ใช้กบั งำนคำนวณท่่ม่โครงสร้ำงซับซ้อนและ ต้องกำรผลลัพธ์ในรู ปแบบ Graphic The same variable declarations in different languages The translation process The complete program preparation process โปรแกรมสำเร็ จรู ป (Package Program) • Subroutine Package - SSP (Scientific Subroutine Package) - IMSL FORTRAN Subroutine Package IMSL มำจำก International Mathematics and Statistical Libraries - FAMS (Forecasting and Modeling System) • Statistical Package - SPSS (Statistical Package for Social Science) - BMDP (Biomedical computer Package) • Non-scientific Package - Word processing - Speadsheet - Database - Integrated Software ปัจจุบนั โปรแกรมสำเร็ จรู ปประเภท Database ได้รับควำมนิยมและใช้งำนกันอย่ำงแพร่ หลำยมำก เพรำะ สำมำรถจะจัดกำรกับแฟ้มข้อมูลได้อย่ำงม่ประสิ ทธิภำพ โดยใช้คำสัง่ เพ่ยงไม่ก่คำสัง่ ประเภทของระบบกำรจัดกำรฐำนข้อมูลในปัจจุบนั ม่อยูด่ ว้ ยกัน 4 Models คือ 1. List Model 2. Hierarchical Model 3. Network Mode 4. Relational Model ประโยชน์ ของการจัดการด้ านฐานข้ อมูล 1 ลดควำมซ้ ำซ้อนของข้อมูล 2. สำมำรถหล่กเล่่ยงควำมขัดแย้งของข้อมูล 3. สำมำรถใช้ขอ้ มูลร่ วมกันได้ 4. สำมำรถควบคุมควำมเป็ นมำตรฐำนได้ 5. ม่ระบป้องกันควำมปลอดภัยของข้อมูลท่่ด่ 6. สำมำรถควบคุมควำมคงสภำพของข้อมูลได้ 7. สำมำรถสร้งควำมสมดุลในควำมขัดแย้งของ ควำมต้องกำรของผูใ้ ช้ได้ 8. เกิดควำมเป็ นอิสระของข้อมูล Software ท่่ใช้กบั งำนด้ำนกำรจัดกำรฐำนข้อมูล - DBMS (Data Base Management System) - dBASE II, dBASE III PLUS, dBASE IV - FoxBase, FoxPro - ACCESS - Oracle - Delphi, VB, SQL - etc. Operating System (OS) Operating System : เป็ น Program modules ท่่ใช้ในกำรควบคุมกำรทำงำนของอุปกรณ์คอมพิวเตอร์ ต่ำง เช่น Processor, main storage, I/O devices และ files ต่ำง เป็ นต้น Program modules เหล่ำน่้จะช่วย เพิม่ ประสิ ทธิ ภำพของระบบคอมพิวเตอร์และช่วยให้กำร ทำงำนง่ำยขึ้นสำหรับผูใ้ ช้ โดยทำหน้ำท่่เป็ นสื่ อกลำง ระหว่ำงโปรแกรม, ผูใ้ ช้(users) กับ Hardware Operating System Operating System Abbreviated OS; sometimes called the executive. The software responsible for controlling the allocation and usage of hardware resources such as memory, central processing unit (CPU) time, disk space, and peripheral devices. The operating system is the foundation on which applications, such as word-processing and spreadsheet programs, are built. Popular operating system include CP/M, MS-DOS, the Macintosh OS, OS/2, Windows, Windows NT, and UNIX. UNIX A multiuser, multitasking operating system originally developed by Ken Thompson and Dennis Ritchie at AT&T Bell Laboratories in 1969 for use on minicomputers.UNIX exists in various forms and implementations; among these are version developed at the University of California at Berkeley and versions released by AT&T, the most recent being AT&T System V. UNIX is considered a powerful operating system that, because it is written in the C language, is more portable-that is, less machine-specific--than other operating system. UNIX is available in several related forms, including AIX, a version of UNIX adapted by IBM (to run on RISC-based workstations), A/UX (a graphical version for the Apple Macintosh), and Mach (a rewritten but essentially UNIX-compatible operating system for the NeXT computer). Overview of Function of an Operating System: INTRODUCTION • Operating System is a very complex program • Its primary task is to manage system resources • Tasks include: • Load application for execution • Provide services (I/O services…) • Time sharing • Handle virtual memory • Maintain file system Overview of Function of an Operating System: SYSTEM BOOTUP • When a computer is powered up, the boot loader program, which is stored in the ROM, will be executed • The task of the boot loader is to load OS from disk into memory and transfer the control to the OS when completed • Question: How can the boot loader know where on the disk it’s supposed to read? • Answer: On the disk, there is a special sector, called boot sector, boot record, or boot block. This contains executable code, which instructs computer hardware how to load the OS into the memory Overview of Function of an Operating System: APPLICATION PROGRAM LOADING Suppose we want to executing a.out at the Unix prompt. Here is what will happen: 1.Hardware interrupts will occur. The OS steps in to service interrupt 2.The loader will look in the disk directory to see if the file exists. If it does, the loader will read a.out program to determine how much memory a.out needs 3.Enough memory will be allocated for a.out program 4.Loader will load a.out into memory. 5.Loader will determine the entry point of the a.out program Overview of Function of an Operating System: APPLICATION PROGRAM LOADING (cont.) 6.The OS is now ready to execute a.out. It will execute a jump to the entry point of the a.out program. 7.The a.out program is executed as usual, according to its content 8.When a.out finishes execution, it initiates a call to the OS (exit() function, which was inserted by the compiler). The OS will step in, clean things up and prepare the system for the next waiting process on the running queue (if there any). Overview of Function of an Operating System: Hardware Interrupt Here is a brief summary what will happen when an interrupt occurs. • An electrical signal is being sent to the CPU • CPU will try to complete executing the current instruction • Save the program state such as PC, stack pointer, register values,… • Jump to the location of the interrupt service routine (interrupt handler) and execute the interrupt handler • Interrupt handler will determine the nature of the interrupt and act accordingly. • When the interrupt handler completes its task, it will execute an IRET (interrupt return) • The original program state will be restored and run The shell as an interface between users and the operating system The booting process Bootstrap ส่ วนของคอมพิวเตอร์โปรแกรมท่่ใช้สำหรับเร่ ยกโปรแกรมอื่นเข้ำมำในหน่วยควำมจำ เช่น ส่ วนของโปรแกรมในหน่วยควำมจำรอมท่่ใช้เร่ ยกโปรแกรมควบคุมกำรทำงำนของระบบ จำกแผ่นจำนแม่เหล็ก เป็ นต้น ควำมหมำยเด่ยวกับ loading program Booting System Booting Process • Loading first sector of diskette/disk into memory • Initializing system • Checking system • Testing peripheral • Loading basic OS into memory Disk Components User data area contains the data grouped in files File directory contains entries describing files, volume names, and sub-directory First sector of Disk Boot area Jump Code Vendor Identification BIOS Parameter Block Second File Allocation Table copy of the first FAT Boot Code First File Allocation Table contains information on space used in the user data area หน้ าทีข่ องระบบดาเนินงาน (Operating System) อำจจำแนกตำมส่ วนประกอบต่ำง ของ OS ได้ 4 ประเภท คือ 1. กำรจัดกำรเก่่ยวกับหน่วยควำมจำ (Memory Management) 2. กำรจัดกำรเก่่ยวกับตัวประมวลผล (Processor Management) 3. กำรจัดกำรเก่่ยวกับอุปกรณ์ต่ำง (Devices Management) 4. กำรจัดกำรเก่่ยวกับสำรสนเทศ (Information Management) ลักษณะกำรจัดกำรเก่่ยวกับหน่วยต่ำง ม่ขบวนกำรอยู่ 4 แบบ ดังน่้คือ 1. ติดตำมกำรถูกใช้งำนของส่ วนต่ำง ของ คอมพิวเตอร์ 2. กำหนดนโยบำยกำรใช้ส่วนต่ำง ของ คอมพิวเตอร์ 3. จัดเตร่ ยมส่ วนของคอมพิวเตอร์ให้กบั งำน ท่่ม่สิทธิ์ ใช้งำนส่ วนนั้น 4. เร่ ยกส่ วนของคอมพิวเตอร์คืนจำกงำนท่่หมด สิ ทธิ์ กำรใช้งำนแล้ว องค์ประกอบของ OS สำมำรถแบ่งออกเป็ น 2 ประเภท คือ 1. Control programs 2. Processing programs CONTROL PROGRAMS in an Operating System - Supervisor, Monitor, or Executive program เป็ นโปรแกรมท่่สำคัญใช้ในกำรควบคุม (control) และประสำน งำน (coordinates) กับส่ วนต่ำง ของ OS ซึ่ งโปรแกรมส่ วนน่้ จะถูก load เก็บไว้ในหน่วยควำมจำหลักตลอดเวลำกำรใช้งำน ส่ วนโปรแกรมอื่น ของ OS จะถูกจัดเก็บไว้ในหน่วยควำมจำ สำรอง เช่น Disk เมื่อต้องกำรใช้งำน Supervisor จะทำหน้ำท่่ เร่ ยกโปรแกรมเข้ำสู่ หน่วยควำมจำหลัก MEMORY SUPERVISOR Operating System - Job Control Programs โปรแกรมส่ วนน่้ทำ หน้ำท่่ แปล Job Control Language (JCL) ซึ่ งจะถูกเข่ยนอยูห่ น้ำ โปรแกรมคำสัง่ ทำงำนต่ำง หรื อป้อนเข้ำไปโดยตรงเพื่อให้ OS ได้รู้วำ่ ผูเ้ ข่ยนโปรแกรมเข่ยนด้วยภำษำคอมพิวเตอร์ใด บอกเก่่ยวกับชื่อโปรแกรม ชื่อผูเ้ ข่ยนโปรแกรมและอุปกรณ์ รับ/ส่ งข้อมูล(I/O devices)ในกำรประมวลผล รวมทั้งควำม ต้องกำรตัวแปลภำษำท่่จะใช้ - I/O Management System โปรแกรมส่ วนน่้ ทำ หน้ำท่่ควบคุมและจัดสรรกำรทำงำนของอุปกรณ์รับส่ ง ข้อมูลและเส้นทำงท่่ขอ้ มูลใช้ผำ่ นเข้ำออก (Channels) ในระบบคอมพิวเตอร์ ส่ วนของ Channels จะเป็ น Hardware ท่่ควบคุมกำรส่ งผ่ำนข้อมูลระหว่ำง slow I/O devices และ high-speed CPU และยังม่ส่วนเพิม่ เติมท่่ เร่ ยกว่ำ buffers มำช่วยในกำรเก็บข้อมูลท่่ผำ่ นเข้ำออกใน ระบบคอมพิวเตอร์ Channel ม่อยู่ 3 ประเภท คือ - multiplexer ใช้กบั slow-and-medium speed devices - selector ใช้กบั high-speed devices - block-multiplexer เป็ นกำรรวมเอำคุณสมบัติ ของ multiplexer และ selector Buffer ม่อยู่ 2 ประเภท คือ - input buffer - output buffer Card reader Dish drive Channel 1 Channel 3 OS supervisor Job A program Job B program Channel 2 Printer Channel 4 Display Channels control the execution of I/O instruction PROCESSING PROGRAMS in an Operating System - Translator programs เป็ นโปรแกรมท่่ทำหน้ำท่่ใน กำรแปลโปรแกรมท่่ถูกเข่ยนด้วยภำษำคอมพิวเตอร์ต่ำง ให้อยูใ่ นภำษำท่่เครื่ องคอมพิวเตอร์เข้ำใจ คือ ภำษำเครื่ อง บำงครั้งจะเร่ ยกว่ำ Compilers ภำษำคอมพิวเตอร์แต่ละภำษำ จะม่ตวั แปลภำษำเฉพำะตัว เช่น Assembler ใช้แปลภำษำ Assembly Interpreter ใช้แปลภำษำ BASIC FORTRAN Compiler C compiler 2 1 Interactive program development 4 errors only errors only Source Source program program ++ Compiler Compiler == object object program program object object files+library files+library files files ++ Linker Linker == executable executable program program 3 5 Linking executable executable program program 6 Source program and object files Source program, object files and Executable program Source program, object files and Executable program Execute program Source Source program program ++ changes changes == revised revised source source program program Modify source program 7 Source program, object files and Executable program - Utility Programs เป็ นโปรแกรมท่่บริ ษทั ผูส้ ร้ำง คอมพิวเตอร์หรื อผูเ้ ข่ยนโปรแกรมระบบเข่ยนขึ้นเพื่อให้ ผูใ้ ช้คอมพิวเตอร์สำมำรถเร่ ยกมำใช้งำนร่ วมกับโปรแกรม ของตนเอง หรื อให้บริ กำรอื่น เก่่ยวกับกำรจัดกำรข้อมูล - Library Program จะเป็ นโปรแกรมย่อยท่่ผใู ้ ช้ สำมำรถเร่ ยกไปใช้งำนร่ วมกับโปรแกรมท่่เข่ยนขึ้นเอง - Diagnostic Program เป็ นโปรแกรมท่่ใช้ในกำร ตรวจสอบกำรทำงำนของอุปกรณ์ต่ำง ภำยในเครื่ อง เพื่อตรวจหำว่ำม่ควำมชำรุ ดท่่อุปกรณ์ส่วนใดบ้ำง - Text Editor เป็ นโปรแกรมท่่ใช้ในกำรสร้ำง โปรแกรม COMPILER Source Program COMPUTER ขั้นตอนกำรแปลภำษำ Object Program ประเภทและความสามารถของ OS • Batch Processing หรื อ Stacked Job Processing • Overlapped Processing • Dynamic Job Processing • Multiprogramming • Multiprocessing • Virtual Storage • etc. Batch processing Interactive processing Time-sharing between process A and process B The client/server model Introduction to DOS • The most important components of DOS: The BIOS module The DOS kernel The command processor • Booting DOS • COM and EXE programs Brief History of Windows (1) • Windows 1.0 – Announced in 1983, released in November 1985 • Windows 2.0 – – – – Released in 1987 New feature: overlapping Windows! Required Intel 8086 or 8088 Processor Could access 1 megabyte of memory • Windows 3.0 – Introduced on May 22, 1990 – Big change: Supported 16-bit protected mode (Intel 286/386 processors) – Could access upto 16 megabytes of memory Brief History of Windows (2) • Windows 3.1 – – – – – Released in April 1992 TrueType fonts (scalable) Multimedia Ran only in protected mode Required 286/386 with > 1MB of memory • Windows NT – Introduced in July 1993 – First Windows version supporting 32-bit mode of Intel 386, 486 and Pentium processors – Designed to be portable to non-Intel processors Brief History of Windows (3) • Windows 95 – Introduced in August 1995 – Also supported 32-bit programming mode • Windows 98 – Released in June 1998 – Performance improvements & hardware support – Internet Integration • Windows 2000 – Introduced in February 2000 • Windows Millennium – Released in September 2000 Cache memory A special very-high-speed memory call a cache is sometimes used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate. The cache memory is employed in computer systems to compensate for the speed differential between main memory access time, with the result that processing speed is limited primarily by the speed of main memory. A technique used to compensate for the mismatch in operating speeds is to employ an extremely fast, small cache between the CPU and main memory whose access time is close to processor logic clock cycle time. The cache is used for storing segments of programs currently being executed in the CPU and temporary data frequently needed in the present calculations. Auxiliary memory Magnetic tapes Magnetic disks I/O processor CPU Memory hierarchy in a computer system Main memory Cache memory Multiprogramming Many operating systems are designed to enable the CPU to process a number of independent programs concurrently. This concept, call multiprogramming, refers to the existence of two or more programs in different parts of the memory hierarchy at the same time. In this way it is possible to keep all parts of the computer busy by working with several programs in sequence. Multiprocessors A multiprocessor system is an interconnection of two or more CPUs with memory and input-output equipment. The term “processor” in multiprocessor can mean either a central processing unit (CPU) or an input-output processor (IOP) The benefit derived from a multiprocessor organization is an improved system performance. The system derives its high performance from the fact that computations can proceed in parallel in one of two ways. 1. Multiple independent jobs can be made to operate in parallel. 2. A single job can be partitioned into multiple parallel tasks. โครงสร้ างของการต่ อไมโครโปรเซสเซอร์ หลายตัวเป็ นระบบ Memory unit CPU 1 CPU 2 CPU 3 IOP 1 IOP 2 1. Time-share common bus (ระบบบัสร่ วม) MM 1 MM 2 MM 3 MM 4 CPU 1 CPU 2 CPU 3 CPU 4 2. Multiport memory (ระบบหน่วยควำมจำหลำยช่องทำง)