Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Assignment No.

01

Full Name: Muhammad Ahmad

Roll No: Bsem-S22-008

Section: 4A

Subject: Operating System

Submitted To: Mam Arshi

Department Of Software Engineering


Superior University, Gold Campus Lahore

Question 1:
Describe four basic functions of BIOS.

BIOS:
BIOS is computer program that is typically stored in EPROM and used by the CPU to
perform start-up procedures when the computer is turned on.

Basic Functions:

 POST - Test the computer hardware and make sure no errors exist before loading the
operating system.

 Bootstrap Loader - Locate the operating system. If a capable operating system is


located, the BIOS will pass control to it.

 BIOS drivers - Low-level drivers that give the computer basic operational control
over your computer's hardware.

 BIOS setup or CMOS setup - Configuration program that lets you configure
hardware settings, including system settings, such as date, time, and computer
passwords.

Question 2:

Explain the working of batch operating system. Also write its advantages
and disadvantages

Working of a Batch Operating System:


The OS keeps track of the number of jobs and executes them one by one. Jobs are processed
in the order in which they are received. A batch is defined for each work set. When a job is
completed, the memory associated with it is released, and the work’s output is sent to an
output spool for printing or processing later. In a batch operating system, user engagement is
limited. When the system takes over the task from the user, the person is free to do other
things. You can also make use of the batch processing system to make changes to data in any
transactions or records.

Advantages:
 It is usually difficult to predict how long a project will take to complete; but only the
batch system processors happen to know how long it takes to complete the job in a
timely manner.
 This system is capable of handling huge assignments on a regular basis.
 To boost processing speed, the batch process might be separated into many parts.
 When a process is complete, the following job from the job spool is executed without
the need for user intervention.
 The use of the CPU improves.
Disadvantages:
 When a job fails for the first time, it must be rescheduled, and the process may take a
long time to finish.
 Batch systems must be fully understood by computer operators.
 Debugging the batch system is tricky.
 There is no direct interaction between the computer system and the user.
 Other jobs must wait for an indeterminate period of time if a job enters some infinite
loop.

Question 3:

Explain real time OS and also write its advantages and disadvantages.

RTOS (Real-Time Operating Systems) are specialized operating systems used in applications
where rapid response to external events within strict time constraints is critical. These
applications include industrial control, telecommunications, flight control, and real-time
simulations. RTOS ensures precise timing, reliability, and responsiveness to external events,
and failure to meet deadlines can lead to system failure. It excels in environments with a high
volume of external events and is crucial for ensuring the safety, accuracy, and reliability of
critical systems. Hard real-time operating systems ensure critical tasks are completed within
strict and non-negotiable time limits, whereas soft real-time operating systems prioritize
timely execution but can tolerate occasional deadline misses without severe consequences.
The choice between them depends on the specific requirements of the application and the
consequences of failing to meet timing constraints.

Advantages:
1. Maximum consumption
2. Task Shifting
3. Focus On Application
4. Real-Time Operating System In Embedded System
5. Error Free
6. Memory Allocation
Disadvantages:
1. Limited Tasks
2. Use Heavy System Resources
3. Complex Algorithms
4. Device Driver and Interrupt signals
5. Thread Priority.
6. Minimum Switching

Question 4:

Discuss multitasking, multiprogramming and multiprocessing.

Multitasking is the simultaneous execution of multiple tasks, such as running multiple


applications or processes, on a computer system. It allows users to perform different activities
concurrently, like listening to music, editing documents, and browsing the web. Multitasking
extends the concept of multiprogramming and relies on time-sharing alongside context
switching.

Multiprogramming is a vital aspect of modern operating systems where multiple application


processes or jobs want to execute concurrently. However, the main memory is often
insufficient to hold all these processes at once. These processes are initially placed in a job
pool, waiting for allocation of CPU and main memory.

Multiprocessing is the utilization of two or more CPUs (processors) in a single computer


system. This technology allows multiple processes to execute concurrently. In a
multiprocessing system, these processors often share the computer bus, clock, memory, and
peripheral devices.

Question 5:

Discuss the working of system call with the help of diagram.

A system call is a mechanism used by programs to request services from the operating system
(OS). In simpler terms, it is a way for a program to interact with the underlying system, such
as accessing hardware resources or performing privileged operations.

(Step 1) The processes executed in the user mode till the time a system call interrupts it.

(Step 2) After that, the system call is executed in the kernel-mode on a priority basis.

(Step 3) Once system call execution is over, control returns to the user mode.,

(Step 4) The execution of user processes resumed in Kernel mode.


Question 6:

Discuss uniprogramming, multiprogramming and parallel programming.

Uniprogramming:

Uniprogramming means one program sits in the main memory at a time. Uniprogramming
was used in old computers and mobiles. When the computer starts then the operating system
and application programs are loaded into main memory. We only count user programs
running in RAM. RAM is also called main memory.

Multiprogramming:

In multiprogramming, multiple programs reside in main memory (RAM) at a time. OS which


handles multiple programs at a time is known as a multiprogramming operating system. One
processor or CPU can only run one process at a time. OS uses context switching in the main
memory for running multiple programs. Context switching is to switch programs so all
programs are given a suitable amount of time.

Parallel Programming:

In very simple terms, it is the use of multiple resources, in this case, processors, to solve a
problem. This type of programming takes a problem, breaks it down into a series of smaller
steps, delivers instructions, and processors execute the solutions at the same time. It is also a
form of programming that offers the same results as concurrent programming but in less time
and with more efficiency.

Question 7:

Explain the purpose and functions of operating system and write names of
different types of operating systems.
An Operating System is the interface between the computer hardware and the end-user.
Processing of data, running applications, file management and handling the memory is all
managed by the computer OS.
Purpose:
 It controls all the computer resources.
 It provides valuable services to user programs.
 It coordinates the execution of user programs.
 It provides resources for user programs.
 It provides an interface (virtual machine) to the user.
 It hides the complexity of software.
 It supports multiple execution modes.
 It monitors the execution of user programs to prevent errors.

Functions:
• Memory Management
• Booting and Rebooting
• User Interface
• Peripheral Device Management Security.
• Coordination
• File and Program Organization
• Execution of Programs
• Error Detection

Types of Operating Systems:

• Desktop OS (e.g., Windows, macOS, Linux).


• Server OS (e.g., Windows Server, Linux server distributions).
• Embedded OS (e.g., Android, iOS, RTOS).
• Real-Time OS (e.g., VxWorks, QNX).
• Mobile OS (e.g., Android, iOS).

Question 8:

Discuss the role and working of kernel.


Role of the Kernel:
The kernel is the core component of an operating system, and its role is central to the
functioning of the entire system. Its primary responsibilities include:
1. Hardware Abstraction: The kernel abstracts and manages the underlying hardware
resources, shielding higher-level software layers from hardware complexities.
2. Process and Memory Management: It allocates memory, schedules processes, and
ensures efficient resource utilization.
3. File System Management: The kernel manages file I/O operations.
4. Device Management: The kernel controls and coordinates access to input/output
devices, including device drivers and communication protocols.
5. Security and Access Control: It enforces security policies, user authentication, and
access control to protect system resources and data.
6. Error Handling: The kernel detects and handles errors, ensuring system stability by
preventing crashes or data corruption.

Working of the Kernel:

 Bootstrapping: Loaded into memory during system boot.


 Initialization: Sets up data structures and prepares the system.
 Interrupt Handling: Responds to hardware and software interrupts.
 Process and Memory Management: Schedules processes, allocates memory, and
enforces isolation.
 File System and I/O Management: Manages file operations and device access.
 Security and Access Control: Enforces security policies and user authentication.
 Error Handling: Detects and handles errors to maintain system stability.
 User Interaction: Provides a platform for user interfaces.
 Resource Management: Efficiently manages hardware resources in kernel mode.

You might also like