Back 

Operating systems questions and answers

Questions

Q1. Define an 'operating system'.
Q2. List six typical functions of a personal computer's operating system.
Q3. Define an ‘interrupt’.
Q4. Describe how an operating system handles two different kinds of interrupts occurring simultaneously.
Q5. Describe the difference between a ‘processor-bound’ job and an ‘I/O-bound’ job.
Q6. What are the aims of scheduling?
Q7. Describe the role of the process control block in scheduling.
Q8. Describe the role of 'pages' and the 'page file' in memory management.
Q9. What is meant by 'disk threshing'?
Q10. Describe how files are stored on a hard drive using the File Allocation Table.

Answers

Q1. An operating system is a program or set of programs which are responsible for managing and controlling a computer.
Q2. Six typical functions of an operating system include providing a user interface, error reporting, memory management, resources management, I/O management, device management and interrupt management, amongst others.
Q3. Interrupts are signals generated by a hardware device or by a software application that tell the CPU it needs some CPU time.
Q4. Interrupts are given a priority. If two occur at the same time then the one with the highest priority is done first.
Q5. Processes that require lots of processor time and very little input/output are known as ‘processor-bound’ jobs. A process that requires lots of input/output but very little actual CPU processing is known as an ‘I/O-bound’ job.
Q6. The aims of scheduling are to make sure the CPU is working as hard and as efficiently as possible, to make sure the resources such as printing are used as efficiently as possible and to make ensure that users on a network think they are the only ones on the system.
Q7. When the CPU stops working on the current process, ready to start working on another program, it needs to record exactly where it is in the current process. This will enable it to pick up from where it left off next time it works on that process. How does it do that? Each program that could run is allocated a block of memory called a process control block. This will hold the following information: Process Identity Number, the current state of the job when the job was last left, the contents of each register when the job was last left, what priority the process has, the estimated time for the job to be finished, its current status, whether it is waiting for I/O, whether it's waiting to use the CPU and pointers pointing to areas in memory reserved for this process and resources that could be used. When a process is stopped, the above details are loaded into the Process Control Block, ready for next time the process uses CPU time. When that time comes, the contents of the PCB are moved into the CPU and the process repeats itself!
Q8. Paging is the organisation of memory into fixed sized units. These are called pages. The operating system has to keep track of where pages of information are, whether they are on the hard drive or in RAM. The tracking information is held in page tables.
Q9. Disk thrashing (or threshing) is the term used to describe when pages of information are very quickly swapped in and out of the hard drive and RAM, usually causing the computer to slow right down while it waits for all the page swaps to be completed.
Q10. The FAT is a database that keeps a log of every file on the hard drive. It is created by the operating system when you format the disk and it is stored on track zero of the disk itself. Your hard disk is divided into sectors, each one being able to store a fixed number of bytes. These sectors are grouped into clusters. Each file is held in a linked list of clusters. The FAT holds the start address of the first cluster in the linked list. When a particular file is wanted, the operating system looks up the address of the first cluster in the FAT. It then follows this address and retrieves the first cluster as well as the address of the next cluster. It then goes to that address to get the next cluster, and continues like this until all the clusters have been retrieved and the end-of-file marker is reached (the null pointer).

Back