Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Which of the following operations should only be allowed to be done when the CPU is in kernel mode?
Group of answer choices
1) Read data from a file
2) Open a file for reading, writing, or both
3) Set the time-of-day clock
4) Read the time-of-day clock
A programmer opened a file using the file descriptor fd. The file contains the following sequence of bytes:
12, 14, 33, 33, 33, 12, 14, 1, 6, 33, 12, 14, 1, 6, 12
The programmer then uses these two system calls:
lseek(fd, 3, SEEK_SET);
read(fd, &buffer, 4);
note, the lseek call makes a seek to byte 3 of the file. What does buffer contain after the read system call completes?
Group of answer choices
1) 33 33 33 12
2) 33 33 12 14
3) 33 12 14 1
4) 33 12 14
In a uniprocessor system, multiprogramming increases processor efficiency by:
Group of answer choices
1) All of the above
2) Increasing processor speed
3) Eliminating all idle processor cycles
4) Taking advantage of time wasted by long wait interrupt handling
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 5 steps
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
- Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage est Case 1 Please enter the file name or type QUIT to exit:\ninput1.txtENTERTotal: 11.800\nAverage: 2.950\n Test Case 2 Please enter the file name or type QUIT to exit:\ninput2.txtENTERTotal: 17.300\nAverage: 3.460\n Test Case 3 Please enter the file name or type QUIT to exit:\ninput3.txtENTERTotal: 1.124\nAverage: 1.124\n Test Case 4 Please enter the file name or type QUIT to exit:\ninput4.txtENTERFile input4.txt is empty.\n Test Case 5 Please enter the file name or type QUIT to exit:\ninput5.txtENTERFile: input5.txt does not exist.\nPlease enter the file name again or type QUIT to…arrow_forwardChapter 4. PC #14. Line Numbers (page 265) Write a java program that asks the user for the name of a file. The program should display the contents of the file with each line preceded with a line number followed by a colon. The line numbering should start at 1. I should be easily type input1.txt and easily print out the output in Eclipse. Please enter the file name or type QUIT to exit:\nquitENTER Test Case 2 Please enter the file name or type QUIT to exit:\nbadfilename.txtENTERFile: badfilename.txt does not exist.\nPlease enter the file name again or type QUIT to exit:\nquitENTER Test Case 3 Please enter the file name or type QUIT to exit:\ninput1.txtENTER1: a\n2: b\n3: c\n4: d\narrow_forwardModify this program so that it writes the values in two columns, like this: 32.00 54.00 67.50 29.00 35.00 80.00 115.00 44.50 100.00 65.00 Total: 622.00 Complete the following file: total.cpp 1 #include #include 3 #include #include 5 using namespace std; 4 7 int main() 8 { // Prompt for the input and output file names cout » input_file; cout > output_file; 10 11 12 13 14 // Construct the streams for reading and writing ifstream in(input_file); ofstream out(output_file); 15 16 17 18 // Check for errors and format the output stream if (in.fail() || out.fail(O) { return - 1; } out > value) { out <« setw(15) <« value <« endl; total = total + value; } 26 27 28 29 30 31 32 33 out << setw(8) << total « endl; 34 35 return 0; 36 }arrow_forward
- Chapter 4. Homework Assignment (read instructions carefully) Write a program that asks the user for the name of a file. The program should read all the numbers from the given file and display the total and average of all numbers in the following format (three decimal digits): Total: nnnnn.nnn Average: nnnnn.nnn Class name: FileTotalAndAverage Here is a working code but please modify it so it passes the test cases because I run it it does not work: Also I do not need Goodbye. I run it through Hypergrade which has all the test cases and it does not pass. It says 0 out of 7 passed import java.io.File; //importing java.io.Fileimport java.io.FileNotFoundException; //importing FileNotFoundException for exception handlingimport java.util.Scanner; //importing Scanner for user inputpublic class FileTotalAndAverage { //class FileTotalAndAverage public static void main(String[] args) throws FileNotFoundException { Scanner keyboard = new Scanner(System.in); //declaring and…arrow_forwardWrite Visual basic codes to illustrate how to perform the following in Sequential Access files; a) open a sequantial file b) read a sequantial file c) write a sequancial filearrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education