C:\UMBC\331\java> java.ext.dirs=C:\JDK1.2\JRE\lib\ext java.io.tmpdir=C:\WINDOWS\TEMP\ os.name=Windows 95 java.vendor=Sun Microsystems Inc. java.awt.printerjob=sun.awt.windows.WPrinterJob java.library.path=C:\JDK1.2\BIN;.;C:\WINDOWS\SYSTEM;C:\... java.vm.specification.vendor=Sun Microsystems Inc. sun.io.unicode.encoding=UnicodeLittle file.encoding=Cp1252 java.specification.vendor=Sun Microsystems Inc. user.language=en user.name=nicholas java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport... java.vm.name=Classic VM java.class.version=46.0 java.vm.specification.name=Java Virtual Machine Specification sun.boot.library.path=C:\JDK1.2\JRE\bin os.version=4.10 java.vm.version=1.2 java.vm.info=build JDK-1.2-V, native threads, symcjit java.compiler=symcjit path.separator=; file.separator=\ user.dir=C:\UMBC\331\java sun.boot.class.path=C:\JDK1.2\JRE\lib\rt.jar;C:\JDK1.2\JR... user.name=nicholas user.home=C:\WINDOWS C:\UMBC\331\java>java envSnoop -- listing properties -java.specification.name=Java Platform API Specification awt.toolkit=sun.awt.windows.WToolkit java.version=1.2 java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment user.timezone=America/New_York java.specification.version=1.2 java.vm.vendor=Sun Microsystems Inc. user.home=C:\WINDOWS java.vm.specification.version=1.0 os.arch=x86 java.awt.fonts= java.vendor.url=http://java.sun.com/ user.region=US file.encoding.pkg=sun.io java.home=C:\JDK1.2\JRE java.class.path=C:\Program Files\PhotoDeluxe 2.0\Adob... line.separator=
View full slide show




Disk Scheduling  The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk bandwidth  Access time has two major components  Seek time is the time for the disk to move the heads to the cylinder containing the desired sector  Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head  Minimize seek time  Seek time  seek distance  Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer Operating System Concepts with Java – 8th Edition 12.8 Silberschatz, Galvin and Gagne ©2009
View full slide show




Disk Management  Low-level formatting, or physical formatting — Dividing a disk into sectors that the disk controller can read and write  To use a disk to hold files, the operating system still needs to record its own data structures on the disk  Partition the disk into one or more groups of cylinders  Logical formatting or “making a file system”  To increase efficiency most file systems group blocks into clusters  Disk I/O done in blocks  File I/O done in clusters  Boot block initializes system  The bootstrap is stored in ROM  Bootstrap loader program  Methods such as sector sparing used to handle bad blocks Operating System Concepts with Java – 8th Edition 12.18 Silberschatz, Galvin and Gagne ©2009
View full slide show




Chapter 2: Operating-System Structures  Operating System Services  User Operating System Interface  System Calls  Types of System Calls  System Programs  Operating System Design and Implementation  Operating System Structure  Virtual Machines  Operating System Debugging  Operating System Generation  System Boot Operating System Concepts – 8th Edition 2.2 Silberschatz, Galvin and Gagne ©2009
View full slide show




Chapter 2: Operating-System Structures  Operating System Services  User Operating System Interface  System Calls  Types of System Calls  System Programs  Operating System Design and Implementation  Operating System Structure  Virtual Machines  Operating System Debugging  Operating System Generation  System Boot Operating System Concepts – 8th Edition 2.2 Silberschatz, Galvin and Gagne ©2009
View full slide show




Overview of Mass Storage Structure  Magnetic disks provide bulk of secondary storage of modern computers  Drives rotate at 60 to 200 times per second  Transfer rate is rate at which data flow between drive and computer  Positioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency)  Head crash results from disk head making contact with the disk surface  That’s bad  Disks can be removable  Drive attached to computer via I/O bus  Busses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSI  Host controller in computer uses bus to talk to disk controller built into drive or storage array Operating System Concepts with Java – 8th Edition 12.4 Silberschatz, Galvin and Gagne ©2009
View full slide show




Output //******************************************************************** // SolveTowers.java Author: Lewis/Loftus Move one disk from 1 to 2 // Move one disk from 1 to 3 // Demonstrates recursion. Move one disk from 2 to 3 //******************************************************************** Move one disk from 1 to 2 public class SolveTowers Move one disk from 3 to 1 { Move one disk from 3 to 2 //----------------------------------------------------------------Move one disk from 1 to 2 // Creates a TowersOfHanoi puzzle and solves it. Move one disk from 1 to 3 //----------------------------------------------------------------disk from public static voidMove mainone (String[] args)2 to 3 Move one disk from 2 to 1 { TowersOfHanoi towers = new TowersOfHanoi Move one disk from 3 to (4); 1 Move one disk from 2 to 3 towers.solve();Move one disk from 1 to 2 } Move one disk from 1 to 3 } Move one disk from 2 to 3
View full slide show




Chapter 2: Operating-System Structures  Operating System Services  User Operating System Interface  System Calls  Types of System Calls  System Programs  Operating System Design and Implementation  Operating System Structure  Virtual Machines  Operating System Debugging  Operating System Generation  System Boot Operating System Concepts Essentials – 8th Edition 2.2 Silberschatz, Galvin and Gagne ©2011
View full slide show




Redundant Array of Independent Disks (RAID) Data organization on multiple disks Data disk 0 Data disk 1 Data disk 2 Mirror disk 0 Mirror disk 1 RAID0: Multiple disks for higher data rate; no redundancy Mirror disk 2 RAID1: Mirrored disks RAID2: Error-correcting code DataA disk 0 DataB disk 1 DataC disk 2 Data D disk 3 Parity P disk Spare disk RAID3: Bit- or b yte-level striping with parity/checksum disk ABCDP=0 B=ACDP Data 0 Data 1 Data 2 Data 0’ Data 1’ Data 2’ Data 0” Data 1” Data 2” Data 0’” Data 1’” Data 2’” Parity 0 Parity 1 Parity 2 Spare disk RAID4: Parity/checksum applied to sectors,not bits or bytes Data 0 Data 1 Data 2 Data 0’ Data 1’ Data 2’ Data 0” Data 1” Parity 2 Data 0’” Parity 1 Data 2” Parity 0 Data 1’” Data 2’” Spare disk RAID5: Parity/checksum distributed across several disks RAID6: Parity and 2nd check distributed across several disks Fig. 19.5 RAID levels 0-6, with a simplified view of data organization. Computer Architecture, Memory System Design Slide 50
View full slide show




Disk Management     Low-level formatting, or physical formatting — Dividing a disk into sectors that the disk controller can read and write  Each sector can hold header information, plus data, plus error correction code (ECC)  Usually 512 bytes of data but can be selectable To use a disk to hold files, the operating system still needs to record its own data structures on the disk  Partition the disk into one or more groups of cylinders, each treated as a logical disk  Logical formatting or “making a file system”  To increase efficiency most file systems group blocks into clusters  Disk I/O done in blocks  File I/O done in clusters Boot block initializes system  The bootstrap is stored in ROM  Bootstrap loader program stored in boot blocks of boot partition Methods such as sector sparing used to handle bad blocks Operating System Concepts Essentials – 8 th Edition 11.28 Silberschatz, Galvin and Gagne ©2011
View full slide show




Disk Management   Low-level formatting, or physical formatting — Dividing a disk into sectors that the disk controller can read and write  Each sector can hold header information, plus data, plus error correction code (ECC)  Usually 512 bytes of data but can be selectable To use a disk to hold files, the operating system still needs to record its own data structures on the disk  Partition the disk into one or more groups of cylinders, each treated as a logical disk  Logical formatting or “making a file system”  To increase efficiency most file systems group blocks into clusters  Disk I/O done in blocks  File I/O done in clusters Operating System Concepts Essentials – 2nd Edition 9.29 Silberschatz, Galvin and Gagne ©2013
View full slide show




Disk Scheduling (Cont.)  There are many sources of disk I/O request  OS  System processes  Users processes  I/O request includes input or output mode, disk address, memory address, number of sectors to transfer  OS maintains queue of requests, per disk or device  Idle disk can immediately work on I/O request, busy disk means work must queue  Optimization algorithms only make sense when a queue exists  Note that drive controllers have small buffers and can manage a queue of I/O requests (of varying “depth”)  Several algorithms exist to schedule the servicing of disk I/O requests  The analysis is true for one or many platters  We illustrate scheduling algorithms with a request queue (0-199) 98, 183, 37, 122, 14, 124, 65, 67 Head pointer 53 Operating System Concepts Essentials – 8 th Edition 11.17 Silberschatz, Galvin and Gagne ©2011
View full slide show




// Copy constructor: Makes a deep // // copy of the *this queue. // queue:: queue(const queue &q) { nodePtr copyPreviousPtr, copyPtr, origPtr; if (q.head == NULL) tail = head = NULL; else { head = getNode(q.head->item); copyPreviousPtr = head; origPtr = q.head->next; while (origPtr != NULL) { copyPtr = getNode(origPtr->item); copyPreviousPtr->next = copyPtr; copyPreviousPtr = copyPtr; origPtr = origPtr->next; } tail = copyPreviousPtr; } } // Enqueue function; Inserts item // // into the back of the *this queue. // void queue:: enqueue(const elementType &elt) { nodePtr newPtr = getNode(elt); assert (newPtr != NULL); if (head == NULL) head = tail = newPtr; else { tail->next = newPtr; tail = newPtr; } } // Dequeue function; Removes item // from the front of the *this queue // (assuming such an item exists). elementType queue:: dequeue() { elementType elt; nodePtr oldHead; // isEmpty function; Determines // // if the *this queue is empty. // bool queue:: isEmpty() { return (head == NULL); } } CS 240 // // // assert(head != NULL); oldHead = head; elt = head->item; head = head->next; if (head == NULL) tail = NULL; delete oldHead; return elt; 7
View full slide show




// Copy constructor: Makes a deep // // copy of the *this queue. // queue:: queue(const queue &q) { nodePtr copyPreviousPtr, copyPtr, origPtr; if (q.head == NULL) tail = head = NULL; else { head = getNode(q.head->item); copyPreviousPtr = head; origPtr = q.head->next; while (origPtr != NULL) { copyPtr = getNode(origPtr->item); copyPreviousPtr->next = copyPtr; copyPreviousPtr = copyPtr; origPtr = origPtr->next; } tail = copyPreviousPtr; } } // Enqueue function; Inserts item // // into the back of the *this queue. // void queue:: enqueue(const elementType &elt) { nodePtr newPtr = getNode(elt); assert (newPtr != NULL); if (head == NULL) head = tail = newPtr; else { tail->next = newPtr; tail = newPtr; } } // Dequeue function; Removes item // // from the front of the *this queue // // (assuming such an item exists). // elementType queue:: dequeue() { elementType elt; nodePtr oldHead; // isEmpty function; Determines // // if the *this queue is empty. // bool queue:: isEmpty() { return (head == NULL); } assert(head != NULL); oldHead = head; elt = head->item; head = head->next; if (head == NULL) tail = NULL; delete oldHead; return elt; } CS 240 Chapter 7 - Queues Page 6
View full slide show




Overview of Mass Storage Structure  Magnetic disks provide bulk of secondary storage of modern computers  Drives rotate at 60 to 250 times per second  Transfer rate is rate at which data flow between drive and computer  Positioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency)  Head crash results from disk head making contact with the disk surface  That’s bad  Disks can be removable  Drive attached to computer via I/O bus  Busses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSI, SAS, Firewire  Host controller in computer uses bus to talk to disk controller built into drive or storage array Operating System Concepts Essentials – 8 th Edition 11.4 Silberschatz, Galvin and Gagne ©2011
View full slide show