Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 6, Problem 6.24HW
Suppose that a 2 MB file consisting of 512-byte logical blocks is stored on a disk drive with the following characteristics:
Parameter | Value |
Rotational rate | 15,000 RPM |
Seek | 4 ms |
Average number of sectors/track | 1,000 |
Surfaces | 8 |
Sector size | 512 bytes |
For each case below, suppose that a program reads the logical blocks of the file sequentially, one after the other, and that the time to position the head over the first block is Tavg seek + Tavg rotation.
- A. Best case: Estimate the optimal time (in ms) required to read the file over all possible mappings of logical blocks to disk sectors.
- B. Random case: Estimate the time (in ms) required to read the file if blocks are mapped randomly to disk sectors.
Expert Solution & Answer
Learn your wayIncludes step-by-step video
schedule05:48
Students have asked these similar questions
An application loads 100 libraries at start-up. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm. If all 100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data from the disk block once the head has been positioned at the start of the block may be neglected.)
While statements may start and stop anywhere in the flexible manner popularized by Algol60, most modern programming languages insist that statements finish with an end sign like a semicolon or colon. To the contrary, Python and a handful of other programming languages adhere to a set structure in which statements start in a certain column and stop at the end of a line of code unless continuation marks are provided for each statement. Discover how readability, writability, and security are affected by a file's fixed or free format in the following paragraphs.
No files need to be provided , the file foo is just an example.
Chapter 6 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 6.1 - Prob. 6.1PPCh. 6.1 - Prob. 6.2PPCh. 6.1 - Prob. 6.3PPCh. 6.1 - Prob. 6.4PPCh. 6.1 - Prob. 6.5PPCh. 6.1 - Prob. 6.6PPCh. 6.2 - Prob. 6.7PPCh. 6.2 - Prob. 6.8PPCh. 6.4 - Prob. 6.9PPCh. 6.4 - Prob. 6.10PP
Ch. 6.4 - Prob. 6.11PPCh. 6.4 - Prob. 6.12PPCh. 6.4 - Prob. 6.13PPCh. 6.4 - Prob. 6.14PPCh. 6.4 - Prob. 6.15PPCh. 6.4 - Prob. 6.16PPCh. 6.5 - Prob. 6.17PPCh. 6.5 - Prob. 6.18PPCh. 6.5 - Prob. 6.19PPCh. 6.5 - Prob. 6.20PPCh. 6.6 - Prob. 6.21PPCh. 6 - Prob. 6.22HWCh. 6 - Prob. 6.23HWCh. 6 - Suppose that a 2 MB file consisting of 512-byte...Ch. 6 - The following table gives the parameters for a...Ch. 6 - The following table gives the parameters for a...Ch. 6 - Prob. 6.27HWCh. 6 - This problem concerns the cache in Practice...Ch. 6 - Suppose we have a system with the following...Ch. 6 - Suppose we have a system with following...Ch. 6 - Suppose that a program using the cache in Problem...Ch. 6 - Repeat Problem 6.31 for memory address0x16E8 A....Ch. 6 - Prob. 6.33HWCh. 6 - Prob. 6.34HWCh. 6 - Prob. 6.35HWCh. 6 - Prob. 6.36HWCh. 6 - Prob. 6.37HWCh. 6 - Prob. 6.38HWCh. 6 - Prob. 6.39HWCh. 6 - Given the assumptions in Problem 6.38, determine...Ch. 6 - You are writing a new 3D game that you hope will...Ch. 6 - Prob. 6.42HWCh. 6 - Prob. 6.43HWCh. 6 - Prob. 6.45HWCh. 6 - Prob. 6.46HW
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
(Catch Parameter) Under what circumstances would you not provide a parameter name when defining the type of the...
C How to Program (8th Edition)
For each of the following E-R diagrams from Chapter 2 C: Transform the diagram to a relational schema that show...
Modern Database Management
Write code that displays the contents of the int variable i in binary, hexadecimal, and octal.
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
What will the following code display? stuff = {1 : 'aaa', 2 : 'bbb', 3 : ccc} for k in stuff: print(k)
Starting Out with Python (4th Edition)
The article mentions that quantum computers will have tremendous processing power and revolutionize a number of...
Using MIS (10th Edition)
1. Read the problem statement. 2. Formulate the algorithm using pseudocode and top-down, stepwise refinement. 3...
Java How To Program (Early Objects)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Goal:Experimenting with AES-128 symmetric key cipher. Note:Using Python programming language that provided libraries for AES. Description:PART 1: write a program that uses AES-128 to decrypt a message. The program should be named "decrypt", and should deal with three files that contain the encrypted text as a stream of bytes, the 128-bit key for decryption stored as a stream of bytes, and the outcome of the decryption, respectively.- To test this program, here's an example of an encrypted message (ciphertext.dat) and its 128-bit secret key (key.dat). PART 2: you will try to use "brute force" to decrypt an encrypted message, where you only have the first 96-bits of the 128-bit secret key (last 4 bytes of the secret key are missing!) The program should be called "findk", and should deal with two files that contain the encrypted text as a stream of bytes and the first 96-bits of the key, respectively. The program should print out on standard output the missing 4 bytes of the key in…arrow_forwardIn python, rite a recursive function, displayFiles, that expects a pathname as an argument. The path name can be either the name of a file or the name of a directory. If the pathname refers to a file, its filepath is displayed, followed by its contents, like so: File name: file_path Lorem ipsum dolor sit amet, consectetur adipiscing elit... Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory, like so: Directory name: directory_path File name: file_path1 Lorem ipsum dolor sit amet... File name: file_path2 Lorem ipsum dolor sit amet... ... Test this function in a new program.arrow_forwardQ14: The function f(x) = e can be represented in a Taylor series by: ex = -Σ n! 72=0 Write a program in a script file that determines e by using the Taylor series representation. The program calculates e by adding terms of the series and stopping when the absolute value of the term that was added last is smaller than 0.0001. Use the program to calculate e², e05 and eª This problem can be solved by using while - end loop because : ONumber of passes not known OIt is a Taylor series All of the given O Number of passes is predetermined O Estimated error value must be calculatedarrow_forward
- USE PYTHON Python already supports math, whereby you can write code to add, subtract, multiply, or divide values and even variables. But let’s write a program that enables users to do math, even without knowing Python. In a file called interpreter.py, implement a program that prompts the user for an arithmetic expression and then calculates and outputs the result as a floating-point value formatted to one decimal place. Assume that the user’s input will be formatted as x y z, with one space between x and y and one space between y and z, wherein: x is an integer y is +, -, *, or / z is an integer For instance, if the user inputs 1 + 1, your program should output 2.0. Assume that, if y is /, then z will not be 0. Note that, just as python itself is an interpreter for Python, so will your interpreter.py be an interpreter for math! Please see 2 attached photos for demo and Test program. **USE PYTHON** THANKSarrow_forwardUse C++arrow_forwardPlease help me quicklyarrow_forward
- trtjhrtjhrthrtarrow_forwardgiven a file(use any text file) write MIPS instruction(assembly language) to count all words in that file. note: A single letter is counted as a word for example assume this sentence written in txet file : "bartleby is a website" please do your best i need this the output should be: word count = 4arrow_forwardUsing only standard I/O functions (like fopen(), fseek(), ftell(), fgets(), etc.), write a C program to reverse the order of the lines in a text file. That is the first line becomes last, the second line becomes the one before the last one and so on. Note: your program should have two arguments, the input file name and the output file name. Call model: reverseFile Input file:HelloI am happy to see youOutput file:I am happy to see youHelloarrow_forward
- Using Matlab The scores of 10 students in two mid-term exams are given below.Exam1 = [54 99 70 76 88 74 95 67 73 85]Exam2 = [88 85 79 76 98 66 95 72 100 68]Write a program in a script file to answer the following(a) Calculate the average of each exam(b) Find how many students obtained below the average in each exam(c) Find how many students, and which students, obtained equal scores in both exams.arrow_forwardThe following segment of program is store -- in to number -- memory locations. MOV AL, OF MOV CX 05H CLD Again: STOSB LOOP Again OFH 05h 05H OFH OFH 06h 05H 10Harrow_forwardComputer Science Using Java, write a simple Insertion Sort program that can read in integers from a text file (line by line) and sort them into another text file. Use inFile and outFile for the input and output files, respectively. Also make sure that the algorithm keeps track of the comparisons and exchanges performed by the sort so that they may be printed out in the console after the sort is completedarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Instruction Format (With reference to address); Author: ChiragBhalodia;https://www.youtube.com/watch?v=lNdy8HREvgo;License: Standard YouTube License, CC-BY