0% found this document useful (0 votes)
13 views10 pages

Os Lab 1

The document is a lab journal from Bahria University's Computer Science Department focusing on operating systems, particularly Linux and its comparison with Windows. It outlines objectives, tasks, and reflections on the importance of operating systems, types of OS, Linux distributions, and the reasons organizations may choose Linux over Windows. The journal also includes detailed comparisons of file systems and user interfaces between the two operating systems.

Uploaded by

actioaction
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views10 pages

Os Lab 1

The document is a lab journal from Bahria University's Computer Science Department focusing on operating systems, particularly Linux and its comparison with Windows. It outlines objectives, tasks, and reflections on the importance of operating systems, types of OS, Linux distributions, and the reasons organizations may choose Linux over Windows. The journal also includes detailed comparisons of file systems and user interfaces between the two operating systems.

Uploaded by

actioaction
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BAHRIA UNIVERSITY

ISLAMABAD CAMPUS
COMPUTER SCIENCE
DEPARTMENT

Operating
Systems Lab
Journal 1
Muhammad Ali

Enrolment No. 01-135232-111


OPERATING SYSTEMS

JOURNAL # 1

Department of Computer Sciences


BAHRIA UNIVERSITY, ISLAMABAD

1|Page
Introduction to Operating Systems & Linux

Objective
The purpose of this lab is to:
• Understand the role of an operating system in modern computing.
• Explore different types of operating systems with real-world examples.
• Introduce Linux and its distributions as alternatives to proprietary OS.
• Compare Linux and Windows in terms of design, usability, and application.
• Research and analyze the Linux file system structure and compare it with the Windows file
system.
• Encourage critical thinking on why organizations choose Linux or Windows

Scenario
You are an IT trainee at a software company.
Currently, the company uses Windows for office desktops but is considering deploying Linux (Ubuntu)
for servers and development environments.
Your manager asks you to prepare a research-based technical report covering the following:
1. Why is an Operating System critical for computers?
2. What types of operating systems exist, and where are they used?
3. What makes Linux different from Windows, and why is it often chosen for servers?
4. What is a Linux distribution, and what is Ubuntu’s role?
5. How does the Linux file system hierarchy differ from Windows’ drive-letter system?

2|Page
Lab Tasks
Task 1: Understanding Operating Systems
• Define what an Operating System (OS) is in your own words.
An Operating System is a system software that manages a computer’s hardware and software resources. It
provides a platform for applications to run and allows users to interact with the machine in a simple and
efficient way.
• Explain the four major functions of an OS:
o Process Management (who gets CPU time?)
Decides which program (process) gets CPU time and for how long.
Ensures fairness and efficiency by scheduling multiple processes.
o Memory Management (who gets RAM?)
Allocates RAM to different programs and frees it when not in use.
Prevents one program from interfering with another’s memory space.
o File Management (how are files stored & retrieved?)
Organizes data into files and directories.
Controls how files are stored, retrieved, named, and protected.
o Device Management (how does OS talk to keyboard, printers, etc.?)
Acts as a translator between hardware devices (keyboard, printer, USB) and software.
Uses device drivers so applications can use hardware without knowing its details.
• Write at least two examples where OS plays a critical role (e.g., ATM machine, smartphone).
1. ATM Machine: The OS ensures secure transactions, manages input from the keypad, and controls
interaction with banking servers.
2. Smartphone: Mobile OS (like Android or iOS) manages apps, calls, storage, and sensors while
giving a smooth user experience.

Task 2: Types of Operating Systems


Research and write a short note (5–6 lines each) on:
1. Batch OS → What it is, when it was used, and an example.
2. Time-Sharing OS → How multiple users share resources, with example.
3. Real-Time OS (RTOS) → Why speed and timing matter, with example.
4. Distributed OS → How multiple computers work as one system, with example.

3|Page
5. Network OS (NOS) → How it supports file sharing, printers, and user management, with
example.

Deliverable: A table summarizing each OS type, definition, and example.

OS Type Definition & Usage Example


Batch OS A batch operating system processes jobs in groups (batches) IBM 7094
without direct user interaction. Common in the 1950s–60s with mainframe
mainframes, it was used for tasks like payroll, billing, or large batch system
data processing where user input was minimal.

Time- Allows multiple users to access a single system at the same time UNIX (early
Sharing OS by rapidly switching between tasks (CPU scheduling). It gives versions)
the illusion that each user has their own computer. Widely used
in universities and business environments.

Real-Time Focuses on processing tasks within strict timing constraints. VxWorks,


OS (RTOS) Speed and predictability are critical, especially in systems where RTLinux
delays can cause failure. Used in medical devices, aircraft
control, and robotics.

Distributed Manages a group of independent computers and makes them Google’s Borg
OS appear as a single system. Resources and tasks are shared, or Amoeba OS
improving efficiency and fault tolerance. Common in clusters,
grids, and cloud environments.

Network OS Runs on servers and provides features for managing data, files, Windows
(NOS) users, and printers over a network. Enables centralized Server, Novell
administration and resource sharing among connected NetWare
computers.

Task 3: Introduction to Linux & Distributions


• Define Linux and explain what makes it open source.
• Explain the role of the Linux Kernel.
• What is a distribution (distro)? Why do different distros exist?
• Write about at least 3 popular Linux distributions:
o Ubuntu → user-friendly desktop/server OS
o Fedora → cutting-edge features
o Debian → stability and security focus
• Mention one specialized distro (e.g., Kali Linux for cybersecurity).

4|Page
Deliverable: A list or short table with distros and their main purpose.

Distro Main Purpose / Strength


Ubuntu User-friendly, great for beginners, widely used for desktops and servers.
Fedora Focuses on cutting-edge features and latest technologies; often used by
developers.

Debian Known for stability and security; popular for enterprise servers.
Kali Linux Designed for cybersecurity, penetration testing, and digital forensics.
(specialized)

Task 4: Linux vs Windows Comparison


Create a detailed comparison table between Linux and Windows.
Suggested points of comparison:
• Cost (free vs paid)
• Source Code (open vs closed)
• Security (community-driven patches vs frequent malware)
• User Interface (customizable vs standardized)
• File System Structure (hierarchical root vs drive letters)
• Command Line (essential vs optional)
• Support (community + enterprise vs Microsoft official)
• Usage (servers, dev, IoT vs desktops, offices)

Deliverable: A well-structured table with at least 6–8 rows.

5|Page
FEATURE LINUX WINDOWS
COST Free and open source; no licensing fee. Paid proprietary software; license
Paid enterprise support available (e.g., Red required for each machine.
Hat).
SOURCE CODE Open source – anyone can view, modify, Closed source – controlled and
and distribute. maintained only by Microsoft.
SECURITY Generally more secure due to community- More vulnerable to viruses and
driven patches and strict user permissions. malware due to large user base and
Less targeted by malware. closed update system.
USER Highly customizable (GNOME, KDE, Standardized GUI (Windows
INTERFACE XFCE, etc.). Users can change nearly Desktop & Start Menu). Limited
everything. customization.
FILE SYSTEM Hierarchical tree starting at root / (no drive Uses drive-letter system (C:, D:,
STRUCTURE letters). Common file systems: ext4, XFS, etc.). Common file system: NTFS.
Btrfs.
COMMAND Powerful and essential for system Command Prompt & PowerShell
LINE administration. Shells like Bash, Zsh exist, but GUI is the primary
widely used. interface.
SUPPORT Free community support (forums, Official support from Microsoft +
documentation, wikis) + paid enterprise large third-party ecosystem.
support (e.g., Canonical, Red Hat).
USAGE Widely used for servers, cloud, Dominant in desktops, offices,
development, IoT, supercomputers, gaming, and business applications.
cybersecurity.

Task 5: Linux File System Research


Research and draw the Linux file system hierarchy (tree diagram).
/
├── bin (essential binaries)
├── sbin (system binaries for admin)
├── etc (system configuration files)
├── home (user directories)
├── usr (applications, libraries)
├── var (logs, temp, mail queues)
├── dev (device files)

6|Page
├── tmp (temporary files)
Now compare with Windows:
• /home ≈ C:\Users
• /etc ≈ C:\Windows\System32\Config
• /bin ≈ C:\Windows\System32
• /var ≈ C:\ProgramData
• /dev ≈ Device Manager

Deliverable:

• A diagram of Linux file system.

/
├── bin → Essential user binaries (e.g., ls, cp, cat)
├── sbin → System binaries (admin commands, e.g., reboot, fdisk)
├── etc → Configuration files (system-wide settings)
├── home → User home directories (/home/ali, /home/admin)
├── usr → User-installed applications, libraries, documentation
├── var → Variable data (logs, caches, mail, spool)
├── dev → Device files (hard drives, USB, etc.)
├── tmp → Temporary files (auto-cleared at reboot)

7|Page
• A side-by-side comparison of Linux vs Windows directories.

Linux Directory Purpose Windows Equivalent


/home User directories C:\Users

/etc System configuration files C:\Windows\System32\Config

/bin Essential user binaries C:\Windows\System32

/sbin Admin/system binaries C:\Windows\System32 (admin tools)

/var Logs, variable data C:\ProgramData

/dev Device files (treated as files) Device Manager (hardware control)


/tmp Temporary files C:\Windows\Temp

/usr Applications, libraries C:\Program Files

• At least two differences (e.g., Linux uses single root /, Windows uses multiple drives).

1. Root Structure:
o Linux uses a single root (/) directory for everything.
o Windows uses multiple drives (C:, D:, E:) with their own roots.
2. Device Handling:
o In Linux, hardware devices are represented as files under /dev.
o In Windows, devices are managed through the Device Manager and are not part
of the file system tree.

Task 6: Reflection
Write a 1–2 page reflection answering:
• Why do companies often use Linux for servers and cloud computing?
• Why is Windows still dominant in personal desktops?
• If you were in charge of your university’s computer labs, would you recommend Linux or
Windows? Support your answer with at least 3 reasons.

Reflection:
Companies often choose Linux for servers and cloud computing because of its stability, scalability, and
cost-effectiveness. Being open source, Linux does not require licensing fees, which makes it highly
attractive for organizations running large server infrastructures. Its security and reliability are also strong

8|Page
reasons for adoption, as the open-source community releases patches quickly and efficiently.
Furthermore, Linux allows a high degree of customization, enabling administrators to run only the
services they need, which improves performance and reduces resource consumption. These qualities make
Linux the preferred operating system for web hosting, cloud environments, and supercomputing, as
evidenced by the fact that most major cloud providers and data centers rely on Linux-based systems.
On the other hand, Windows continues to dominate the personal desktop market. One major reason is its
ease of use, as Microsoft has developed a standardized and user-friendly graphical interface that appeals
to a broad audience. In addition, the vast majority of commercial applications and games are designed
primarily for Windows, ensuring strong software compatibility. Windows also benefits from official
customer support, which is important for users and organizations that may lack the technical expertise to
troubleshoot issues independently. Finally, the dominance of Windows in educational institutions and
workplaces has created a cycle of familiarity, as most people are introduced to computers through
Windows environments, making it the default choice for personal computing.
If I were responsible for my university’s computer labs, my recommendation would depend on the use
case. For general-purpose labs, I would recommend Windows, but for programming or research labs, I
would recommend Linux. Overall, I lean toward recommending Linux for the following three reasons:
1. Cost Savings: Universities usually run hundreds of computers, and Linux being free would
eliminate expensive licensing fees. Those savings could be redirected toward better hardware or
research facilities.
2. Learning Opportunities: Linux exposes students to the command line, scripting, and open-
source tools, which are highly valuable skills in IT, engineering, and computer science fields.
This better prepares students for careers in cloud computing, cybersecurity, and software
development.
3. Stability and Security: University labs are shared by many students, increasing the risk of
system crashes or malware. Linux is more stable under heavy loads and less vulnerable to viruses
compared to Windows, making it easier to maintain and secure in the long run.

Nevertheless, I would also consider a hybrid approach, maintaining a smaller number of Windows
machines for courses or applications that require Windows-only software. This would allow students to
benefit from the strengths of both systems. In conclusion, Linux is often the stronger choice for academic
computer labs due to its cost efficiency, educational value, and robustness, while Windows remains
essential for certain specialized needs.

9|Page

Common questions

Powered by AI

Organizations often prefer Linux for servers and cloud environments due to its stability, scalability, and cost-effectiveness. As an open-source system, Linux incurs no licensing fees, saving costs, especially in large infrastructures. Its flexibility allows administrators to customize services for efficiency, resulting in lower resource consumption. Furthermore, Linux's robust security features, frequent community-driven patches, and high reliability make it suitable for maintaining uninterrupted services. These characteristics make Linux particularly attractive for web hosting, cloud services, and supercomputing .

The Linux file system hierarchy starts with a single root '/' directory from which all other directories branch, emphasizing a unified structure. Linux treats hardware devices as files under /dev. In contrast, Windows uses multiple drive letters (e.g., C:, D:) each with its own root, and manages hardware through the Device Manager, not as part of the file hierarchy. This means Linux provides a consistent interface for both devices and files, which can simplify scripting and administrative tasks due to its predictability and integration. Windows’ approach may be more intuitive for users unfamiliar with a command-line interface, but it limits the use of file-based operations on devices .

Using Linux in university computer labs offers a range of educational benefits. It provides cost savings by eliminating licensing fees, allowing funds to be directed to hardware upgrades or research. The exposure to the command line and scripting promotes valuable technical skills essential for IT, engineering, and computer science fields, better preparing students for careers in cloud computing and cybersecurity. Additionally, Linux's stability and security features make it easier to maintain, reducing the threat of malware and system crashes in shared lab environments .

Windows remains dominant in the personal desktop market due to its ease of use, standardized graphical interface, and strong software compatibility with commercial applications and games that are designed primarily for Windows environments. Additionally, Windows benefits from official customer support and the cycle of familiarity cemented by its presence in educational institutions and workplaces. This has made Windows the default choice for many consumers who often first encounter computers through Windows systems .

The primary functions of an operating system (OS) include process management, memory management, file management, and device management. Process management involves determining which processes receive CPU time and for how long, ensuring fairness and efficiency by scheduling multiple processes. Memory management allocates RAM to programs and prevents interference between them. File management organizes data into files and directories, controlling how files are stored, retrieved, and protected. Device management acts as an intermediary between hardware devices and software, using device drivers for seamless hardware interaction. The OS is critical because it manages all fundamental computing resources, enabling application functionality and user interaction with the hardware .

Ubuntu is known for its user-friendliness and is widely used as both a desktop and server operating system. Fedora emphasizes cutting-edge features and latest technologies, which makes it popular among developers seeking the newest software. Debian is valued for its stability and security focus, making it a preferred choice for enterprise servers where reliability is critical. Each distribution caters to different needs: user accessibility (Ubuntu), software development (Fedora), and system robustness (Debian).

Batch operating systems process jobs in groups without direct user interaction. They were common in the 1950s-60s and often used for tasks like payroll and billing on systems such as the IBM 7094 mainframe. In contrast, time-sharing operating systems allow multiple users to access a system simultaneously by quickly switching between tasks, creating an illusion of individual system ownership. This type was widely used in universities and business environments with systems like early versions of UNIX .

Linux being open source means its source code is publicly available, allowing anyone to view, modify, and distribute it. This model encourages community contributions, leading to a diverse range of applications and quick patching of vulnerabilities, enhancing security. Windows, being proprietary, restricts its source code access to Microsoft. This closed model means vulnerabilities are only addressed through official updates, which may not be as rapidly responsive as community patches in Linux. Open source fosters innovation and collaboration, whereas proprietary control provides focused, consistent support and development direction .

Linux's security advantage stems from its robust user permissions model and the community-driven approach to updates. The operating system restricts user permissions strictly, isolating user activities, which prevents unauthorized access to critical system components. The open-source nature of Linux facilitates frequent audits and quick patching of vulnerabilities by the community, further enhancing its security posture. This collaborative patching process, combined with Linux's smaller desktop market share making it a less attractive target, contributes to reduced malware incidents compared to Windows .

Network operating systems (NOS) operate on servers to provide features for managing data, files, users, and shared devices like printers across a network. They enable centralized administration, allowing network resources to be efficiently allocated and user access to be controlled. Examples include Windows Server and Novell NetWare, which support file sharing and resource management, enhancing collaboration and operational efficiency in connected computer environments .

You might also like