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

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.3: Random File Access
Problem 6E
icon
Related questions
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage