Section __________________________
ITEC 625 Final Examination
The Exam is open book/notes, but individual, not to be shared. Save the file with your answers as a MS Word file (please label the file YourLastName Midterm.doc), and post it in your Assignments folder before the deadline. Please do keep the questions/instructions and points for each question in this Word document with your answers.
Answer the questions clearly, explain your answer, and show your work. Answers, even if right but without an explanation, will get no credit. The explanations need to be brief, but complete, logical, and to the point. Do not quote anybody else, use your own words. Answer in the space provided or add lines if really needed. Each question is worth 10 points!
Q1: In terms of performance gains, what role does an I/O controller located inside the peripheral device perform? (50 to 100 words should be sufficient to answer this question)
The management of I/O devices are very important when it comes to the Operating Systems. The input-output controller is the mediator between the processor and I/O devices. It can easily regulate the data exchange between the external devices and main memory. The control also acts as a buffer due to the speed disparities between the external devices and the main memory. It also provides an error detection mechanism. The controller also holds the address to the register the peripheral devices is trying to access, therefore, improving the performance of the peripheral device. (Silberschatz et.al., 2008)
Q2: Consider the steps required to write a block of data from a disk to memory. Outline the major sequence of I/O events that must occur to make this possible. (There are three major steps)
1) Four pieces of data are sent to disk controller:
a) the location of the block in the main memory; b)the location where the data is to be stored on disk; c) the size of the block d) and the direction of transfer: Write.
2) The I/O service program sends a “ready” message to the disk controller and the DMA transfer process takes place.
3) After the transfer is complete, the disk controller sends an interrupt to the CPU signaling completion, and the interrupt handler either returns control to the program that initiated the request or notifies the operating system that the program can be resumed (Silberschatz et.al., 2008).
Q3: What is the capacity of a hard drive (in GB) consisting of 120,000 tracks, 4,000 sectors, and 4 surfaces? Assume each block has 512 bytes.
On one surface, the size is 120,000 x 4,000 x 512 bytes = 245,760,000,000 bytesConvert to GB: 245,760,000,000 bytes per surface *(1G / 2^30 bytes) = 228.9 GB persurfaceTotal capacity of drive is [4 surfaces] * [228.9 GB / surface] = 916 GB (Silberschatz et.al., 2008)
Q4: Explain what is meant by wear-leveling in Flash drives? Wear leveling in flash drives is a design process meant to extend the life of solid state storage devices such as flash drives. Any given block in a drive has finite number of erases cycles before it becomes exhausted and hence become unreliable. As such, a wear-leveling algorithm dynamically allocates the block which has the lowest erase count for any new writing thereby increasing the life span of the storage device (Silberschatz et.al., 2008).
Q5: There are two levels of scheduling. One level of scheduling determines which jobs will be admitted to the system and in what order. What does the other level of scheduling do?
It mainly deals with swapping. It removes the processes from the memory and hence reduce the degree of multiprogramming. A running process may be halted when an input or output request is made. As such, the running process has to be swapped and moved to the secondary storage to give room for another important process to run. As such it increases the efficiency of the system (Weiss, 2014).
APIs are the linking channel between the application programs and the operating systems. APIs are sets of requirements that govern how one application can talk to another. As such, APIs are important when accessing systems services by application programs since the offer an issulation and reduce the extent of manipulation of such the systems services. It, therefore, no systems is badly hurt after the accessing of any data between the two involved parties. It also makes it easy for the smaller programs to run efficiently and making the output to be easily understood (Silberschatz et.al., 2008).
Q7: How many 512 byte blocks are required to store a 1.6MB file?
512_bytes_blocks/2= Kilobytes
512_bytes_blocks/2/1024=Megabytes
Implying 1.6 mb= 409.6 blocks
(Silberschatz et.al., 2008)
Q8: Describe the Bitmap method for maintaining free space on a disk.
Space in a disk is essential. A way to maintain such space is through a bit map. Though mapping, the list of free disk space is implemented as a bit map where each block is represented by a single bit. 0 (zero) is marked as a free block and 1 (ones) is for an allocated block.
The approach is a simple and efficient method to find a consecutive free blocks on the disk but it has a major disadvantage is which is that extra disk space is required to store the said bit map. A disk with n blocks require a bit map of n bits.
Q9: In servicing read and write requests for a disk, how does First-come, first-served (FCFS) scheduling work? And, why is FCFS inefficient?
For the First-come, first-served, all incoming requests are place at the end of the queue and the next number in the queue is always served next. The number of the services offered is proportionate to the items in the queue.
The disadvantages of using the first-come, first-served is that the waiting time can be long especially where the short requests are waiting behind the long requests. It is also not appropriate during system sharing where an equal amount of time for the interval is required. The FCFS scheduling therefore calls for a proper mix of jobs to achieve a certain desired goal, therefore, calling for another algorithm to arrange the job appropriately. As such, the First-come, First-served scheduling is not the ideal scheduling to use (Weiss, 2014).
Q10: In a preemptive system, what is a 'time-out'?
A time-out is the expected starting time of previously interrupted task carried out by the computer system without requiring its cooperation (Weiss, 2014).
Reference
Weiss A.M. (2014), "Data Structures and Algorithm Analysis", Florida International University
Silberschatz A., Gagne G., Galvin P. B., (2008) "Operating System Concepts" Retrieved on 6 August 2016 from https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/13_IOSystems.html