Trevor C. Tsowaseb ITCLIT250928 Operating Systems Work
Trevor C. Tsowaseb ITCLIT250928 Operating Systems Work
Tsowaseb
Question 1.
What is an operating system, and what role does it play in a computer system?
An operating system is basically a program that manages and controls various hardware
and software resources, thus allowing users to interact with their computers effectively by
acting as an interface between the user of a computer and the hardware.
An operating system performs several important functions that ensure the smooth operation
of a computer system.
3. File System Management: The OS provides a file system that organizes and manages
files on storage devices, it allows users to create, read, write, and delete files, ensuring data
integrity and security.
5. User Interface: The OS provides a user-friendly interface that allows users to interact
with the computer system, and this can be either a command-line interface (CLI) or a
graphical user interface (GUI), enabling users to execute commands, launch applications,
and perform various tasks.
Question 2.
How does the operating system manage hardware resources, such as CPU, memory,
and storage?
CPU Scheduling: This is basically when the OS decides which processes get
access to the CPU and when. The OS uses algorithms to determine the order in
which processes are executed, aiming to maximize CPU utilization and minimize
response time, and the OS also manages the allocation of CPU time to different
tasks, ensuring that all processes get a fair share of the CPU's resources.
Memory Management: The OS keeps track of each byte in a system's memory and
which processes are using which memory at any given time. When a process needs
to be executed, the OS allocates memory for it, and when the process is finished,
the OS frees up the memory so it can be used by other processes, perhaps making
this crucial for ensuring that the system's memory is used efficiently and that
processes do not interfere with each other.
Disk Space Management: The OS also manages disk space, keeps track of which
files are stored where on the disk, and manages the reading and writing of data to
the disk. The OS also manages the allocation of disk space to different files and
directories, ensuring that disk space is used efficiently and that files are easy to
locate.
Question 3.
What are system calls, and how do they function in an operating system?
A system call is a programmatic way in which a computer program requests a service from
the kernel of the operating system it is executed on also on the other hand, a system call is
a way for programs to interact with the operating system. A computer program makes a
system call when it requests the operating system’s kernel. A system call provides the
services of the operating system to the user programs via the Application Program Interface
(API). System calls are the only entry points into the kernel system and are executed in
kernel mode.
Question 4.
Explain the concept of multitasking. How does an operating system handle multiple
processes simultaneously?
Multitasking is the concurrent execution of multiple tasks, managed by the operating system
through process scheduling. Multitasking allows multiple tasks, also known as processes, to
run simultaneously on a single computer, this doesn't necessarily mean that each task is
actually running at the exact same moment, but instead, the operating system rapidly
switches between tasks, giving the illusion that they're running concurrently.
Question 5.
Question 6.
What is virtual memory, and how does it allow a computer to run larger applications
than the physical RAM can handle?
Virtual memory is a memory management technique used by operating systems to give the
appearance of a large, continuous block of memory to applications, even if the physical
memory (RAM) is limited.
Virtual Memory is a technique that is implemented using both hardware and software. It
maps memory addresses used by a program, called virtual addresses, into physical
addresses in computer memory.
All memory references within a process are logical addresses that are dynamically
translated into physical addresses at run time this means that a process can be
swapped in and out of the main memory such that it occupies different places in the
main memory at different times during the course of execution.
A process may be broken into a number of pieces, and these pieces need not be
continuously located in the main memory during execution.
Question 7.
An operating system manages I/O operations by controlling and coordinating the use of the
hardware among the various system and application programs.
The OS manages I/O operations through a component known as the I/O subsystem. The
I/O subsystem is designed to provide a uniform interface for any I/O device irrespective of
its underlying specifics. It is responsible for monitoring the status of operations, managing
buffers and caches, and providing error handling mechanisms.
The OS uses device drivers to communicate with the hardware devices. A device driver is a
specific type of software that controls a specific type of hardware device. It acts as a
translator between the device and the applications or operating system that use it. Each
device has its own set of specialized commands that only its driver knows. In other words,
the device driver knows the language of the device and how to control it.
Question 8.
What is the significance of file systems in an operating environment, and how does
the operating system manage files?
A file system acts as a bridge between the operating system and the physical storage
hardware, allowing users and applications to create, read, update, and delete files in an
organized and efficient manner.
Operating systems manage file systems by controlling access, organizing data, managing
storage space, and ensuring data integrity.
One of the primary ways an OS manages a file system is by controlling access to files.
This involves managing user permissions to ensure that only authorized users can
access certain files. This is particularly important in multi-user systems, where different
users may have different levels of access to the system's files. The OS also manages
the opening, reading, writing, and closing of files, ensuring that these operations are
carried out correctly and efficiently.
The OS is responsible for organising files in a logical and efficient manner, making it
easier for users to locate and access their files. This often involves the use of directories
or folders, which can be nested to create a hierarchical structure. The OS also manages
the naming of files, preventing conflicts and ensuring that names are unique.
Question 9.
A device driver is a special kind of software program that controls a specific hardware
device attached to a computer. Device drivers are essential for a computer to work properly.
In addition, without a device driver, the respective hardware will fail to work accordingly.
Device drivers provide a software interface for attached hardware that enables the
operating system (OS) and other applications to access that hardware's functionalities.
There are device drivers for keyboards, mice, and printers, for example.
These programs are compact, but they enable a computer to interact with hardware and
work with networks, storage, and graphics.
Device drivers are hardware dependent and specific to the OS. They communicate with
computer hardware through a computer bus or a communications subsystem that's
connected to the hardware.
Question 10.
What is the difference between user space and kernel space in an operating system?
User space is the memory area where application software and some drivers
execute, while kernel space is the memory area where the operating system
kernel, kernel extensions, and most device drivers execute.
The main purpose of separating user space and kernel space is to provide
memory protection and hardware protection from malicious or errant software
behavior, by restricting the access and privileges of user space programs, the
operating system can prevent them from interfering with the kernel or other
critical system resources. This also enhances the stability and security of the
system, as a failure or a bug in a user space program will not affect the kernel
or other user space programs.