0% found this document useful (0 votes)
6 views

Assignment OS

The document outlines a group assignment for a module on Operating Systems Concepts at the National Institute of Transport, detailing key components of operating systems, differences between software types, and how operating systems manage hardware-software communication. It covers topics such as kernel functions, APIs, file systems, device drivers, user interfaces, and contrasts single-tasking with multi-tasking systems, as well as batch processing versus time-sharing systems. Additionally, it discusses dual-mode operation for security and stability, along with the concept of Direct Memory Access (DMA).

Uploaded by

rogathewilfred
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment OS

The document outlines a group assignment for a module on Operating Systems Concepts at the National Institute of Transport, detailing key components of operating systems, differences between software types, and how operating systems manage hardware-software communication. It covers topics such as kernel functions, APIs, file systems, device drivers, user interfaces, and contrasts single-tasking with multi-tasking systems, as well as batch processing versus time-sharing systems. Additionally, it discusses dual-mode operation for security and stability, along with the concept of Direct Memory Access (DMA).

Uploaded by

rogathewilfred
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

NATIONAL INSTITUTE OF

TRANSPORT

DEPARTMENT OF COMPUTING AND COMMUNICATION


TECHNOLOGY

PROGRAM NAME: HDCS

MODULE CODE: ITU 07202

MODULE NAME: OPERATING SYSTEMS CONCEPTS

LECTURER’S NAME: SAID CHANG’A

TASK: GROUP ASSIGNMENT (GROUP 2)

ACADEMIC YEAR: 2023/2024

SEMESTER: 02

SUBMISSION DATE: 25/04/2024

PARTICIPANTS:

S/N NAME REGISTRATION NUMBER SIGNATURE


01 KELVIN FEDINAND JOSEPH NIT/BCS/2023/577
02 ROBERTHO JOHN LYANDO NIT/BCS/2023/564
03 VLADMIR BONIFACE NIT/BCS/2023/535
MASSAWE
04 AMANI ROMWARD PHILIPO NIT/BCS/2023/597
05 JACKSON AUBU MWALONGO NIT/BCS/2023/492
06 HABIBA MASHAKA FADHILI NIT/BCS/2023/491
07 ERICK SALUS LUCAS NIT/BCS/2023/579
08 CHRISTOPHER LUCAS NIT/BCS/2023/576
MDINDILE
09 ELVIS R MASINI NIT/BCS/2023/589
10 RAPHAEL TIMOTHY AZARIA NIT/BCS/2023/524
11 JOSHUA W KAAYA NIT/BCS/2023/572

1. An operating system is software that manages a computer’s hardware and acts as an interface
between the user and the hardware component of a machine.

COMPONENTS OF AN OPERATING SYSTEM

Kernel:

The core component of the OS that provides essential services, such as process
management, memory management, device management, and system calls.
It interacts directly with the hardware and manages system resources efficiently.

It provides the basic level of control on all the computer peripherals.

In the operating system, the kernel is an essential component that loads firstly and remains within the
main memory. So that memory accessibility can be managed for the programs within the RAM, it
creates the programs to get access from the hardware resources. It resets the operating states of the
CPU for the best operation at all times.

Application Programming Interface (API):

An API is a set of rules, protocols, and tools that allows different software applications to communicate
with each other. It defines the methods and data formats that applications can use to request and
exchange information.

APIs serve as intermediaries that enable interactions between various software components, systems, or
services, abstracting away the complexities of underlying implementations. They provide a standardized
way for developers to access the functionality of a software platform, library, or service without needing
to understand its internal workings.

Examples of API include Web APIs, library APIs, Operating system APIs and hardware APIs

File System:

Manages how data is stored, organized, and retrieved on storage devices such as hard drives, solid-
state drives (SSDs), and flash drives. It provides a hierarchical structure for organizing files and
directories and ensures data integrity and security.

Device Drivers:

Software components that enable the OS to communicate with hardware devices, such as printers,
graphics cards, network adapters, and storage controllers. Device drivers facilitate the exchange of data
and commands between the OS and hardware components.

User Interface:

Allows users to interact with the computer system. This can include a command-line interface (CLI)
where users enter text commands, a graphical user interface (GUI) with windows, icons, and menus, or a
combination of both. The user interface provides a means for users to execute programs, manage files,
and configure system settings.

The OS-based applications mainly provide a specific user interface for efficient communication. The main
function of a user interface of an application is to get the inputs from the operator & to provide outputs
to the operator. But, the sorts of inputs received from the user interface as well as the output types
offered by the user interface may change from application to application.

Hardware:

is the combination of physical devices that can be utilized by a user through an operating system.

1. Difference between open-source and proprietary software

POINT OPEN-SOURCE SOFTWARE PROPRIETARY SOFTWARE


Licensing Distributed under licenses that allow Distributed under licenses that
users to view, modify, and distribute restrict users' ability to view,
the source code freely. These licenses modify, or distribute the source
typically grant users the freedom to use code. These licenses typically
the software for any purpose, modify it impose usage restrictions, such as
according to their needs, and distribute limiting the number of
the modified versions. installations or prohibiting reverse
engineering.
Development model Development often involves Usually developed by a single
collaboration among a community of company or organization, which
developers who contribute code, retains exclusive control over the
review each other's work, and improve software's development,
the software collectively. This distribution, and support.
collaborative approach fosters Development processes and
innovation, transparency, and peer decisions are not transparent to
review. the public, and contributions from
external parties are typically
limited.
Access to source The source code of open-source The source code of proprietary
code software is publicly available, allowing software is not made available to
users to inspect how the software the public, and users are generally
works, understand its implementation, unable to modify or redistribute
and contribute improvements or fixes. the software without explicit
permission from the copyright
holder.

In relation to windows and Linux:


Examples of proprietary software include the Microsoft Windows operating system, the Adobe
Photoshop graphics editor, the Microsoft Office suite, and the Apple macOS operating system.

Open-source software include the Linux operating system, Linux is the foundation of many
open-source operating systems, known as Linux distributions or distros, such as Ubuntu, Fedora,
and Debian. These distributions combine the Linux kernel with various open-source software
components to create complete operating systems that are free to use, modify, and distribute.

2. How an operating system facilitates the communication between hardware and software
components of a computer system.
Device Abstraction:
The OS provides a layer of abstraction over hardware devices, presenting them to applications
and higher-level software in a standardized way. Instead of directly interacting with hardware,
applications make requests to the OS, which handles the details of device communication on
their behalf. This abstraction shields applications from the complexities of hardware differences,
allowing them to be more portable across different hardware configurations.

Device Drivers:
The OS includes device drivers, which are software components responsible for enabling
communication between the OS and hardware devices. Device drivers provide a standardized
interface for interacting with specific types of hardware, allowing the OS to control device
operations, manage data transfers, and handle device-specific protocols. When an application
requires access to a hardware device, the OS uses the appropriate device driver to facilitate
communication with the device.

Hardware Resource Management:


The OS manages hardware resources such as CPU, memory, disk storage, and input/output (I/O)
devices to ensure efficient utilization and fair allocation among competing processes and
applications. Through mechanisms like scheduling algorithms, memory management, and I/O
management, the OS coordinates access to hardware resources, prevents conflicts, and resolves
contention for shared resources.

System Calls and APIs:


The OS provides system calls and application programming interfaces (APIs) that enable
applications to request OS services and interact with system resources. System calls are
functions exposed by the OS kernel that applications can invoke to perform tasks such as file
operations, process management, memory allocation, and device I/O. APIs provide higher-level
abstractions and libraries that encapsulate common OS functionality, making it easier for
developers to write software that interacts with the OS.

Interrupt Handling:
The OS manages hardware interrupts, which are signals generated by hardware devices to
indicate events that require attention, such as data arrival, completion of I/O operations, or
hardware errors. When an interrupt occurs, the OS suspends the currently executing process,
handles the interrupt, and dispatches the appropriate interrupt service routine (ISR) to respond
to the event. Interrupt handling allows the OS to promptly respond to hardware events and
ensure timely processing of critical tasks.

3. operating systems differ in how they handle the execution of tasks or processes.
Differences between single tasking operating system and muti-tasking operating system

Features Single task operating system Multi-task operating system


Execution of Tasks A single-tasking operating A multi-tasking operating
system can only execute one system can execute multiple
task or process at a time. It tasks or processes
focuses on completing one concurrently, allowing several
task before starting another. tasks to run simultaneously.
Resource Utilization: Resources such as CPU time, Resources such as CPU time,
memory, and I/O devices are memory, and I/O devices are
dedicated to the currently shared among multiple tasks,
running task until it with the operating system
completes or relinquishes managing their allocation and
control. scheduling.
Limited Concurrent Concurrent operations are Multiple tasks can execute
Operations limited, as only one task can concurrently, allowing users
be active at any given to perform several tasks
moment. Users may need to simultaneously without
wait for one task to finish waiting for one to finish
before starting another. before starting another.
Simple Design: Single-tasking operating Multi-tasking operating
systems tend to have simpler systems have more complex
designs and lower resource designs and sophisticated
requirements compared to scheduling algorithms to
multi-tasking systems, as manage concurrent
they do not need to manage execution, prioritize tasks,
concurrent execution of and prevent resource
multiple tasks. contention.
Differences between batch processing and time-sharing operating systems

Features Batch processing OS Time-sharing OS


Task Execution: In batch processing systems, In time-sharing systems, tasks
tasks are executed in batches are executed concurrently,
without direct user with the CPU time divided
interaction. Users submit among multiple users or
jobs or programs to the processes. Each user or
system, which are then process gets a small time slice
processed sequentially (usually milliseconds) to
without user intervention. execute their tasks before
switching to another task.
Interactivity: Batch processing systems do Time-sharing systems
not provide interactive support interactive use,
access to users while tasks allowing multiple users to
are running. Users submit interact with the system
jobs to be executed, but they simultaneously through
cannot interactively control terminals or remote
or monitor the execution of connections. Users can run
those jobs. programs, enter commands,
and receive immediate
responses from the system.
Resource Utilization: Batch processing systems aim Time-sharing systems share
to maximize resource system resources such as CPU
utilization by executing time, memory, and I/O
multiple jobs back-to-back, devices dynamically among
without leaving the CPU idle multiple users or processes,
between jobs. enabling efficient use of
resources.
Context switching Jobs submitted to a batch Time-sharing systems
processing system are perform frequent context
typically placed in a queue switches to switch between
and executed in the order different tasks or processes.
they were received. The Context switching involves
system may prioritize jobs saving the state of the
based on factors such as job currently running task,
priority or resource loading the state of the next
requirements. task, and transferring control
to the new task.
4. Spooling (Simultaneous Peripheral Operation On-Line) and buffering are both techniques used
in computer systems to improve performance and efficiency, especially in scenarios involving
input/output (I/O) operations.

Features Spooling Buffering


Purpose Spooling is primarily used to Buffering is used to smooth
overlap I/O operations with out variations in data transfer
CPU processing to improve rates between different
overall system efficiency. It components of a computer
allows the computer to system, such as between a
offload slow I/O operations fast CPU and a slower I/O
to peripheral devices while device. It helps improve
continuing to perform other overall system performance
tasks simultaneously. by reducing the impact of
data transfer latencies.
Functionality: In spooling, data is In buffering, data is
temporarily stored in a spool temporarily stored in a buffer
(a designated area of disk or (a small portion of memory)
memory) before being while it is being transferred
transferred to or from a between two components of
peripheral device. This allows the system. This allows data
the CPU to proceed with to be transferred in chunks or
other tasks while the I/O blocks, reducing the
operation is being performed frequency of slower I/O
in the background. operations and minimizing
wait times.
Applications: Spooling is commonly used in Buffering is widely used in
printing systems, where print various I/O operations, such
jobs are spooled to a disk or as file I/O, network
memory buffer before being communication, and disk
sent to the printer. This access. For example, when
allows multiple print jobs to reading from a file, data may
be queued and processed in be read into a buffer in
the background without memory before being
blocking the CPU. processed by the CPU, or
when transferring data over a
network, data packets may
be buffered to smooth out
variations in network latency.
5. Think of dual-mode operation like having two sets of rules for who can do what on a computer.
One set of rules is for regular programs and users, and the other set is for special programs that
manage how the computer works.
In security

a). Isolation Mechanisms:

Dual-mode operation provides a mechanism for hardware-enforced isolation between user-


mode processes and kernel-mode processes. User-mode processes, which include regular
applications, run with limited privileges and cannot directly access critical system resources.
Kernel-mode processes, which include the operating system's core components and device
drivers, have elevated privileges and control over system resources. This separation prevents
user-mode processes from tampering with or compromising system integrity.

b). Memory Protection:

Dual-mode operation implements memory protection mechanisms to prevent unauthorized


access to memory regions. User-mode processes are confined to their own address spaces and
cannot access memory allocated to other processes or the kernel. Any attempt by a user-mode
process to access unauthorized memory results in a hardware exception, such as a
segmentation fault or access violation, which terminates the offending process and prevents
further damage.

c). Privilege Separation:

Dual-mode operation enforces privilege separation by restricting certain operations and


resources to privileged processes running in kernel mode. Only privileged processes, such as the
operating system kernel and device drivers, have the authority to perform critical system
operations, manage hardware devices, and access sensitive data. User-mode processes are
denied direct access to these privileges, reducing the attack surface and mitigating the risk of
privilege escalation attacks.

In stability

a). Resource Allocation:

Dual-mode operation facilitates efficient resource allocation and management by enabling the
operating system to prioritize and allocate system resources, such as CPU time, memory, and
I/O bandwidth, among competing processes and tasks. The kernel scheduler dynamically adjusts
resource allocation based on factors such as process priorities, resource availability, and system
load to optimize system performance and responsiveness.

b). Fault Isolation:

Dual-mode operation provides fault isolation mechanisms to contain and mitigate the impact of
software faults and hardware errors. When a user-mode process encounters an error or
behaves unexpectedly, the operating system's fault handling mechanisms prevent the error
from affecting other processes or destabilizing the system. The kernel isolates the faulty process,
terminates it if necessary, and restores system stability without disrupting other processes.

c). Error Recovery:

Dual-mode operation supports robust error recovery mechanisms to detect, diagnose, and
recover from system failures and errors. The operating system monitors system health and
integrity, detects abnormal conditions or errors, and initiates appropriate recovery actions, such
as restarting failed processes, resetting malfunctioning hardware devices, or restoring system
state from backups. These error recovery mechanisms help maintain system availability and
reliability in the face of transient faults and unexpected events.

6. DMA stands for Direct Memory Access. It's a feature of computer systems that allows certain
hardware components, such as disk controllers, network interface cards, and graphics cards, to
transfer data directly to and from the computer's memory without involving the CPU.

Here's how DMA works and how it improves I/O performance in an operating system

a). Traditional I/O Operation: In a traditional I/O operation, the CPU is heavily involved in
managing data transfer between peripheral devices and memory. When a device wants to
transfer data, it sends a request to the CPU, which then initiates the transfer by copying data
between the device and memory.

b). CPU Overhead: In this traditional approach, the CPU has to handle every step of the data
transfer, including initiating the transfer, managing memory addresses, and handling interrupts.
This consumes significant CPU resources and introduces overhead, especially for high-speed
devices or large data transfers.

c). DMA Operation: DMA allows devices to bypass the CPU and access memory directly. Instead
of involving the CPU in every data transfer, the device and memory communicate directly with
each other under the control of a DMA controller. The DMA controller coordinates data transfer
between devices and memory without CPU intervention.

d). Improved Performance: DMA improves I/O performance in several ways:


 Reduced CPU Overhead: By offloading data transfer tasks from the CPU, DMA
reduces the burden on the CPU and frees up its resources for other tasks. This
allows the CPU to focus on executing application code or handling other system
tasks, leading to improved overall system performance.
 Faster Data Transfer: Since DMA transfers data directly between devices and
memory without CPU involvement, it can achieve higher data transfer rates and
lower latency compared to traditional CPU-managed transfers. This is
particularly beneficial for high-speed devices such as hard drives, SSDs, and
network interfaces, where minimizing transfer overhead is critical for
performance.
 Parallelism: DMA enables parallelism in data transfer operations, allowing the
CPU and DMA controller to execute tasks concurrently. While the CPU is busy
with other tasks, the DMA controller can continue transferring data in the
background, maximizing system throughput and reducing I/O wait times.

e). Interrupt Handling: Although DMA transfers data without CPU intervention, the DMA
controller still generates interrupts to notify the CPU when a transfer is complete or when an
error occurs. The CPU can then handle these interrupts asynchronously, allowing it to respond
to I/O events in a timely manner without needing to actively participate in every data transfer.

7. DMA, or Direct Memory Access; is a technique used in computer systems to improve


input/output (I/O) performance by allowing devices to transfer data directly to and from
memory without involving the CPU. It allows input/output (I/O) devices to access the main
system memory (random-access memory), independent of the central processing unit (CPU),
which speeds up memory operations.

Here is how DMA works and how it enhances I/O performance:

a) Traditional I/O Process: In a traditional I/O process, when a device (such as a disk drive or
network interface card) needs to transfer data to or from memory, it sends a request to the
CPU. The CPU then manages the data transfer, reading from or writing to the device and
moving data between the device and memory.
b) CPU Involvement: In this traditional approach, the CPU is heavily involved in the data
transfer process. It has to initiate each transfer, manage memory addresses, and handle
interrupts from devices to indicate when data is ready to be transferred.
c) DMA Operation: DMA allows devices to bypass the CPU and access memory directly. A DMA
controller, a specialized hardware component, coordinates data transfers between devices
and memory. When a device needs to transfer data, it sends a request to the DMA
controller instead of the CPU. The DMA controller then takes control of the system bus and
moves data directly between the device and memory without CPU intervention.
d) Improving Performance: DMA improves I/O performance in several ways:
 Reduced CPU Overhead: By offloading data transfer tasks from the CPU, DMA
reduces the burden on the CPU and frees up its resources for other tasks. This
allows the CPU to focus on executing applications or handling system-level tasks,
improving overall system performance.
 Faster Data Transfer: Since DMA transfers data directly between devices and
memory, it can achieve higher data transfer rates and lower latency compared to
CPU-managed transfers. This is particularly beneficial for high-speed devices such as
disk drives, SSDs, and network interfaces, where minimizing transfer overhead is
critical for performance.
 Parallelism: DMA enables parallelism in data transfer operations. While the DMA
controller is moving data between devices and memory, the CPU can execute other
tasks concurrently. This parallelism maximizes system throughput and reduces I/O
wait times.
 Efficient Use of System Resources: DMA allows devices to access memory without
tying up the CPU, enabling efficient utilization of system resources. This is especially
important in multitasking environments where multiple devices may be transferring
data simultaneously.
8. MS-DOS; stands for Microsoft Disk Operating System.

The purpose of MS-DOS was to provide a basic operating system environment for IBM-
compatible PCs, allowing users to manage files, run applications, and interact with the computer
system. MS-DOS provided fundamental functionalities such as file management, disk utilities,
and a command-line interface for executing commands and running programs.

The command prompt in MS-DOS served as the primary interface for


interacting with the operating system. It presented users with a text-based
command-line interface where they could type commands to perform various
tasks, such as navigating the file system, running programs, and managing
system configuration.

Here's how the command prompt in MS-DOS was used:

 Navigation: Users could navigate through directories and folders using commands such as
CD (Change Directory) to move to a different directory or DIR to list the contents of the
current directory.
 File Management: Users could perform file management tasks such as copying, moving,
deleting, and renaming files using commands like COPY, MOVE, DEL, and REN.
 Program Execution: Users could run executable programs or batch files by typing their
names at the command prompt. For example, typing EDIT would launch the MS-DOS text
editor, while typing BASIC would start the BASIC programming environment.
 System Utilities: MS-DOS provided various system utilities accessible from the command
prompt, allowing users to manage disks, format drives, check file system integrity, and
perform other system maintenance tasks.
 Configuration: Users could configure system settings such as environment variables, device
drivers, and system startup options using commands like SET, DEVICE, and CONFIG.

10. Spooling and DMA are two techniques used by the operating system to enhance I/O performance
and manage data transfer between peripheral devices and memory. While spooling primarily involves
software components such as device drivers, file systems, and system services, DMA is a hardware
feature that is managed and coordinated by the OS kernel in conjunction with device drivers and system
services.
REFERENCES

www.geeksforgeeks.org

www.minitool.com

www.operating-systems25.weebly.com

www.google com

Azrael.digipen.edu

www.pediaa.com

A. SILBERSCHATZ, PETER B GALVIN. & GREGGAGNE. “OPERATING SYSTEMS CONCEPTS” TENTH EDITION

www.openAI.chatgpt.com

You might also like