OS Module 1 Complete Solutions
OS Module 1 Complete Solutions
MODULE 1
PART-A
Batch Systems:
2. Distinguish between hard real time systems and soft real time systems
1) Manage the computer’s resources, such as the CPU, memory, disk drives
and printers.
DOS:
Advantages:
There are various advantages of the distributed operating system. Some of them are
as follow:
● It may share all resources (CPU, disk, network interface, nodes, computers,
and so on) from one site to another, increasing data availability across the
entire system.
● It increases the speed of data exchange from one site to another site.
● It is an open system since it may be accessed from both local and remote
locations.
● Most distributed systems are made up of several nodes that interact to make
them fault-tolerant. If a single machine fails, the system remains operational.
Modern processors use idle time to save power. Some programs are designed
to appear to make use of CPU idle time, meaning that they run at a low priority
(but slightly higher than idle priority) so as not to impact programs that run at
normal priority. This allows non-crucial background programs to only run
when it would not affect the performance of other applications. Many
operating systems, for example Windows, Linux, and macOS will run an idle
task, which is a special task loaded by the OS scheduler on a CPU when there
is nothing for the CPU to do.
Interrupt:
The term Interrupt is usually reserved for hardware interrupts. They are
program control interruptions caused by external hardware events. Here,
external means external to the CPU. Hardware interrupts usually come from
many different sources such as timer chip, peripheral devices (keyboards,
mouse, etc.), I/O ports (serial, parallel, etc.), disk drives, CMOS clock,
expansion cards (sound card, video card, etc). That means hardware
interrupts almost never occur due to some event related to the executing
program.
Exception:
Interrupt Exception
These are normal events and These are abnormal events and
shouldn’t interfere with the normal often result in the termination of a
running of a computer. program
In a Batch operating system, the user does not have direct access to the
computer and cannot directly interact with it either.
In this type of OS, jobs are prepared for each user, and all those jobs have
been imprinted or stored in the punch card-like structure, which is submitted
to the computer operator.
This kind of operating system mostly works on offline devices and once the
punch card is submitted to the computer operator, the computer works
according to the code or program written on the card.
With Time sharing OS, users at different locations or terminals can access the
same computer at the same time. Here, the CPU uses the switching
mechanism that helps it to switch from one job to another so that each job
gets equal processing time.
An RTOS is a data processing system whose response time to the input is very
short. RTOS is also known as the brain of the real-time system because of its
immediate response to the input.
In this operating system, different computers interact with one another and
communicate in order to exchange data. The Internet works on this system
where everyone is linked with each other to communicate. It can also be
termed as the Networking operating system, which supports a high level of
communication.
PART-B
Functions:
Multiprogramming systems:
More than one task or program or jobs are present inside the main memory at
one point of time.
Buffering and spooling can overlap I/O and CPU tasks to improve the system
performance but it has some limitations that a single user cannot always keep
CPU or I/O busy all the time
· The operating system picks up and begins to execute one of the jobs from
memory.
· Once this job needs an input and output operation the operating system
switches to another job.
· This short period of time during which the user gets the CPU is known as
time slice, time slot or quantum.
There are various situations where you must require system calls in the
operating system. Following of the situations are as follows:
II. Network connections require the system calls to send and receive data
packets.
III. If you want to read or write a file, you need to make system calls.
IV. If you want to access hardware devices, including a printer, scanner, you
need a system call.
Systems programs.
In a Batch operating system, the user does not have direct access to the
computer and cannot directly interact with it either.
In this type of OS, jobs are prepared for each user, and all those jobs
have been imprinted or stored in the punch card-like structure, which is
submitted to the computer operator.
Jobs with similar needs are batched together and run through the
computer as a group by an operator or automatic job sequencer.
Performance is increased by attempting to keep CPU and I/O devices
busy at all times through buffering, off line operation, spooling and
multiprogramming.
It is used in systems where there are multiple CPUs each running the
same copy of the operating system. Communication takes place across
the system bus.
Hardware
The hardware consists of the memory, CPU, arithmetic-logic unit, various bulk
storage devices, I/O, peripheral devices and other physical devices.
Kernel
Refer here
In a Non-multiprogrammed system, there are moments when the CPU sits idle
and does not do any work. In a Multiprogramming system, the CPU will never
be idle and keeps on processing.
· Then the computer operator places a batch of several jobs on an I/P device.
11. Draw and explain the architecture of windows 2000 and traditional UNIX
Windows 2000 included advanced features and had overall better support for
computer hardware.
Some of the significant features of Windows 2000 Professional are:
● Support for FAT16, FAT32, and NTFS.
● Increased uptime of the system and significantly fewer OS reboot
scenarios.
● Windows Installer tracks applications and recognizes and replaces
missing components.
● Protects memory of individual apps and processes to avoid a single app
bringing the system down.
● Encrypted file systems protect sensitive data.
12. State the differences between system call and system program.
System program: These are the programs that are used and required to run
the system - machine, input output devices and other connected peripherals.
They are also known as System softwares.
System calls: System calls are the calls made by the applications or the
processors for a particular execution of a code block; also known as interrupts
in a computer. You can call the CPU to execute your program with a high
priority and execute other commands later.
The client requests for service and Each node can request for services
the server responds with the service. and can also provide the services.
The data is stored in a centralised Each peer has its own data.
server.
When several clients request for the As the services are provided by
services simultaneously, a server several servers distributed in the
can get bottlenecked. peer-to-peer system, a server is not
bottlenecked.
Monolithic architecture
Microkernel architecture
Microkernel architecture is an architecture with kernel having the basic
interaction with hardware and the basic Inter-Process Communication
mechanisms. All the other Operating System services exist outside the Kernel.
Microkernel provides the flexibility to add new features or modify existing
features while slightly affecting performance as it increases the amount of
interactions between kernel and user mode features.
Hybrid architecture tries to get the best features of both monolithic kernels as
well as microkernels. Hybrid kernel aims to have optimal performance and the
flexibility to modify and upgrade kernel services.
Ex: Apple IOS, Apple macOS for desktop machines uses hybrid architecture
17. Explain about system calls between user mode and kernel mode.
18. Compare Multiprogramming and Multitasking
1. Supercomputer
2. Mainframe computer
3. Minicomputer
4. Workstation
5. PC (Personal Computer)
1. Supercomputer:
When we talk about speed, then the first name that comes to mind when thinking of
computers is supercomputers. They are the biggest and fastest computers(in terms
of speed of processing data). Supercomputers are designed such that they can
process a huge amount of data, like processing trillions of instructions or data just in
a second. This is because of the thousands of interconnected processors in
supercomputers. It is basically used in scientific and engineering applications such
as weather forecasting, scientific simulations, and nuclear energy research. It was
first developed by Roger Cray in 1976.
2. Mainframe computer:
Mainframe computers are designed in such a way that it can support hundreds or
thousands of users at the same time. It also supports multiple programs
simultaneously. So, they can execute different processes simultaneously. All these
features make the mainframe computer ideal for big organisations like banking,
telecom sectors, etc., which process a high volume of data in general.
3. Minicomputer:
4. Workstation:
PART-C
6. Define interrupt?
13. Explain how protection is provided for the hardware resources by the
operating system.
19. Define Virtual Memory? Describe the use of fork () and exec () system calls?