OPERATING SYSTEMS July 2018 Time: 3 hours
THE KENYA NATIONAL EXAMINATIONS COUNCIL
CRAFT CERTIFICATE IN INFORMATION TECHNOLOGY
MODULE I
OPERATING SYSTEMS
3 hours
INSTRUCTIONS TO THE CANDIDATES:
This paper consists of TWO sections, A and B.
Answer ALL the questions in section A and any FOUR questions in section B in the answer booklet provided.
Candidates should answer the questions in English.
This paper consists of 4 printed pages.
Candidates should check the question paper to ascertain that all the pages are printed as indicated and that no questions are missing.
© 2019 The Kenya National Examinations Council.
SECTION A (40 marks)
Answer ALL the questions in this section.
1. The computer processes on the basis of the CPU-based I/O model. Explain one disadvantage of each of the three modes of operation of the CPU.
Answer:
Polling: Consumes too much CPU time as it continuously checks whether a device requires attention.
Interrupts: Complex to implement because the system needs to save the state of the CPU before processing the interrupt.
Direct Memory Access (DMA): Requires additional hardware, which can be costly, and may cause conflicts when multiple devices attempt to access memory simultaneously.
2. Explain two advantages of a FAT32 file system.
Answer:
Supports larger volumes: FAT32 can handle larger storage drives than its predecessor FAT16, accommodating modern storage capacities.
Cross-platform compatibility: FAT32 is supported by a wide variety of operating systems, making it ideal for removable media.
3. Outline two advantages of using multiprocessor systems.
Answer:
Increased throughput: Multiple processors working together allow for more tasks to be completed in less time.
Fault tolerance: In case one processor fails, the system can still function using the remaining processors.
4. Explain a circumstance where a shortest job first scheduling algorithm would be applied to process management.
Answer:
Shortest job first (SJF) is most effective in batch systems where all jobs are known beforehand, allowing the system to minimize wait time by executing the shortest tasks first.
5. Outline four functions of the operating system’s memory manager.
Answer:
Allocation of memory space to processes.
Deallocation of memory when processes finish execution.
Managing memory swapping between the hard disk and main memory.
Ensuring that different processes do not interfere with each other’s memory space.
6. Explain the functions of each of the following utility programs:
(a) Disk defragmenter
(b) Disk cleanup
Answer:
(a) Disk defragmenter: Reorganizes fragmented data on a disk to improve access speed and performance.
(b) Disk cleanup: Identifies and removes unnecessary files from the disk to free up storage space.
7. Explain each of the following terms as applied in inter-process communication:
(a) Pipes
(b) Sockets
Answer:
(a) Pipes: A communication mechanism allowing data transfer between processes in a unidirectional manner.
(b) Sockets: A network communication mechanism that enables bidirectional data transfer between processes over a network.
8. Differentiate between physical and logical addresses as applied in memory management.
Answer:
Physical address: The actual address in the memory hardware.
Logical address: The address generated by the CPU during program execution, which gets mapped to the physical address by the memory management unit.
9. Explain a circumstance that would necessitate each of the following types of fragmentation:
(a) External
(b) Internal
Answer:
(a) External fragmentation: Occurs when there is enough total memory but it is not contiguous, leading to wasted space between allocated memory blocks.
(b) Internal fragmentation: Happens when allocated memory exceeds the actual memory required by a process, causing wasted space inside the allocated block.
10. (a) List four examples of operating systems currently in the market.
Answer:
Windows
Linux
macOS
Android
(b) Explain the concept of context switch as applied in process management.
Answer:
A context switch occurs when the operating system saves the state of a currently running process so it can switch to another process. This is essential for multitasking, allowing multiple processes to share the CPU efficiently.
SECTION B (60 marks)
Answer any FOUR questions from this section.
11. (a) List six examples of input/output logs of the operating system.
Answer:
Keyboard input logs
Mouse input logs
Printer output logs
Disk read/write logs
Network traffic logs
Display output logs
(b) Rich intends to migrate file structures to a file in a database. Explain three attributes that need storing in the file.
Answer:
File name: The unique identifier for the file.
File size: The total size of the file in bytes.
File permissions: The access rights granted to users or processes.
12. (a) The operating system applies different ways to improve disk performance. Outline three of these ways.
Answer:
Disk scheduling: Determines the order in which disk requests are handled to minimize seek time.
Disk caching: Stores frequently accessed data in faster storage to reduce access time.
Data compression: Reduces the size of data stored on the disk, increasing the amount of available space.
(b) Outline four file management categories of the operating system.
Answer:
File creation and deletion: Managing the creation and deletion of files.
File manipulation: Copying, moving, and renaming files.
File access control: Ensuring only authorized users can access specific files.
File backup and recovery: Protecting against data loss by creating backups and restoring data when necessary.
13. (a) Distinguish between short-term and long-term scheduling as applied in process management.
Answer:
Short-term scheduling: Determines which of the ready processes will be executed next by the CPU.
Long-term scheduling: Controls the admission of jobs to the system, deciding which jobs are loaded into memory.
(b) Explain two factors that influence the efficiency of the short-term scheduler.
Answer:
CPU burst time: The time a process needs the CPU before being interrupted.
Process priority: Higher-priority processes are scheduled before lower-priority ones.
14. (a) Distinguish between modular and non-modular structures as applied in operating systems.
Answer:
Modular structure: Divides the operating system into separate modules, each with a specific function, improving maintainability and scalability.
Non-modular structure: The operating system is a monolithic design where all components are tightly integrated, making it difficult to modify or scale.
(b) Jobs are loaded into the system to compete for the CPU. Outline four factors that might be used to allocate jobs to the CPU.
Answer:
Priority: High-priority jobs are given preference.
Job size: Smaller jobs may be executed first to improve throughput.
Memory requirements: Jobs requiring less memory may be allocated sooner.
I/O requirements: Jobs with less I/O may be executed to reduce CPU wait time.
15. (a) Explain the following disk scheduling algorithms.
(i) SCAN
(ii) First-Come First-Served (FCFS)
Answer:
(i) SCAN: The disk arm moves in one direction, fulfilling requests until it reaches the end, then reverses direction.
(ii) First-Come First-Served (FCFS): The disk requests are processed in the order they arrive, regardless of their location on the disk.
(b) List two advantages of SCAN over FCFS.
Answer:
Reduces overall seek time by minimizing movement of the disk arm.
Provides a more uniform wait time for processes.
You said:
Write everything that is here. Provide also correct answers to the questions. Seperate ANSWERS and questions by having questions on bold. Don’t put questions and answers in different sections.
ChatGPT said:
ChatGPT
Here is the transcribed text from the image along with the answers, as requested:
1937/016 OPERATING SYSTEMS July 2019 Time: 3 hours
THE KENYA NATIONAL EXAMINATIONS COUNCIL
CRAFT CERTIFICATE IN INFORMATION TECHNOLOGY MODULE I
OPERATING SYSTEMS
3 hours
INSTRUCTIONS TO CANDIDATES:
This paper consists of TWO sections, A and B.
Answer ALL the questions in section A and any FOUR questions from section B in the answer booklet provided.
Candidates should answer the questions in English.
This paper consists of 4 printed pages.
The candidates should check the question paper to ascertain that all the pages are printed as indicated and that no questions are missing.
© 2019 The Kenya National Examinations Council. Turn over.
SECTION A (40 marks)
Answer ALL the questions in this section.
1. Richard intends to install an operating system in his new computer. Explain three requirements that should be considered before installation. (6 marks)
Answer:
Hardware Compatibility: Ensure that the operating system is compatible with the computer’s hardware (CPU, RAM, etc.).
Disk Space: The system must have enough disk space to support the installation of the operating system and future updates.
Software Requirements: Check if any essential software is supported by the operating system being installed.
2. Describe each of the following disk scheduling algorithms as used in operating systems:
(a) Elevator (SCAN)
(b) Shortest seek time first (SSTF) (4 marks)
Answer:
(a) Elevator (SCAN): Moves the disk arm in one direction fulfilling requests, and upon reaching the end, reverses direction to handle any remaining requests.
(b) Shortest Seek Time First (SSTF): Selects the disk I/O request closest to the current position of the disk arm, regardless of direction.
3. Explain two advantages of flash memory over compact disks storage media. (4 marks)
Answer:
Durability: Flash memory has no moving parts, making it more durable and less prone to physical damage.
Faster Access Speed: Flash memory offers faster read/write speeds compared to compact discs.
4. Navcom Company Ltd, a mobile communication device manufacturer intends to install the android mobile operating system in their new device. Explain two advantages the company would gain from using this operating system. (4 marks)
Answer:
Customizability: Android is an open-source platform that allows extensive customization to meet the company’s specific needs.
Wide User Base: Android has a large user base, which means more potential customers are familiar with the interface.
5. Define each of the following terms as used in operating systems:
(a) Multiprogramming
(b) Multitasking (4 marks)
Answer:
(a) Multiprogramming: The ability of an operating system to load multiple programs into memory at the same time, allowing them to execute concurrently.
(b) Multitasking: The ability of an operating system to execute multiple tasks (or processes) simultaneously by quickly switching between them.
6. With the aid of a diagram, describe paging as applied in operating systems. (6 marks)
Answer:
Paging is a memory management scheme where the operating system divides physical memory into fixed-size blocks called pages. Programs are also divided into pages of the same size. When a process needs to be executed, its pages are loaded into available frames in physical memory, potentially from different parts of the memory.
7. Define each of the following terms as used in operating systems:
(a) Polling
(b) Pipe (4 marks)
Answer:
(a) Polling: A process where the CPU continuously checks the status of a device to determine if it needs attention.
(b) Pipe: A method used in inter-process communication that allows the output of one process to be used as input for another process.
8. Explain the functions of directories in a computer system. (4 marks)
Answer:
Directories organize and store files in a hierarchical structure, making it easier for users to manage files. They provide a way to group related files together and allow access control by setting permissions.
9. Computer users are advised to set strong passwords to protect data. Outline four characteristics that these passwords should possess. (4 marks)
Answer:
Length: A password should be at least eight characters long.
Complexity: It should contain a mix of uppercase and lowercase letters, numbers, and symbols.
Unpredictability: Avoid using easily guessable information like names or birthdays.
No Reuse: Avoid reusing the same password across multiple sites.
10. Differentiate between dynamic loading and dynamic linking as used in memory management. (4 marks)
Answer:
Dynamic Loading: Refers to loading a program into memory only when it is needed during execution, reducing the memory footprint.
Dynamic Linking: Involves linking program modules during runtime rather than during the compile-time, allowing for more efficient memory usage and the ability to update modules without recompiling the entire program.
SECTION B (60 marks)
Answer any FOUR questions from this section.
11. (a) Outline three reasons for implementing threads at the user level. (3 marks)
Answer:
Faster Context Switching: Since user-level threads do not involve the kernel, context switches can be performed much faster.
Flexibility: User-level threads can be implemented on any operating system, even those that do not natively support threads.
Less Overhead: User-level threads avoid the overhead of kernel intervention during creation and management.
(b) Outline three differences between a process and a thread as applied in operating systems. (3 marks)
Answer:
Memory Sharing: Threads share memory and resources of the parent process, while processes have separate memory.
Creation Time: Creating a thread is faster than creating a process.
Communication: Threads communicate through shared memory, while processes require inter-process communication mechanisms.
(c) The process control block of an operating system comprises different types of information. List six types of this information. (6 marks)
Answer:
Process ID
Process State
Program Counter
CPU Registers
Memory Management Information
I/O Status Information
(d) State three categories of operating systems, giving an example in each case. (3 marks)
Answer:
Batch Operating System: e.g., IBM OS/360.
Time-Sharing Operating System: e.g., UNIX.
Real-Time Operating System: e.g., VxWorks.
12. Explain the three causes of I/O access time in an operating system. Use a diagram if necessary. (6 marks)
Answer:
Seek Time: The time taken for the disk arm to move to the track where the data is located.
Rotational Latency: The time taken for the disk to rotate to the correct position under the read-write head.
Transfer Time: The time taken to actually transfer the data from the disk to memory.
13. (a) Outline three advantages of an operating system that supports batch processing. (3 marks)
Answer:
Efficient use of system resources by processing jobs in bulk.
Reduces user interaction and waits time, as jobs are processed automatically.
Simplifies large-scale processing, ideal for repetitive tasks.
14. (a) Define the term virtual machine as applied in device management. (2 marks)
Answer:
A virtual machine is a software-based simulation of a physical computer that can run an operating system and applications just like a physical machine.
(b) Describe memory management techniques used in operating systems. (6 marks)
Answer:
Paging: Divides memory into fixed-sized pages and maps them to frames in physical memory.
Segmentation: Divides memory into segments based on logical divisions, such as functions or objects.
Virtual Memory: Extends the available memory by using disk space as additional RAM.
15. (a) Outline the characteristics of an interactive file system with each of the following attributes:
(i) Read-Only
(ii) Append-Only (4 marks)
Answer:
(i) Read-Only: Files can be viewed but not modified.
(ii) Append-Only: Data can only be added to the end of the file, but existing data cannot be altered or deleted.
THIS IS THE LAST PRINTED PAGE.