DIPLOMA IN INFORMATION COMMUNICATION TECHNOLOGY
2019 MODULE I OPERATING SYSTEM MODULE I

 

KENYA NATIONAL EXAMINATIONS COUNCIL

DIPLOMA IN INFORMATION COMMUNICATION TECHNOLOGY
MODULE I

OPERATING SYSTEMS
3 hours

 
1.

(a) Outline three disadvantages of serial file organization. (3 marks)

  1. Slow Access Time: Searching for a specific record requires reading through each record sequentially, resulting in slow access times.
  2. Inefficient for Large Files: As the file size increases, the time to access a particular record becomes significantly longer.
  3. Difficult to Update: Inserting, deleting, or updating records requires shifting subsequent records, which is time-consuming and inefficient.

Read more on file organization 

(b) (i) Define the term “part” as used in PO device. (2 marks)

Part: A component or section of a peripheral output (PO) device that performs a specific function or task.

(ii) An Access Control Matrix shows the types of access that each user has in a file system. Outline five types of access used in a file system. (5 marks)

  1. Read: Allows a user to view the contents of a file.
  2. Write: Permits a user to modify the contents of a file.
  3. Execute: Grants permission to run a file as a program.
  4. Delete: Allows a user to remove a file from the system.
  5. Append: Enables a user to add data to the end of a file without modifying existing content.

Read more on file system

(c) (i) Outline two typical characteristics of cache memory. (2 marks)

  1. High Speed: Cache memory is faster than main memory, providing quick access to frequently used data.
  2. Volatile: Cache memory is volatile, meaning it loses its content when the power is turned off.

(ii) Differentiate between interrupt handling and interrupt vector as used in I/O communications. (4 marks)

Interrupt Handling: The process by which the CPU stops its current execution to service an interrupt request from an I/O device. This involves saving the current state, executing an interrupt service routine, and then resuming the interrupted task.

Interrupt Vector: A predefined memory location that stores the address of the interrupt service routine. When an interrupt occurs, the CPU uses the interrupt vector to locate and execute the appropriate service routine.

 

Read more 

(d) With the aid of a diagram, describe a page table as used in operating systems. (4 marks)

Page Table: A data structure used by the operating system to map virtual addresses to physical addresses. Each entry in the page table corresponds to a page in virtual memory and contains information about the physical address of the page, access permissions, and status bits.

[Insert diagram here]

2.

(a) Explain the term compaction as used in memory fragmentation. (2 marks)

Compaction: A process in memory management where free memory spaces are consolidated to create a larger contiguous block of free memory, reducing fragmentation and making it easier to allocate memory to processes.

Read more

(b) List four factors that should be considered when selecting random access memory (RAM) for a computer, other than cost. (4 marks)

  1. Capacity: The amount of memory required for the intended applications.
  2. Speed: The data transfer rate and latency of the RAM.
  3. Compatibility: Ensuring the RAM is compatible with the motherboard and CPU.
  4. Form Factor: The physical size and type (e.g., DIMM, SO-DIMM) that fits the system.

(c) With the aid of a diagram, describe the three-state process model in a typical operating system. (6 marks)

Three-State Process Model: This model includes the states:

  1. Running: The process is actively executing on the CPU.
  2. Ready: The process is waiting to be assigned to a CPU.
  3. Blocked: The process is waiting for some event (e.g., I/O completion) to proceed.

Read more

(d) (i) Joan intends to design a job scheduling algorithm. Explain the objectives that should be achieved by the algorithm. (4 marks)

  1. Maximize CPU Utilization: Ensure the CPU is kept as busy as possible.
  2. Minimize Waiting Time: Reduce the time processes spend waiting in the ready queue.
  3. Minimize Turnaround Time: Decrease the total time taken from submission to completion of a process.
  4. Fairness: Ensure all processes get a fair share of CPU time without starvation.

Read more

(ii) It is recommended that users change their passwords to guarantee good security management. Outline four circumstances that necessitate this action. (4 marks)

  1. Password Compromise: When there is a suspicion that a password has been exposed or compromised.
  2. Regular Intervals: Periodic password changes as part of security policy.
  3. Role Change: When a user’s role or access level changes within the organization.
  4. System Update: After a major system or security update.

3.

(a) Outline three resources required in process execution. (3 marks)

  1. CPU Time: The processing power required to execute instructions.
  2. Memory: The space needed to store instructions and data.
  3. I/O Devices: Access to input and output devices for interaction.

(b) Gerald was required to highlight principles of memory management in operating systems in a job interview. Outline four principles that he could have highlighted. (4 marks)

  1. Relocation: Moving processes in memory to maximize utilization.
  2. Protection: Ensuring processes do not interfere with each other’s memory.
  3. Sharing: Allowing multiple processes to access the same memory space.
  4. Logical Organization: Managing memory in a way that supports the program’s structure and modularity.

(c) Paul investigated the disadvantages of a contiguous file allocation method. Explain five disadvantages that he could have established. (5 marks)

  1. Fragmentation: Free space gets divided into small, non-contiguous blocks, leading to inefficient storage utilization.
  2. Fixed Size: Files must be allocated in fixed-size blocks, potentially wasting space.
  3. Limited File Growth: Files cannot grow beyond their allocated space without relocation.
  4. Complex Management: Managing contiguous blocks is complex and time-consuming.
  5. Performance Overhead: Frequent relocation of files to maintain contiguity can degrade performance.

(d) File recovery is a critical feature in a file system. Explain two functions of this feature. (4 marks)

  1. Data Restoration: Recovering lost or corrupted files to their original state.
  2. System Reliability: Ensuring the file system can recover from crashes or failures without data loss.

(e) The principal goal of a multiprocessor system is to balance the load between processors. Explain two load balancing strategies used by these systems. (4 marks)

  1. Static Load Balancing: Predetermined distribution of tasks among processors based on a fixed policy.
  2. Dynamic Load Balancing: Real-time adjustment of task distribution based on current system load and processor availability.

4.

(a) (i) Explain the term virtual address space as used in memory management. (2 marks)

Virtual Address Space: A range of addresses used by a process to access memory, which the operating system maps to physical memory locations. This allows for efficient and flexible memory management.

(ii) Differentiate between static and dynamic linking as used in memory management. (4 marks)

Static Linking: The process of linking library routines to a program at compile time, resulting in a single executable file. Changes to the library require recompiling the program.

Dynamic Linking: The process of linking library routines to a program at runtime. This allows for smaller executable files and easy updates to shared libraries without recompiling the program.

(b) System timer is important in multiprogramming systems. Explain two roles of the system timer. (4 marks)

  1. Process Scheduling: Generates interrupts at regular intervals to allow the operating system to switch between processes, ensuring fair CPU allocation.
  2. Resource Management: Helps in monitoring and managing system resources by providing time-based triggers for resource allocation and deallocation.

(c) Tony was required to configure buffering in an operating system that he was installing for a client. Explain three types of buffering he could use. (6 marks)

  1. Single Buffering: Uses a single buffer between the I/O device and the process. Suitable for simple and low-speed I/O operations.
  2. Double Buffering: Utilizes two buffers, allowing one to be filled while the other is being processed, improving efficiency and performance.
  3. Circular Buffering: Employs a circular queue of buffers, providing continuous data flow and handling bursts of I/O requests more effectively.

(d) A lecturer described different categories of system calls in a lesson on operating systems. Outline four categories of system calls that could have been mentioned. (4 marks)

  1. Process Control: Create, terminate, and manage processes.
  2. File Management: Create, delete, read, write, and manipulate files and directories.
  3. Device Management: Request, release, read, write, and manage devices.
  4. Information Maintenance: Get and set system data, such as the time and process attributes.

5.

(a) (i) Outline two benefits of a microkernel operating system. (2 marks)

  1. Modularity: Easier to maintain and update, as services run in user space and can be modified without affecting the kernel.
  2. Stability: Increased system stability and security due to minimal code running in kernel mode.

(ii) Differentiate between blocking and non-blocking I/O. (4 marks)

Blocking I/O: The I/O operation waits until the operation completes before returning control to the process, causing the process to be blocked during the wait.

Non-Blocking I/O: The I/O operation returns immediately, allowing the process to continue execution while the operation completes in the background.

(b) (i) Define the term segment table as used in operating systems. (2 marks)

Segment Table: A data structure used in memory management to store information about the segments of a process, including the segment base address and size.

(ii) Explain three limitations of a best-fit memory placement algorithm. (6 marks)

  1. Slow Allocation: Requires searching the entire list of free memory blocks to find the best fit, which can be time-consuming.
  2. Fragmentation: Can lead to small, unusable free memory fragments, increasing fragmentation over time.
  3. Complexity: More complex to implement and manage compared to other placement algorithms, such as first-fit or next-fit.

(c) Patricia was required to describe advantages of distributed operating systems to a client. Describe three advantages that she could have mentioned. (6 marks)

  1. Scalability: Easily add or remove resources to accommodate varying workloads without significant disruption.
  2. Reliability: Increased fault tolerance due to distributed nature, where failure of one node does not affect the entire system.
  3. Resource Sharing: Enables efficient sharing of resources, such as data and processing power, across multiple interconnected systems.

6.

(a) Figure 1 shows a cross-section of a hard disk. Explain the function of the parts labeled (i) and (ii). (4 marks)

(i) Platters: Circular disks coated with magnetic material where data is stored. The platters spin at high speeds, allowing read/write heads to access data. (ii) Read/Write Heads: Positioned above and below each platter surface, these heads read data from and write data to the platters by changing the magnetic polarity of the surface.

(b) Explain two circumstances under which preemptive job scheduling algorithms would be used in operating systems. (4 marks)

  1. Time-Sharing Systems: To ensure that all processes receive a fair share of CPU time, improving responsiveness for interactive users.
  2. Real-Time Systems: To meet critical deadlines by allowing higher-priority tasks to preempt lower-priority ones.

(c) I/O disk read operation involves several interrupts. Explain two typical interrupts that are likely to be used. (4 marks)

  1. Disk Ready Interrupt: Signals that the disk has completed a read operation and the data is ready to be transferred.
  2. End of Transfer Interrupt: Indicates that the data transfer between the disk and memory has been completed successfully.

(d) (i) Describe two categories of I/O devices, giving two examples in each case. (4 marks)

  1. Block Devices: Store data in fixed-size blocks, allowing random access. Examples: Hard drives, SSDs.
  2. Character Devices: Transmit data as a stream of characters, typically allowing sequential access. Examples: Keyboards, printers.

(ii) File sharing technologies have promoted the concept of global access. Explain two file sharing technologies that are used. (4 marks)

  1. Network File System (NFS): Allows files to be shared across a network, enabling users to access and manage files on remote systems as if they were local.
  2. Cloud Storage Services: Provides online storage accessible from anywhere with an internet connection, allowing users to upload, share, and sync files. Examples: Google Drive, Dropbox.

7.

(a) Explain each of the following terms as used in operating systems: (i) Process. (2 marks)

Process: An instance of a program in execution, encompassing the program code, data, and resources like CPU time and memory.

(ii) Thread. (2 marks)

Thread: The smallest unit of execution within a process, allowing for parallelism within a single process by sharing the same resources but running independently.

(b) Doreen discovered that some of her files in her computer were encrypted and her computer prompted her to pay a certain fee through the internet in order to decrypt her files. (i) Identify the most appropriate type of attack justifying your answer. (2 marks)

Ransomware Attack: A type of malware that encrypts the victim’s files and demands payment for the decryption key. This attack is characterized by the demand for a fee to restore access to the encrypted files.

(ii) Outline four possible causes for the attack identified in (i). (4 marks)

  1. Phishing Emails: Clicking on malicious links or attachments in fraudulent emails.
  2. Unpatched Software: Exploiting vulnerabilities in outdated or unpatched software.
  3. Infected Downloads: Downloading and installing software from untrusted or compromised sources.
  4. Weak Passwords: Using easily guessable or reused passwords, allowing attackers to gain unauthorized access.

(c) (i) Explain the term spatial locality as used in memory management. (2 marks)

Spatial Locality: The tendency of a program to access data locations that are close to each other within a short period of time, enabling more efficient memory access and caching.

(ii) Differentiate between long-term scheduler and short-term scheduler. (4 marks)

Long-Term Scheduler: Determines which processes are admitted to the system for processing. It controls the degree of multiprogramming by deciding which jobs enter the ready queue.

Short-Term Scheduler: Selects which of the ready, in-memory processes is to be executed next by the CPU. It makes frequent scheduling decisions to ensure efficient CPU utilization.

(d) Memory fragmentation is not popular with modern operating systems. Explain two limitations that could be causing this trend. (4 marks)

  1. Reduced Performance: Fragmentation leads to inefficient use of memory, causing increased page faults and slower performance.
  2. Complex Management: Managing fragmented memory is complex and time-consuming, requiring frequent compaction and defragmentation efforts.

8.

(a) (i) Outline two functions of device drivers in I/O communication. (2 marks)

  1. Hardware Abstraction: Provide an interface between the operating system and hardware devices, allowing the OS to communicate with hardware without needing to know the specifics of the device.
  2. Resource Management: Manage the allocation and deallocation of resources for the device, ensuring efficient and conflict-free operation.

(ii) Outline four conditions necessary for deadlock in computing. (4 marks)

  1. Mutual Exclusion: Only one process can use a resource at a time.
  2. Hold and Wait: Processes holding resources can request additional resources.
  3. No Preemption: Resources cannot be forcibly taken from a process holding them.
  4. Circular Wait: A closed chain of processes exists where each process holds a resource the next process in the chain needs.

(b) Differentiate between high-level and low-level formatting as used in managing disks. (4 marks)

High-Level Formatting: Involves creating a file system on the disk partition, allowing the operating system to manage files and directories. It initializes data structures like the file allocation table (FAT) or inode table.

Low-Level Formatting: Involves dividing the disk into sectors and tracks, establishing the physical format that defines where data will be stored on the disk. It prepares the disk for use by an operating system or other software.

(c) For each of the following scenarios, identify the appropriate type of computer memory: (i) Highly volatile;

Answer: RAM (Random Access Memory)

(ii) Requires firmware;

Answer: ROM (Read-Only Memory)

(iii) Parts of hard disk addressed as computer memory;

Answer: Virtual Memory

(iv) Very short access time and suitable for storage of frequently used instructions. (4 marks)

Answer: Cache Memory

(d) Creation of processes is a fundamental role of operating systems. Identify three steps in creating processes. (3 marks)

  1. Process Initialization: Setting up the process control block (PCB) and allocating memory for the process.
  2. Loading Program: Loading the program code and data into the allocated memory space.
  3. Setting Process State: Initializing the process state to ready and placing it in the ready queue for execution.