Objective 1 Distinguish between true and false statements concerning the terms which relate to Part 3 in the index for this block, or explain the terms in your own words.
Objective 2 Describe the primary functions of an operating system
SAQ1 Make a short list of the primary functions of the operating system of your computer.
| 1 | To provide a means whereby the hardware resources of a computer system can be used effectively |
| 2 | To provide an interface between application software and the hardware of a computer system |
| 3 | To insulate the user from some of the complexities of using a computer |
| 4 | To provide a means of communication between the user and a computer |
Objective 3 Explain the term "layered operating system" and discuss the benefits of layering in terms of the flexibility and portability of application programs
Operating systems are divided into various layers. At the lowest level are the basic device drivers. At the next level are routines that provide a set of useful functions for application programs; and at the top level is the section that decodes commands and provides the file management facilities.
SAQ2 Assume a particular operating system incorporates facilities for block data transfers between computers. An application program needs to use these facilities to send and receive data via a serial port to a remote computer. List the hardware-dependent and hardware-independent modules that might be included in the operating system, and draw a diagram similar to Figure 3 showing how the application program might use these modules to send data to the remote computer.
The hardware-dependent modules would be modules to read and write single data-words to and from the serial port. The hardware-independent modules would form the data into blocks, adding the necessary checksums, etc. and would provide the required block read and acknowledge functions to implement the protocol.
Objective 4 Describe the advantages and disadvantages of system calls and logical devices over other methods of accessing hardware.
A logical device is assigned a special name and limited set of operational characteristics. The actual device can change, but the name remains the same (i.e. it's "the teleprinter" regardless of whether its made by Canon or Epson). The advantage is that programs that used the original device can use the changed device.
A system call is a subroutine call to one of the core modules of the Operating System, e.g. for file housekeeping or allocation of memory space.
SAQ3 Why are logical devices unlikely to offer the same range of features and capabilities as an actual I/O device?
Logical devices were developed to improve the portability of software between alternative combinations of I/O hardware and different versions of the operating system. In order to satisfy this requirement for portability, logical devices must not support special features of a periphera, nor can they assume particular hardware designs (e.g. memory-mapped or direct I/O) unless they are part of the basic specification for the peripheral.
SAQ4 Many programmers argue that using system calls increases program execution time and hence slows down the response of the computer. Why do you think they might have reached this conclusion?
1) There are more subroutine calls, each of which means regosters must be saved, parameters must be oushed onto the stack, etc. 2) Extra processing is required to determine which system call was requested. 3) Most system calls are designed to support generic hardware (e..g logical devices) and it may be necessary to create extra functions to overcome the limitations of such generic designs.
Objective 5 Describe (or sketch) the main sections of the MS-DOS operating system and describe their functions and interaction.
SAQ5 List the main advantages of the layered approach adopted in the MS-DOS operating-system software.
The layered approach separates the hardware-independent routines (BIOS) from the hardware-dependent routines (BIOS) and so:
offers greater software portability
ensures that applications can be developed independently of specific hardware interfaces
provides high-level language programmers with a consistent set of subroutine calls to access all the I/O facilities
Objective 6 Give examples of the sort of facilities the MS-DOS BIOS provides and describe how they are accessed by the application program.
The type of support that MS-DOS BIOS provides is for video output routines, serial port routines, keyboard routines, printer routines etc. BIOS routines are accessed using special 8086 software interrupt instructions, of the form INT + simgle numeric parameter.
Objective 7 Describe the technique used by MS-DOS for incorporating new or updated device drivers
SAQ6 Explain the advantages of the linked list of device drivers adopted by MS-DOS
1) The list can be expanded or contracted without impeding the basic operation of the list. New device drivers can be added to the list of drivers supported by the operating system, simply by adding a new entry to the list.
2) New drivers can replace existing drivers. As MS-DOS always starts from the beginning of the list, it will locate the newest driver first.
Objective 8 Outline the structure of the Windows operating system, highlighting the differences between Windows 3.x and subsequent versions
The Windows operating system was originally developed as a GUI add-on to the MS-DOS operating system. Versions subsequent to 3.x are complete operating systems in their own right. Each new version of Windows is compatible with old versions whilst making the most of the power and speed found in new processors. In parallel with these developments is the Windows NT system which is a 32-bit system designed to operate in network servers.
Objective 9 Describe the importance of file types in Windows
Windows relies heavily on filename extensions to determine the type of a file. In Windows 95, file types and their associations are held in a registry.
SAQ7 Many of the files in the Windows directory, and also in the directories containing Windows applications have the extension DLL. What is the purpose of these files?
They are Dynamic Link Libraries. A DLL is a library of functions that can be called by a program when the program is run, rather than being linked to it when it is compiled. Windows allows a DLL to be loaded only if and when it is needed, during execution of the program.
Objective 10 Describe how files are stored on disk and accessed. Given a sample disk directory, decide information about the files stored on the disk.
Disks are coated with a magnetic material similar to that on audiocassette tapes. One of the read/write heads are moved radially across the surface of the disk as it rotates. Data is stored on a number of concentric rings called tracks and each track is divided into a number of sectors.The map of track and sector usage is stored as a file allocation table on the disk. Two copies of FAT are stored to increase reliability.
SAQ9 The size of clusters in a hard disk filing system is a compromise. What advantages might be gained by having small clusters / large clusters?
Every file uses at least one cluster, even if it is very small. If a small cluster size is used, less of the available disk space is wasted when several files which do not fit exactly into clusters are stored, as the unusable space at the end of each file will be smaller.
However, larger clusters mean fewer clusters, so the FAT can be smaller. The FAT will take up less memory and may be easier for the operating system to manage. Also, the access speed may be faster since the disk head will have less travelling to do between sectors on the disk.
Objective 11 Outline the structure of the Macintosh System.
The Macintosh system is divided into two parts:
| 1 | the basic BIOS which is contained in ROM |
| 2 | the remainder of the system, which is supplied on disk and loaded during boot-up |
Routines stored in ROM can be overridden by new or updated routines in a similar way to the MS-DOS linked list. The Macintosh System provides facilities for adding support for special devices, two of the most important being system extensions and control-panel devices. Desk accessories are programs permanently stored in main memory: they are instantly accessible from the user's desktop.
Objective 12 Explain the use of an emulator for executing code written for a different processor with particular reference to the AppleMac range of computers.
In 1994 Apple changed the processor in their Macintosh computers from the CISC 68000 family to the RISC PowerPC family. In order to use old 68000 software on new machines, an emulator is incorporated which converts the68000 machie code into executable code for the PowerPC processor. Emulation can also be used successfully to enable Windows and Windows applications to run on a Power-PC based Mac computer.
SAQ10 A program written for a 68040-based Macintosh computer is to be run on a PowerPc 601 based machine. What factors will determine how fast the program will run on this machine in comparison with the 68040-based machine?
Some factors are:
in general, one 68040 instruction will be translated into several PowerPC instructions. (generally more instructions in a RISC than a CISC).
relative clock speeds of the two processors
use made of features such as caching and pipelining
Objective 13 Outline the features of a multitasking operating system, and in particular those of Windows.
A multitasking system allows teo or more programs or tasks to be executed concurrently. It uses a scheme called pre-emptive scheduling which shares resources on a timed basis. Programs and sub-program units which execute concurrently are referred to as processes and threads respectively.
Windows 95, 98 and NT are multithreading systems which use pre-emptive scheduling. Threeads are scheduled using a combination of time and priority setting. The operating system can change the priority of a thread as it sees fit, so that the system as a whole works efficiently.
SAQ11 What are the potential benefits of segmenting the kernel of a multitasking operating system into tasks?
The kernel of most operating systems contains the basic I/O routines for devices such as keyboards, mouse, disks and video display. If these routines are written as tasks, then they can be scheduled, and hence compete for resources along with application tasks.
The major benefit is a more responsive system, since applications are not locked out from the processor by monolithe system functions.
A second benefit is that multiple applications can compete for the same system resources and receive services as I/O devices become available.
Objective 14 Explain how different tasks are protected from each other in a multitasking system
An ideal multi-tasking system should be robust so that an error in one task does not affect other tasks or bring the whole operating system to a halt.
SAQ12 How is the Windows 95 base operating system protected against corruption by errors in application programs?
1) The operating system is given its own reserved virtual memory space.
2) It runs at privilege level 0 (the highest) whereas application program runs at privilege level 3, at which programs are unable to execute "unsafe" instructions or access memory segments that have been assigned a higher privilege.