Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Mac

ทำความเข้าใจ DOS: มรดกของ Disk Operating Systems

DOS หรือ disk operating system คือระบบปฏิบัติการ (OS) ที่รันจาก disk drive คำศัพท์นี้ยังอาจหมายถึง họของ disk operating systems โดยเฉพาะ MS-DOS (Microsoft DOS) MS-DOS เป็น OS หลักสำหรับ personal computers (PCs) จนถึงปี 1995 ที่ความนิยมลดลงเนื่องจาก Windows 95 ที่มี GUI ที่ใช้งานง่ายกว่า

ประวัติของ DOS

คอมพิวเตอร์สมัยแรกในทศวรรษ 1940s และ 1950s ไม่มี disk drives แทนที่จะเป็น hard-wired สำหรับ computations เฉพาะ คอมพิวเตอร์ต่อมาเก็บคำสั่งใน memory ด้วย paper-based media เช่น punch cards และต่อมา magnetic tapes หน่วยความจำจำกัด และเมื่อคำสั่งควบคุมคอมพิวเตอร์ย้ายไป disk drive (floppy disk หรือ internal HDD) ถือเป็นเทคโนโลยี laing-edge

Operating system คือซอฟต์แวร์ที่ให้คำสั่งควบคุม hardware components (memory, processor ฯลฯ) และ peripheral devices รวมถึงอนุญาตให้ software programs อื่นทำงาน คำสั่งอาจจัดเก็บใน HDD หรือ storage medium อื่น DOS เป็นประเภท OS เฉพาะที่รันจาก HDD ของคอมพิวเตอร์ และให้ command-line interface (CLI) ให้ผู้ใช้เข้าถึงและควบคุมระบบและ components โดยพิมพ์คำสั่งผ่าน keyboard การใช้ CLI เป็นความแตกต่างหลักระหว่าง disk operating systems และ modern GUI-based OS

คำว่า DOS ยังใช้ describe ระบบปฏิบัติการ disk แบบ command-line หลายตัวที่คล้ายกัน คอมพิวเตอร์สมัยแรก เช่น Commodore 64, Atari 800, Apple II มี disk operating system: Commodore Business Machines DOS, Atari DOS, Apple DOS ตามลำดับ DOS/360 เป็น OS สำหรับ IBM mainframes 登場 1966 ไม่เกี่ยวข้องกับ 8086-based DOS ในทศวรรษ 1980 บน PCs

Disk operating system ทำงานอย่างไร?

เมื่อคอมพิวเตอร์เปิดเครื่อง ผ่านขั้นตอนต่างๆ เรียกว่า boot process เมื่อรัน disk operating system 6 ขั้นตอน booting นี้เป็นมาตรฐาน:

  1. ROM bootstrap loader อ่าน Master Boot Record และส่งมอบ control ให้มัน
  2. Boot record โหลด disk operating system เข้า memory ซึ่งเข้าควบคุมเครื่อง
  3. คอมพิวเตอร์ถ่ายโอนข้อมูลจาก magnetic disk ไป main memory (RAM)
  4. ถ่ายโอนข้อมูลไป external devices ที่ต่ออยู่ เช่น จอภาพ หรือ พิมพ์
  5. ให้ application programming interfaces ต่างๆ สำหรับ programs เช่น character I/O, memory management, program loading/termination, handling user input via keyboard
  6. OS ให้ file system management จัดระเบียบ อ่าน เขียน ไฟล์บน storage ใช้ hierarchical structure ของ directories, subdirectories, files

DOS และ command-line interface

เพราะ DOS มี character-based interface ไม่ใช่ GUI ผู้ใช้ต้องพิมพ์ textual commands ใน command line เพื่อระบุ actions ที่ต้องการให้ OS ทำ เช่น หาไฟล์ หรือรันโปรแกรมเฉพาะ กระบวนการ command line อาจซับซ้อนและน่าเบื่อ ซึ่งเป็นเหตุผลที่ non-graphical OSs กำลังล้าสมัย

อย่างไรก็ตาม non-graphical OSs ใช้ system resources น้อยมาก เบา เร็ว และยืดหยุ่น ผู้ใช้ที่รู้ standard commands ของ OS อาจหาง่ายกว่า GUI-based OS โดยเฉพาะถ้าต้องการ:

  • Troubleshoot hardware/software issues
  • Recover data จาก corrupted HDD
  • Create HDD partitions
  • Run antivirus software
  • Run legacy software
  • Setup/configure system BIOS
  • Setup file/data backup
  • Update system date/clock settings

คุณสมบัติของ DOS

คุณสมบัติหลักของ disk operating systems ทั้งหมด:

  • CLI: ไม่มี GUI ใน DOS ใดๆ ไม่รับ mouse inputs เป็น character-based interface system คำสั่งทั้งหมดพิมพ์ข้อความที่ command-line prompt
  • Prompt: DOS ให้ visual message เรียกว่า prompt แสดง location ของ current directory/folder และให้ user พิมพ์คำสั่งจาก keyboard
  • Management: DOS มีประโยชน์จัดการ files, I/O system, memory ของคอมพิวเตอร์
  • Batch files: DOS รองรับ batch files เป็น macros ใช้ automate groups of commands ลดความซับซ้อน ประหยัดเวลา/ความพยายาม
  • Kernel: DOS kernel ทำหน้าที่เป็น "สมอง" ของ OS จัดการ fundamental operations (memory allocation, file access ฯลฯ) ให้ interface สำหรับคอมพิวเตอร์และโปรแกรมโต้ตอบ
  • Data recovery capabilities: บูทคอมพิวเตอร์จาก DOS ช่วย recover data กรณี unexpected events เช่น crash หรือ hard drive corruption

ข้อจำกัดของ DOS

  • No built-in security: ไม่มี built-in security เช่น file ownership และ permissions
  • No multiusers หรือ multitasking: เป็น single-task OSs ไม่รองรับ multiusers/multitasking โปรแกรมเดียวรันได้ในเวลาเดียวกัน (แม้ให้ direct access ไป basic I/O system และ hardware)
  • Challenging interface: CLI ต้องพิมพ์คำสั่ง ต้องจำคำสั่งเพื่อรันโปรแกรมและทำ OS tasks
  • Unexpected output: ข้อผิดพลาดเล็กน้อยในการพิมพ์คำสั่ง ให้ผลลัพธ์ไม่คาดคิด ตัวอย่าง: ต้องการ list files ใน current directory พิมพ์ cd \directory_name แต่คำสั่งนี้ change working directory ไปที่ named directory ควรใช้ dir เพื่อ list contents
  • Slow updating disk directory information: บาง DOS เช่น MS-DOS ไม่ update disk directory information จนกว่า file จะถูก close โดย application ทำให้ file อยู่ใน unsafe state และเกิด programming issues

คำสั่ง DOS พוצี

MS-DOS ไม่ case-sensitive คำสั่งพิมพ์ uppercase หรือ lowercase ได้ แต่ disk operating systems อื่นๆ มี case-sensitive CLIs คำสั่ง DOS รวมถึง:

CommandFunctionExample
cdChanges directoryType cd c:\techtarget เปลี่ยน working directory ไป c:\techtarget
clsClears screenType cls
copyCopies filesType copy c:\techtarget\file.txt c:\techtarget\file2.txt
delDeletes filesType del c:\techtarget\file2.txt
deltreeDeletes all files/subdirectoriesType deltree c:\techtarget\drafts
dirLists files/directoriesType dir c:\techtarget
formatFormats disk for DOSType format e: format disk ใน drive e:
helpLists commands/infoType help del แสดง info ของ del command
mkdir/mdCreates subdirectoryType mkdir c:\techtarget\drafts
moveMoves files/directoriesType move c:\techtarget\file.txt c:\techtarget\drafts\file.txt
ren/renameRenames file/directoryType ren c:\techtarget\file.txt c:\techtarget\file2.txt
typeDisplays file contentsType type c:\myfile.txt
*Wildcard: 1+ charsType copy c:\techtarget\*.txt c:\techtarget\drafts copy all .txt files
?Wildcard: 1 charType copy c:\techtarget\document?.txt c:\techtarget\drafts copy document1.txt, document2.txt ฯลฯ

ประวัติเพิ่มเติมและอนาคตของ DOS

Microprocessor ในทศวรรษ 1970 เริ่มปฏิวัติคอมพิวติ้ง ตลาด PCs เริ่มกระฉับพลัน IBM เปิดตัว IBM 5150 Personal Computer สิงหาคม 1981 เพื่อเร่งพัฒนา IBM license components จากบริษัทอื่น

IBM เลือก OS แรกคือ CP/M-86 จาก Digital Research แต่ขัดแย้ง nondisclosure agreements และ licensing ทำให้ IBM เลือก CP/M-like OS จาก Microsoft ที่เดิมชื่อ QDOS 86-DOS

Microsoft ซื้อสิทธิ์ตลาด QDOS 86-DOS ปี 1980 OS นี้สร้างโดย Tim Paterson ที่ Seattle Computer Products (SCP) เดิมชื่อ QDOS (Quick and Dirty OS) ตัวเลข "86" หมายถึง Intel 8086 processor หลังออกจาก SCP ไป Microsoft 1981 Paterson ทำงาน PC-DOS version ของ 86-DOS สำหรับ IBM PC PC-DOS เป็น DOS แรกที่ติดตั้งกว้างขวางบน PCs รัน Intel 8086

Microsoft ผลิต version เกือบเหมือนกันของ PC-DOS เรียกว่า MS-DOS เปิดตัว 1981 隨著 PC sales เพิ่ม MS-DOS ก็แพร่หลาย Versions ต่อไปปรับปรุง performance เพิ่ม functionalities: รองรับ foreign/extended characters, larger HDDs, enhanced memory management, improved text editor, network support

เมื่อ Microsoft นำเสนอ Windows เป็น GUI สำหรับ MS-DOS ผู้ใช้ต้นๆ ต้องพิมพ์ "WIN" ที่ DOS prompt เพื่อ launch Windows Windows พัฒนาจาก GUI program รันใต้ MS-DOS กลายเป็น full OS ที่ครอบครองเป็น default OS แม้จนถึง Windows XP consumer versions ของ Windows ถึงหยุดพึ่งพา DOS program win.com ในการ bootstrap Windows kernel

Last retail version ของ MS-DOS คือ MS-DOS 6.22; PC-DOS 2000 เป็น last retail release ของ PC-DOS MS-DOS ยัง bundled กับ Windows แต่ไม่ต้องการ separate software license อีกต่อไป ยังรันได้ภายใต้ Windows ผ่าน command processor ที่ emulate MS-DOS interface มี open source version ของ DOS ชื่อ FreeDOS based on และ compatible กับ MS-DOS Versions อื่นๆ: DR-DOS, ROM-DOS, PTS-DOS (PhysTechSoft DOS)

เนื่องจาก legacy applications มากมายที่รองรับ disk operating systems น่าจะยังคงใช้งานต่อไปในอนาคตที่คาดการณ์ได้ วันนี้ใช้ได้สำหรับ simple embedded systems หรือ use cases อื่นๆ เพราะให้ machine independence และ licensing costs เป็นศูนย์สำหรับ free/open source OSes

อย่างไรก็ตาม legacy OSs นี้มีปัญหาความปลอดภัยร้ายแรง ทำให้ยากที่จะปกป้องต้าน modern cyberattacks เช่น SQL injections, man-in-the-middle (MitM) attacks, zero-day vulnerabilities และโจมตีที่คุ้นเคยจาก viruses, worms, ransomware, Trojans

Disk operating systems เล่นบทบาทสำคัญในการพัฒนา personal computing ต้นๆ วันนี้ 55 ปีหลังการพัฒนาเริ่มต้น ยังคงเป็นหนึ่งใน OS types สำคัญที่สุดในประวัติศาสตร์คอมพิวติ้ง

Microsoft OS ล่าสุดคือ Windows 11 ดู Windows 11 crash course สำหรับ desktop admins และ Microsoft users สำรวจสิ่งที่ต้องรู้เมื่อวางแผน upgrade ไป Windows 11

หมายเหตุ: สำหรับ disk operating system acronym ใช้เสมอ DOS (ตัวพิมพ์ใหญ่ทั้ง 3 ตัว) Acronym DoS ตัว "o" เล็ก คือ denial of service วิธีโจมตี networked computer โดยส่ง requests จำนวนมากผิดปกติ เพื่อทำให้ resources หมด ผู้ใช้จริงเข้าถึงไม่ได้