You are on page 1of 5

Q1. Describe in detail the boot process of a Linux operating system?

a. As power comes up the BIOS is given control


b. BIOS runs self-tests, usually including cursory memory tests.
c. The BIOS then loads the first sector of the disk to be used for booting and transfers
control to it.
d. The MBR code varies. One version will chain to the code in the first sector of the boot
partition (Windows), another will load a bootloader. Windows boot proceeds from
code and information in the boot partition.
e. boot loader chooses kernel location and version
f. boot loader prepares kernel and initrd image in memory, transfers control to kernel
g. loading kernel modules
h. discovering hardware and load additional kernel modules to support it
i. looking for disks
j. R/O mount of / partition so that it can potentially be checked and repaired
k. init process spawn
l. /etc/inittab read and executing
m. mounting all FSes from /etc/fstab
n. runlevels running (based on default runlevel in /etc/inittab) or another init method
such as systemd or upstart
o. rc.local
p. login prompt

Q2. Write step by step booting process in windows operating system?

Booting is a process of switching on the computer and starting the operating system. When a
computer is switched on, the boot process loads the operating system into main memory
(RAM) installed inside it. Types of computer booting are Cold Booting and Warm Booting.

 Cold Boot: when the user switches on a computer after it has been power off
completely,
 Warm Boot: when the user restarts the computer.

Six Steps in the Booting process in windows operating system

Six steps of the booting process:

Step 1: BIOS and Setup Program

 ROM (read-only memory): it is a permanent and unchanging memory also


 BIOS (basic input/output system ): the part of the system software that includes the
instructions that the computer uses to accept input and output

1
Step 2: The Power-On-Self-Test (POST)

 Power-On Self-Test: a series of tests conducted on the computer’s main memory,


input/output devices, disk drives, and the hard disk.
 BIO conducts Power-On-Self-Test to check the input/ output system for operability.
 The computer will produce a beeping sound if any problem occurs. An error message
will also appear on the monitor

Step 3: The Operating System (OS) Loads

BIOS searches for the operating system.

 Setting in CMOS: complementary metal oxide semiconductor determines where to


look for the operating system.
 In this step, the operating system’s kernel is also loaded into the computer’s memory.
 The operating system takes control of the computer and begins loading system
configuration information.

Step 4: System Configuration

 Registry: a database to store information about peripherals and software


 Peripheral: a device connected to a computer
 Drive: a utility program that makes peripheral devices function properly
 The operating system’s registry configures the system.
 In this step, drivers are also loaded into memory.

Step 5: System Utility Loads

 System utilities are loaded into memory.


 Volume control
 Antivirus software
 PC card unplugging utility

Step 6: Users Authentication

 Authentication or user login occurs


 Username
 Password

After all this process, the user interface starts, enabling user interaction with the computer
and its programs.

Q3. Write the difference between mac OS X and Unix operating system?

A Mac OS X is an operating system with a graphical user interface, developed by Apple


computer for Macintosh computers, based on UNIX. Darwin is a free and open source.
Mac OS X uses Aqua for graphics. Unix-like operating system first released by Apple Inc. in
2000. It is a standalone operating system as well as the core set of components upon which
Mac OS X was developed. It is primarily developed by Apple to support Mac OS X

2
There are few differences:
 File system – Mac OS X prefer to use HFS+ file system with slightly modified
directory location.
 X11 vs Aqua – Most UNIX system use X11 for graphics. Mac OS X uses Aqua for
graphics.

Q4. Discuss the semaphore and consumer, dining philosopher, banker algorithm, and
producer algorithm?
Semaphores: are integers variables that are used to solve the critical section problem by
using two atomic operations wait and signal that are used for process synchronization.The
wait operation decrements the value of its argument if it is positive. And also a variable or
abstract data type used to control access to a common resource by multiple processes and
avoid critical section problems in a concurrent system such as a multitasking operating
system.
There are 3-types of semaphores namely Binary, Counting and Mutex semaphore. Binary
semaphore exists in two states I e. Acquired(Take), Released(Give). Binary semaphores have
no ownership and can be released by any task or ISR regardless of who performed the last
take operation. The correct use of a semaphore is for signalling from one task to another. A
mutex is meant to be taken and released, always in that order, by each task that uses the
shared resource it protects. By contrast, tasks that use semaphores either signal or wait—not
both

What is consumer OS
Computer Science MCA Operating System. The producer consumer problem is a
synchronization problem. There is a fixed size buffer and the producer produces items and
enters them into the buffer. The consumer removes the items from the buffer and consumes
them.
Dining philosophers
A problem states that there are 5 philosophers sharing a circular table and they eat and think
alternatively. There is a bowl of rice for each of the philosophers and 5 chopsticks. A
philosopher needs both their right and left chopstick to eat.
Potential solutions for the dining philosopher's problem for this are:
 A philosopher must be allowed to pick up the chopsticks only if both the left and right
chopsticks are available.
 Allow only four philosophers to sit at the table. That way, if all the four philosophers
pick up four chopsticks, there will be one chopstick left on the table.
Banker's algorithm
Is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating
the allocation for predetermined maximum possible amounts of all resources, then makes an
“s-state” check to test for possible activities, before deciding whether allocation should be
allowed to continue.

3
Example of Bankers Algorithm

Avoiding Deadlock: Bankers Algorithm

 Processes request only 1 resource at a time.


 Request is granted only it results in a safe state.
 If request results in an unsafe state, the request is denied and the process continues to
hold resources it has until such time as it's request can be met.
 All requests will be granted in a finite amount of time.

The resource request banker algorithm


 Deadlock is a condition in the operating system, where processes wait for an event
that will never occurs.it uses Resource Request algorithm to avoid deadlock. The
algorithm will try to lend resources to the process and analyse whether the state after
lending resources is safe state or unsafe state.
Producer OS
About Producer-Consumer problem the producers and consumers share the same memory
buffer that is of fixed-size. the job of the Producer is to generate the data, put it into the
buffer, and again start generating data. While the job of the Consumer is to consume the data
from the buffer.
when producer / consumer design pattern is a pre-designed solution to separate the two main
components by placing a queue in the middle, letting the producers and the consumers
execute in different threads. This way the production of tasks to be consumed is absolutely
independent from its consumption.

Q5. List and discuss the components of the operating system?

There are many Components of Operating Systems

1. File Management

Operating system is used to manage files of computer system.a file is collection of specific
information stored in the memory of computer system. File management is defined as the
process of manipulating files in computer system, it management includes the process of
creating, modifying and deleting the files.

4
2. Process Management.

Process management involves various tasks like creation, scheduling, termination of


processes, and a dead lock. It also protects the resources of each process from other methods
and allows synchronization among processes. It is the job of OS to manage all the running
processes of the system.

3. I/O Device Management

The three major jobs of a computer are Input, Output, and Processing. The primary role of the
operating system in computer Input / Output is to manage and organize I/O operations and all
I/O devices. In this chapter, you will learn about the various uses of input output devices
concerning the operating system.

4. Network Management

Network management is a broad range of functions including activities, methods, procedures


and the use of tools to administrate, operate, and reliably maintain computer network
systems.

5. Main Memory management

Network management is a broad range of functions including activities, methods, procedures


and the use of tools to administrate, operate, and reliably maintain computer network systems

6. Secondary-Storage Management

Secondary storage is the non-volatile repository for (both user and system) data and
programs. As (integral or separate) part of an operating system, the file system manages this
information on secondary storage.

7. Security Management

The security management function of an operating system helps in implementing


mechanisms that secure and protect the computer system internally as well as externally.
Therefore an operating system is responsible for securing the system at two different levels
which are internal security and external security.

You might also like