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

Computer Science Report

The document provides an overview of operating systems, detailing their definition, purpose, and evolution from primitive batch systems to modern multi-user systems. It covers key functions such as process management, memory management, file management, and security, along with various scheduling algorithms and techniques. Additionally, it discusses specialized operating systems like real-time operating systems and their applications in various fields.

Uploaded by

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

Computer Science Report

The document provides an overview of operating systems, detailing their definition, purpose, and evolution from primitive batch systems to modern multi-user systems. It covers key functions such as process management, memory management, file management, and security, along with various scheduling algorithms and techniques. Additionally, it discusses specialized operating systems like real-time operating systems and their applications in various fields.

Uploaded by

alainebennett17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Computer Science Report

Done by Alaine Bennett

1. Explain the Concept of an Operating System

● Definition of Operating System

An Operating System (OS) is a set of programs tasked with organizing and


controlling the hardware and software on a computer so that the
computer behaves in a way that is both flexible and predictable.

● Purpose of Operating Systems

The operating system not only acts as an interface (read middle man)
between the computer's user, the application software, and the hardware,
but must also manage the many resources made available by the
computer.

★ Manages Resources
The OS makes sure all parts of the computer work smoothly together. It
controls:

➔ Memory (RAM) – Decides which programs get memory and clears it


when not needed.
➔ Processor (CPU) – Assigns tasks so the computer doesn’t freeze up.
➔ Input/Output (I/O) – Handles devices like keyboards, screens, and
USB drives.

★ Gives You an Interface

➔ The OS provides a way to interact with the computer, like Windows,


macOS, or Linux.
➔ You either get a Graphical User Interface (GUI) (with icons and
windows) or a Command-Line Interface (CLI) (where you type
commands).
2. Describe how operating systems have evolved over time from
primitive batch systems to sophisticated multi-user systems.

● History of Operating System Development

Operating systems have changed a lot from the early days when
computers could only run one task at a time. Now, we have super-fast,
multi-user systems that can do tons of things at once.

● Batch Processing

➔ The concept of batch processing was developed to address the


inefficiency in processor utilization that serial processing caused.

➔ Batch processing introduced the concept of grouping jobs that will


require similar resources together in a batch and then running
them.

➔ After they would submit the jobs to the computer, a new piece of
software called the monitor would schedule jobs to be executed as
fast as possible.

➔ The jobs would run until they either successfully ended or if an error
occurred, at which time the monitor would immediately load the next
program in a batch.

Pros:
● Efficient for large tasks
● No need for constant user input
● Works well for scheduled jobs (e.g., payroll processing, bill
generation)

Cons:
● Can’t change tasks while they’re running
● If one job has an error, the whole batch might stop

Example of Batch Processing:


Imagine you have 100 homework assignments to print. Instead of printing
one by one, you send them all at once, and the printer finishes them
without needing you to press "Print" each time. That’s batch processing!
Where is Batch Processing Used?
● Bank transactions
● Payroll systems
● Large-scale data processing

● Real-Time Operating Systems (RTOS)

➔ A "real-time operating system" (RTOS) is a specialized type of


operating system designed to manage tasks with strict timing
constraints.

➔ It ensures quick and predictable responses to events, making it


ideal for applications where precise timing is critical, like industrial
automation, automotive systems, and medical devices.

➔ The primary function of an RTOS is to handle tasks within specific


timeframes, often measured in milliseconds, which is crucial for real-
time applications.

➔ RTOS aims to provide predictable response times by carefully


managing task scheduling and prioritizing time-critical operations.

Pros:
Fast Response Time
Highly Reliable

Cons:
Expensive to Develop because it requires specialized software &
hardware.
Requires High Maintenance cause it needs to be updated and
monitored
Complex to Design because it must be carefully programmed.

Where is Batch Processing Used?


Medical systems – MRI machines, ventilators
Automobiles – Engine control, self-driving cars
Industrial robots – Factory automation
Aerospace – Air traffic control, spacecraft systems
Multiprogramming

Instead of having one program being loaded into memory, as was the case
for batch processing, multiple programs are loaded in memory. Instead of
running one program at a time, the CPU switches between them to
maximize efficiency.

HOW IT WORKS?
The OS loads multiple programs into memory.
The CPU switches between programs whenever one is waiting (e.g., for
input/output).
This reduces CPU idle time, increasing system efficiency.

Pros:
Better CPU utilization (less idle time)
Faster processing (more tasks running at once)
Efficient multitasking

Cons:
Needs more memory (RAM) to store multiple programs
More complex OS to manage multiple tasks
Slower response for individual tasks since CPU is shared

Example of Multiprogramming

Imagine you’re:
Downloading a file
Watching a video
Typing a document

Instead of finishing one task before starting another, a multiprogramming


OS switches between them so everything runs smoothly at the same time

Where is Multiprogramming Used?


Windows
macOS
Linux
UNIX
Multi Processing
A Multiprocessing Operating System is an OS that allows a computer to
use multiple processors (CPUs) at the same time. This means multiple tasks
can be processed simultaneously, making the system faster and more
efficient.

HOW IT WORKS
The system has two or more processors (CPUs).
The OS divides tasks among the processors.
Each processor works independently or together to complete tasks faster.

Pros:
Faster processing since tasks run in parallel.
Better performance for heavy applications like gaming and AI.
More reliable – If one processor fails, others can still work.

Cons:
Expensive hardware – Needs multiple CPUs.
More complex OS to manage multiple processors.
Not all programs use multiple CPUs efficiently.

Example of Multiprocessing
Imagine a restaurant kitchen :

One chef is cooking


Another is chopping vegetables
A third is plating food

Since multiple chefs (processors) are working at the same time, the food
gets prepared much faster than if only one chef was doing everything

Where is Multiprocessing Used?


Windows
macOS
Linux
UNIX
3. Describe the functions of operating systems

Operating system functions: Bootstrap process.

HOW BOOTSTRAP WORKS:


1️. Power On – When you turn on your computer, the hardware is activated.
2️. OS/UEFI Runs – The Basic Input/Output System (BIOS) or Unified Extensible
Firmware Interface (UEFI) checks the system hardware.
3️. Bootstrap Loader Executes – A small program (stored in ROM or firmware)
locates and loads the OS kernel from storage (like SSD or HDD) into RAM.
4️. Operating System Starts – The OS takes control, loads drivers, and prepares the
system for the user.

Example:
When you turn on your Windows PC, the BIOS loads the Windows boot
manager, which then loads the Windows OS into memory, allowing you to
use your computer.

To note coldboot is the process of starting a computer that is completely


powered OFF and warm boot is the process of restarting a computer that
is already powered ON.

Process Management: Definition.

Process management is a key function of an operating system that


handles the execution of multiple programs (processes) at the same time.
It ensures that each process gets the required resources (CPU time,
memory, etc.) while preventing conflicts and maximizing system efficiency.

There are two principle methods on OS control processes which are the
two state and three state process management models. The two-way
model is where each process is assigned a status as to where it is running
or not which are designated as Running and Not Running. The OS
manages and maintains the status of all processes in the system by
tracking their status as being either Running or Not Running.
Process states: Running, Ready, Blocked.

IN the three-state process management model there are there states

Running: this is the state of the process that is currently being executed.
Ready: This is the state of a process that is queuing, prepared and waiting
to be executed when given the opportunity.
Blocked: A process that cannot execute until some events occurs such as
the completion of an I/O operation.

A process is in one and only one of the three states . For a single
processor computer, only one process can be in the RUNNING state at any
one instant. There can be many processes in the READY and BLOCKED
states and each of these states will have an associated queue for
processes.

How the interrupt mechanism works.

An interrupt is an electronic signal to the processor for immediate


attention. A processor receiving an interrupt will stop what it is doing and
service the interrupt before returning to what it was doing before.There
are four basic types of interrupts.
Timer Interrupts
Generated by the system timer at regular intervals.
Helps the OS schedule tasks and ensure fair CPU time for all processes.
Example: Switching between multiple programs (multitasking).

I/O Interrupts
Triggered when input/output (I/O) operations are completed.
Example: When a file finishes downloading or a printer completes a job.

Operating Systems manage interrupts using interrupt handlers that are


divided into two parts: The First-Level Interrupt Handler or fast interrupts
and the Second-Level interrupts. A FLIH introduces a jitter to the process
execution and mask interrupts. This is undesirable so programmer will
attempt to minimize the execution time of an flit, and pass control to the
SLIH as soon as possible.

Hardware Interrupts
Generated by hardware devices like the keyboard, mouse, printer, or
network card.
Example: Pressing a key on the keyboard or moving the mouse sends an
interrupt to the CPU.

Software Interrupts
Generated by programs when they need OS services (system calls).
Example: When a program requests to open a file or allocate memory.
Deadlock and Deadlock Resolution

A deadlock happens when two or more processes get stuck waiting for
resources that another process is holding. As a result, none of them can
continue, and the system gets stuck. Typically more than one processes
are involved in deadlock and this is called deadly embrace. This situation
comes in place if all of the following conditions holds simultaneously in the
system:

Mutual Exclusion: It means only one process can use a resources at any
given.
Hold and wait: A process is currently holding at least one resource and
requesting to use resources held by other processes.
Circular Wait: A process waiting for a resource which is being held by
another process which in turn is waiting for the first process to release the
resource.
No Pre-emption: The operating system must not deallocate resources
once they have been allocated.

Imagine two cars at a narrow bridge:


Car A needs Car B to move, but Car B needs Car A to move first.
Neither car moves → Deadlock!

In a computer, this happens when two programs need the same resources
but won’t let go, causing a system freeze.
Process Control Block

A Process Control Block (PCB) is a data structure used by the operating


system to store information about a process. It acts like an identity card
for every process running in the system.

What is Inside a PCB?


Each PCB contains important details about a process, such as:

1️. Process ID (PID) – Unique number assigned to each process.


2️. Process State – Ready, Running, Waiting, etc.
3️. Program Counter – The address of the next instruction to execute.
4️. CPU Registers – Stores temporary data used by the process.
5️. Memory Management Info – Details of memory allocated to the process.
6️. I/O Status – Information about input/output operations.
7️. Priority – Determines which process runs first.

The OS uses the PCB to track and manage processes efficiently.


Scheduling

Scheduling decides which of the processes in the ready queue is to be


allocated to the CPU.
Objectives of Scheduling:

Maximize the system throughput.


Throughput- the number of processes that are completed per time unit.
Provide a tolerable response.
Degrade performance gracefully
Be consistent and predictable

Types of Scheduling Algorithm


Pre-emptive
Non preemptive

Preemptive Scheduling (CPU can take back control anytime)

The OS interrupts a running process to give CPU time to another process.

Shortest Job First (SJF - Preemptive)


The process with the shortest remaining execution time runs first.
If a new shorter process arrives, the OS interrupts the current one.
Example: Solving the easiest homework first, even if you already started a
harder one.

Round Robin (RR)


Each process gets a fixed time slice (called a time quantum).
If a process doesn’t finish in time, it goes back to the queue, and the next
one runs.
Example: A turn-based game where each player (process) gets an equal
chance.
Good for multitasking but can cause delays for longer tasks.
Non-Preemptive Scheduling (Once a process starts, it runs until done)

The CPU does not interrupt a running process; it must complete before
the next process starts.

First Come, First Serve (FCFS)


Processes run in the order they arrive (like a queue).
Simple but inefficient if a long job arrives first (convoy effect).
Example: Standing in line at a ticket counter – first person in line gets
served first.

Shortest Job First (SJF - Non-Preemptive)


The shortest job starts first (but once it starts, it cannot be interrupted).
More efficient than FCFS, but can cause starvation (long jobs may never
run).
Example: Solving the easiest homework first, but you must finish it before
starting another.

Which Scheduling Algorithm is Best?

FCFS – Simple but can be slow.


SJF (Preemptive) – Fast but complex.
SJF (Non-Preemptive) – Efficient but can starve long processes.
Round Robin – Best for multitasking but not always fastest.

Memory Management

Memory Management is the process of controlling and coordinating


computer memory (RAM) while running multiple programs. The operating
system (OS) ensures that each process gets enough memory while
preventing conflicts and maximizing efficiency.

1️. Memory Allocation – Assigns memory to processes when they start.


2️. Memory Deallocation – Frees memory when a process ends.
3️. Tracking Memory Usage – Keeps records of which memory blocks are free or
occupied.
4️. Prevents Memory Conflicts – Ensures processes don’t overwrite each other’s
memory.

Types of Memory Management Techniques

VIRTUAL MEMORY

Uses part of the hard drive (swap space) as extra RAM.


Allows running large programs on low-memory systems but can slow down
performance.
Example: When you open too many browser tabs, your PC uses disk space
to keep things running.

PAGING

Divides memory into fixed-size pages.


Avoids fragmentation, but needs extra processing (page table lookup).
Example: A book divided into numbered pages – doesn’t matter where a
page is stored, as long as the index knows its location.

THRASHING

Thrashing occurs when a computer spends too much time swapping data
between RAM and disk (virtual memory) instead of executing tasks. This
happens when there’s not enough RAM, and the system continuously
moves pages in and out of memory, slowing everything down.

Why is Memory Management Important?


Prevents crashes from memory conflicts.
Optimizes CPU performance by efficiently allocating memory.
Allows multitasking without system slowdowns.
Supports large applications using virtual memory.

File Management

File Management is a key function of an operating system that handles


the creation, storage, organization, and access of files and directories
(folders). It ensures that users and programs can efficiently store and
retrieve data.

DIRECTORIES AND FOLDERS


A directory (folder) is a container that holds files and other directories
(subfolders). It helps organize data and makes file retrieval easier.

🔹 Types of Directories:
✔ Single-Level Directory – All files stored in one place (simple but hard to
manage).
✔ Two-Level Directory – Each user has a separate directory.
✔ Tree Directory – A hierarchical structure (like Windows Explorer).
✔ Acyclic/Graph Directory – Allows shared folders (links) for better
organization.

FILES

A file is a collection of data stored on a computer. Every file has:


✔ Name – Unique identifier (e.g., notes.txt).
✔ Extension – Defines file type (.txt, .jpg, .mp3).
✔ Size – Amount of storage used.
✔ Permissions – Who can read, write, or execute it.

File Operation
✔Create
✔Read
✔ Write
✔ Rename
✔ Delete
✔ Copy
✔Move

File Compression

File compression reduces file size to save storage and speed up transfers.
It works by removing redundant data.

TYPES OF COMPRESSION

Lossless Compression – No data is lost (e.g., .zip, .rar, .png).


Lossy Compression – Some data is removed for higher compression
(e.g., .mp3, .jpg).

Example:

ZIP & RAR files compress multiple files into one, reducing size.
MP3 & JPEG reduce file size by removing unneeded details.

Security of Files

File security ensures that only authorized users can access, modify, or
delete files. The operating system uses various methods to protect
sensitive data from unauthorized access, loss, or corruption.

USER ID

Each user on a system is assigned a User ID (UID), which helps the OS


identify and control access to files and resources.

🔹 Example:

In Windows, users have separate accounts with different access levels


(Admin, Guest, etc.).
In Linux, every file has an owner, group, and others, each with specific
permissions.

PASSWORD
A password is a secret code required to access a user account or a
protected file.

🔹 Best Practices for Passwords:


✔ Use a mix of uppercase, lowercase, numbers, and symbols.
✔ Avoid using easy-to-guess passwords (like "123456" or "password").
✔ Enable two-factor authentication (2FA) for extra security.
LOCKWORDS
A lockword is a special password used to lock specific files or folders. It
adds an extra layer of security to private data.

🔹 Example:

Some software (like Microsoft Office) allows users to set a password on


documents.

ACCESS CONTROL LIST


An Access Control List (ACL) defines who can do what with a file or folder. It
assigns specific permissions to different users or groups.

🔹 Types of Permissions:
✔ Read (R) – User can view the file but not change it.
✔ Write (W) – User can modify or delete the file.
✔ Execute (X) – User can run the file (for programs or scripts).

Example: In Linux, the command chmod 755 file.txt gives:

Owner: Read, Write, Execute


Group: Read, Execute
Others: Read, Execute

FILE ENCRYPTION

Encryption converts files into unreadable code that can only be accessed
with a decryption key or password.

🔹 Types of Encryption:
✔ Symmetric Encryption – Uses one key to encrypt & decrypt (fast but less
secure).
✔ Asymmetric Encryption – Uses two keys (public & private) for better
security.

Example:

BitLocker (Windows) encrypts entire drives.


AES Encryption is used to protect confidential files.
ACTIVITY LOGS

Activity logs record who accessed or modified files and when. They help
detect security breaches and unauthorized access.

🔹 Example:

Windows Event Viewer tracks login attempts and file access.


Web servers keep logs of user activity to detect suspicious behavior.

User Interface
A User Interface (UI) is the way a user interacts with the operating system.
It allows users to run programs, manage files, and configure settings
through different input methods.

TYPES OF INTERFACE

Command-line Interface
A text-based interface where users type commands to interact with the OS.
Requires exact syntax to execute tasks.

Pros:
✔ Fast & powerful for advanced users.
✔ Low system resources required.
✔ Great for automation (scripts & batch files).

Cons:

Difficult to learn for beginners.


No visual elements (requires memorization).

Example:

Windows Command Prompt (cmd.exe)


Linux Terminal (bash, zsh)
macOS Terminal

MENU-DRIVEN INTERFACE
Users interact with a list of options (menus) instead of typing commands.
Used in ATMs, vending machines, older mobile phones, BIOS settings.
Pros:
✔ Simple & easy to use.
✔ No need to memorize commands.

Cons:
Limited flexibility compared to CLI.
Slower for advanced users.

Example:

ATM Machine menus.


Early feature phones (Nokia menu-based UI).

GRAPHICAL USER INTERFACE


A visual interface that uses icons, buttons, windows, and a mouse.
Easier to use than CLI but requires more system resources.

Pros:
✔ User-friendly (drag & drop, click to open).
✔ Easy multitasking with multiple windows.

Cons:
Uses more RAM & processing power.
Slower for advanced users compared to CLI.

Example:
Windows (File Explorer, Start Menu).
macOS (Dock, Finder).
Linux (GNOME, KDE).

MANIPULATION OF INTERFACE

Customization
Users can change themes, icons, fonts, and layouts to make the interface
more personal.

Keyboard Shortcuts
Used to navigate faster (e.g., Ctrl + C to copy, Alt + Tab to switch apps).

Touch & Voice Interfaces


Newer systems allow touchscreen gestures (e.g., smartphones) and voice
commands (e.g., Siri, Cortana).
Device Management in Operating Systems

Device Management is the process by which an operating system (OS)


controls hardware devices such as printers, keyboards, hard drives, and
USB devices. The OS ensures that devices work efficiently by managing
communication between software and hardware.

DEVICE DRIVERS

A device driver is a small software program that allows the OS to


communicate with hardware devices.

Functions of Device Drivers:


✔ Translates OS commands into device-specific instructions.
✔ Enables the OS to control keyboards, mice, printers, and more.
✔ Automatically installs updates for better performance.

Example:

A printer driver allows Windows to send print jobs to a printer.


A graphics driver ensures your GPU runs games smoothly.

INTERRUPT HANDLING (Process Control Block - PCB)

An interrupt is a signal sent to the CPU to pause a running process and


handle a high-priority task.

Types of Interrupts:
✔ Hardware Interrupt – Triggered by external devices (e.g., pressing a key on
a keyboard).
✔ Software Interrupt – Generated by a running program (e.g., divide by zero
error).

🔹 Process Control Block (PCB):

When an interrupt occurs, the OS saves the current process in the PCB.
The OS then switches to handling the interrupt before returning to the
previous task.

INPUT/OUTPUT (I/O) CONTROL

The OS manages input (keyboard, mouse) and output (monitor, printer)


devices.

Functions of I/O Control:


✔ Assigns device priorities (e.g., which device gets access first).
✔ Prevents conflicts between devices trying to use the same resource.
✔ Uses buffers & caching for faster performance.

Example:

A mouse click is input, and the cursor movement on the screen is output.

PERIPHERAL CONTROL

A peripheral is an external device connected to a computer (e.g., printers,


speakers, USB devices). The OS manages these devices to ensure smooth
operation.

Functions:
✔ Detects when a new device is connected.
✔ Installs necessary drivers for communication.
✔ Controls data flow between the device and the computer.

Example:

When you plug in a USB flash drive, the OS detects and mounts it for use.

POLLING vs. INTERRUPTS


Polling – The CPU constantly checks if a device needs attention.
Interrupts – The device sends a signal when it needs attention.

Which is better?

Polling is simple but wastes CPU time.


Interrupts are efficient and reduce CPU load.
Example:

A mouse movement sends an interrupt, so the CPU doesn’t need to keep


checking.

BUFFERING & SPOOLING

Buffering
A temporary storage area where data is held before being processed.
Speeds up communication between slow & fast devices.

Example:
When streaming a video, a buffer stores data to prevent lag if the
connection slows down.

Spooling (Simultaneous Peripheral Operation Online)


Stores multiple tasks in a queue before sending them to a device.
Commonly used in printing where documents wait in a print queue.

Example:
If multiple users send print jobs, spooling queues them instead of blocking
the printer.

Networking in Operating Systems

Networking allows computers to communicate and share resources over a


network. The OS handles network management, user access, and
protocols to ensure smooth and secure data transmission.

Network Management
Network management in an OS involves controlling and monitoring
network resources, such as user accounts, access logs, and security
settings.

User Accounts
The OS manages user authentication and permissions for network access.
Users may have different levels of access (e.g., Admin, Standard User,
Guest).
Account details include username, password, and privileges.

Example:

A school network has student and teacher accounts with different


permissions.
In Windows, Active Directory is used to manage user accounts in large
networks.

Access Logs

Logs keep records of who accessed the network, when, and what they did.
Helps track unauthorized access and detect security breaches.

Example:
A company logs failed login attempts to detect hacking attempts.
Websites log IP addresses of visitors for security and analytics.

Networking Protocols

A protocol is a set of rules for communication between devices in a


network.

TCP/IP (Transmission Control Protocol / Internet Protocol)


The TCP/IP model is the foundation of the internet and most networks.

How TCP/IP Works:


✔ TCP (Transmission Control Protocol) – Splits data into packets, sends them,
and ensures they arrive correctly.
✔ IP (Internet Protocol) – Assigns IP addresses to devices and routes data
across networks.

Example:
When you send an email, TCP ensures it arrives fully, and IP finds the
fastest route to the recipient

References

GCF Global. (n.d.). Understanding operating systems. Retrieved from


https://edu.gcfglobal.org/en/computerbasics/understanding-operating-
systems/1/

GeeksforGeeks. (n.d.-a). Evolution of operating systems. Retrieved from


https://www.geeksforgeeks.org/evolution-of-operating-system/

GeeksforGeeks. (n.d.-b). Types of operating systems. Retrieved from


https://www.geeksforgeeks.org/types-of-operating-systems/

Toppr. (n.d.). Functions of operating systems. Retrieved from


https://www.toppr.com/guides/computer-science/computer-
fundamentals/operating-system/functions-of-operating-system/

You might also like