1) What is the first step in problem-solving? A) Writing code B) Debugging C) Understanding the problem D) Optimizing the solution Answer: C 2) Which of these is not a step in the problem-solving process? A) Algorithm development B) Problem analysis C) Random guessing D) Testing and debugging Answer: C 3) What is an algorithm? A) A high-level programming language B) A step-by-step procedure to solve a problem C) A flowchart D) A data structure Answer: B 4) Which of these is the simplest data structure for representing a sequence of elements? A) Dictionary B) List C) Set D) Tuple Answer: B 5) What does a flowchart represent? A) Errors in a program B) A graphical representation of an algorithm C) The final solution to a problem D) A set of Python modules Answer: B 6) What is pseudocode? A) Code written in Python B) Fake code written for fun C) An informal high-level description of an algorithm D) A tool for testing code Answer: C 7) Which of the following tools is NOT commonly used in pr...
Transforming I/O Requests to Hardware Operations
* Users appeal data using file names, which must ultimately be mapped to specific blocks of data from a specific device managed by a specific device driver.
* DOS uses the colon separator to specify a particular device ( e.g. C:, LPT:, etc. )
* UNIX uses a mount table to map filename append ( e.g. /usr ) to specific mounted devices. Where many entries in the mount table match different appends of the filename the one that matches the longest append is chosen. ( e.g. /usr/home instead of /usr where both subsits in the mount table and both match the required file. )
* UNIX uses special device files, usually located in /dev, to represent and process physical devices directly.
• Each device file has a major and minor number related with it, stored and
displayed where the file size could normally go.
• The high number is an index into a table of device drivers, and implies which
device driver handles this device. ( E.g. the disk drive handler. )
• The minor number is a parameter moved to the device driver, and implies which
particular device is to be processed, out of the many which may be handled by a
particular device driver. ( e.g. a specific disk drive or partition. )
* A series of lookup tables and mappings makes the access of different devices adaptable, and somewhat transparent to users.
* Figure explains the steps taken to process a ( blocking ) read request: