Assignment 1
Assignment 1
COURSE:3407 A
ANSWER
Kernel data structures are unique data formats that are used by the operating system's core
element to manage colorful computer functions.
The 3 different types of kernel data structures implemented at the operating system level are,
Singly Linked List
Doubly Linked List
Circular Linked List
ANSWER
The two different operating modes that a computer's CPU can function in are kernel mode and
user mode.
In kernel mode, the processor has unrestricted access to the computer's hardware and system
resources. This implies that it can carry out sensitive tasks and executing privileged instructions,
such as directly accessing memory or manipulating hardware.
User mode is a restricted state where the processor has limited access to system resources. User
mode is used by user programs, such as interactive apps or software. Programs are unable to
directly carry out privileged activities in this mode, such as accessing hardware or changing
important system settings.
Advantages:
Protection: This describes the controls that limit a process's or user's access to resources that the
operating system has established. The system can limit user-level programs' privileges by having
them execute in separate modes. This keeps them from directly accessing sensitive resources or
interfering with important system functions. For instance, the CPU can access all system
resources in kernel mode, but access is restricted in user mode to avoid unwanted modification.
Security: Protecting the system from both internal and external threats, such as denial-of-service
attacks, worms, viruses, identity theft, and theft of service, is what security is all about. The
operating system builds a defense against these attacks by segregating operations into kernel
mode and user mode. User programs operate in user mode, which limits their access to system
resources and lowers the possibility that hostile actors will take advantage of them. As a
gatekeeper, the kernel enforces security regulations and blocks unauthorized access to vital
system components when it is in kernel mode.
ANSWER
The arrangement and communication between the various components that make up an operating
system is referred to as its structure. It outlines how the many components of the operating
system—such as the file systems, user interface, device drivers, and kernel—are built and
integrated to offer users and applications necessary features and services.
Because of its monolithic architecture, which allows a single component to malfunction to effect
the entire system, MS-DOS may be more prone to failures and security flaws.
Microkernel -Mach
An operating system with a microkernel-based architecture is Mach. Only necessary functions,
like as memory management and process scheduling, are contained in the kernel in a microkernel
architecture; other functions, such as file systems and device drivers, are handled by user-level
processes.
Contrast
user-level servers and the kernel must communicate via inter-process communication (IPC),
microkernel-based systems may experience performance overhead.
The tight integration of device drivers and Mach is appropriate for general-purpose
system services into the kernel results in computing settings because it enables
increased performance at the expense of features like virtual memory, inter-process
decreased flexibility and modularity. communication, and multitasking.
ANSWER
Operating system virtualization is similar to house several computers within a single physical
machine. Even though they are all using the same hardware, it deceives each distinct
environment into believing it is operating on a different private computer. It works similarly to
the way we can switch between different apps on our computer or phone, only with operating
systems.
Advantages:
Resource Optimization: We can maximize the utilization of the hardware resources by operating
several virtual machines on a single physical server. We can save money and space by
combining all operating systems onto a single physical server rather than having separate ones
for each one.
Isolation:
Every virtual machine functions separately from the others, so if one crashes or has problems, it
won't have an impact on the others. For the system as a whole, this isolation offers improved
stability and dependability.
Flexibility:
We can run many operating systems on the same hardware thanks to virtualization, which is
helpful for testing, development, and running programs that are limited to specific operating
systems. For instance, we can use a virtual machine to run Windows apps on a macOS system.
Security:
By isolating virtual machines from one another, it is possible to stop one virtual machine from
accessing or influencing the information and operations of another. This improves security and
safeguards private data.
ANSWER:
The "fork" system call is used in Unix and Linux operating systems to start a new process, which
is a distinct instance of the running application. The "child process" is a newly created procedure
that is a precise replica of the "parent process."
When a program calls the "fork" system call, it essentially duplicates itself. Both the parent and
child processes then continue executing from the point where the fork was called. Forking is
commonly used in scenarios where parallel processing or multitasking is needed.
Example:
Consider a chef (our software) operating in a kitchen (our computer). It's like creating a helper
cook (kid process) to aid when the cook forks. This allows collaboration between the primary
cook (parent process) and the assistant cook (child process). For instance, the assistant cook can
prepare dessert while the head chef prepares the main dish. If necessary, they can communicate
and divide work.
Forking is a technique used in computers for many tasks. For example, using the fork() function
in Unix systems is similar to copying oneself. Then, the child process (copy) can perform tasks
that the parent process (original) cannot. For a more intricate illustration, consider an application
that downloads files while playing music. It can manage both at once, without interfering with
each other, by forking: one process for music and another for downloading.
There are several methods in which the parent and child processes can communicate after
forking. They occasionally work alone, much like our chefs in the kitchen. In other situations,
such as when a parent waits for a child to finish schoolwork before letting them go outside to
play, the parent might wait for the youngster to complete the assignment before moving on.
Thus, forking is similar to having a cook and an assistant cook in a kitchen since they split up the
work, support one another, and finish things more quickly. It allows programs to effectively
handle several tasks and make economical use of the computer's resources.
REFERENCES:
Operating System Concepts by Silberschatz, Gagne, Galvin
10th Edition
ISBN- 978-1-118-06333-0
https://www.scaler.com/topics/user-mode-and-kernel-mode/
https://www.geeksforgeeks.org/fork-system-call/
https://www.cs.gordon.edu/courses/cs322/lectures/msdos_vms_unix.html