Basic CS-Operating System [TCS Placement]: Sample Questions 12 - 13 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 12

Operating System
Edit

Describe in Detail

Essay▾

What is device drivers?

Explanation

  • Device driver is actually a communication layer between device and computer.
  • When a new device is added, the driver should be installed in order to run the program.
  • Device drivers plug into an OS to handle a particular device.
  • Operating System takes help from device drivers to handle all I/O devices.
  • Device drivers encapsulate device-dependent code and implement a standard interface in such a way that code contains device-specific register reads/writes.
  • Device driver is generally written by the device՚s manufacturer and delivered along with the device on a CD-ROM.
  • How a device driver handles a request is as follows:
    • Suppose a request comes to read a block N. If the driver is idle at the time a request arrives, it starts carrying out the request immediately.
    • Otherwise, if the driver is already busy with some other request, it places the new request in the queue of pending requests.
Given the Image is Define the Logical Position of Device Drivers

Question 13

Operating System
Edit

Write in Short

Short Answer▾

How can you instantiate a tuple?

Explanation

Using one of the following:

  • Using the new operator. For example,
    • Tuple < String, int > t = new Tuple < String, int > ( “HelloFriends” , 2) ;
    • Using the Create factory method available in the Tuple class. For example,
  • Tuple < int, int, int > t = Tuple. Create < int, int, int > (5,7, 8) ;

Developed by: