Professional Documents
Culture Documents
Ios Module 1 Question and Solutions
Ios Module 1 Question and Solutions
Computer-System Operation
I/O devices and the CPU can execute concurrently
Each device controller is in charge of a particular device type
Each device controller has a local buffer
CPU moves data from/to main memory to/from local buffers
I/O is from the device to local buffer of controller
Device controller informs CPU that it has finished its operation by causing An
interrupt
Q2. WITH A NEAT DIAGRAM EXPLAIN STORAGE DEVICE HEIRARCHY OR
MEMORY HEIRARCHY
Storage Structure
Main memory – only large storage media that the CPU can access
directly
Secondary storage – extension of main memory that
provides large nonvolatile storage capacity Magnetic disks –
rigid metal or glass platters covered with magnetic recording
material
Disk surface is logically divided into tracks, which are subdivided into
sectors
The disk controller determines the logical interaction between the
device and the computer
Storage Hierarchy
Memory is depenadant on the following dimensions
Speed
Cost
Volatality
Caching – copying information into faster storage system; main memory can be
viewed as a last cache for secondary storage
Q3.WRITE A NOTE ON THE FOLLOWING
i. Single processor systems (Uni Processor)
The name itself is saying that the single processor system contains
only one processor for processing.
There is a use of a coprocessor in single processors because it uses
multiple Controllers which are designed to handle special tasks and
that can execute limited instruction sets.
For example − DMA Controller. Single processor systems cost is
more because here every processor requires separate resources
It is Easy to design Single Processor Systems. Single processor
system is less reliable because failure in one processor will result in
failure of the entire system.
3. Job accounting –
Operating system Keeps track of time and resources used by various tasks and
users, this information can be used to track resource usage for a particular user
or group of users.
6. Memory Management –
The operating system manages the Primary Memory or Main Memory. Main
memory is made up of a large array of bytes or words where each byte or word
is assigned a certain address. Main memory is fast storage and it can be accessed
directly by the CPU. For a program to be executed, it should be first loaded in
the main memory. An Operating System performs the following activities for
memory management:
It keeps track of primary memory, i.e., which bytes of memory are used by
which user program. The memory addresses that have already been allocated
and the memory addresses of the memory that has not yet been used. In
multiprogramming, the OS decides the order in which processes are granted
access to memory, and for how long. It Allocates the memory to a process when
the process requests it and deallocates the memory when the process has
terminated or is performing an I/O operation.
7. Processor Management –
In a multi-programming environment, the OS decides the order in which
processes have access to the processor, and how much processing time each
process has. This function of OS is called process scheduling. An Operating
System performs the following activities for processor management.
Keeps track of the status of processes. The program which performs this task is
known as a traffic controller.
8. Device Management –
An OS manages device communication via their respective drivers. It performs
the following activities for device management. Keeps track of all devices
connected to the system. designates a program responsible for every device
known as the Input/Output controller. Decides which process gets access to a
certain device and for how long. Allocates devices in an effective and efficient
way. Deallocates devices when they are no longer required.
9. File Management –
A file system is organized into directories for efficient or easy navigation and
usage. These directories may contain other directories and other files. An
Operating System carries out the following file management activities. It keeps
track of where information is stored, user access settings and status of every file,
and more… These facilities are collectively known as the file system.
The Operating System provides certain services to the users which can be listed in
the following manner:
1. Program Execution: The Operating System is responsible for the execution of all
types of programs whether it be user programs or system programs. The Operating
System utilizes various resources available for the efficient running of all types of
functionalities.
2. Handling Input/Output Operations: The Operating System is responsible for
handling all sorts of inputs, i.e, from the keyboard, mouse, desktop, etc. The
Operating System does all interfacing in the most appropriate manner regarding all
kinds of Inputs and Outputs.
For example, there is a difference in the nature of all types of peripheral devices
such as mice or keyboards, the Operating System is responsible for handling data
between them.
3. Manipulation of File System: The Operating System is responsible for making
decisions regarding the storage of all types of data or files, i.e, floppy disk/hard
disk/pen drive, etc. The Operating System decides how the data should be
manipulated and stored.
4. Error Detection and Handling: The Operating System is responsible for the
detection of any type of error or bugs that can occur while any task. Resource
Allocation: The Operating System ensures the proper use of all the resources
available by deciding which resource to be used by whom for how much time. All
the decisions are taken by the Operating System.
5. Accounting: The Operating System tracks an account of all the functionalities
taking place in the computer system at a time. All the details such as the types of
errors that occurred are recorded by the Operating System.
6. Information and Resource Protection: The Operating System is responsible for
using all the information and resources available on the machine in the most
protected way. The Operating System must foil an attempt from any external
resource to hamper any sort of data or information.
Q5.WITH A NEAT DIAGRAM EXPLAIN DUEL MODE OPERATION AND
TRANSITION OF OS FROM USER TO KERNEL MODE.
An error in one program can adversely affect many processes, it might modify data
of another program, or also can affect the operating system. For example, if a
process stuck in the infinite loop then this infinite loop could affect the correct
operation of other processes. So to ensure the proper execution of the operating
system, there are two modes of operation:
User mode –
When the computer system is run by user applications like creating a text document
or using any application program, then the system is in user mode. When the user
application requests for a service from the operating system or an interrupt occurs
or system call, then there will be a transition from user to kernel mode to fulfill the
requests.
Note: To switch from kernel mode to user mode, the mode bit should be 1.
Given below image describes what happen when an interrupt occurs:
Kernel Mode –
When the system boots, hardware starts in kernel mode and when the operating
system is loaded, it starts user application in user mode. To provide protection to the
hardware, we have privileged instructions which execute only in kernel mode. If the
user attempts to run privileged instruction in user mode then it will treat instruction
as illegal and traps to OS. Some of the privileged instructions are:
1. Handling Interrupts
2. To switch from user mode to kernel mode.
3. Input-Output management.
Note: To switch from user mode to kernel mode bit should be 0.
WEB COMPUTING
load balancers Use of operating systems like Windows 95, client-side, have evolved into
Linux and Windows XP,which can be clients and servers
Q7 DEFINE SYSTEM CALLS, EXPLAIN DIFFERENT TYPES OF SYSTEM CALLS
WITH ONE EXAMPLE
A system call is a mechanism that provides the interface between a process and the operating
system. It is a programmatic method in which a computer program requests a service from
the kernel of the OS.
System call offers the services of the operating system to the user programs via API
(Application Programming Interface). System calls are the only entry points for the kernel
system.
In an interactive system, this type of program execution requires some system calls by OS.
A. Simple Structure
It is the simplest Operating System Structure and is not well defined; It can only be used for
small and limited systems. In this structure, the interfaces and levels of functionality are well
separated; hence programs can access I/O routines which can cause unauthorized access to
I/O routines.
B. Monolithic Structure
The Monolithic operating System in which the kernel acts as a manager by managing all
things like file management, memory management, device management, and operational
processes of the Operating System.
The kernel is the heart of a computer operating system (OS). Kernel delivers basic services
to all other elements of the System. It serves as the primary interface between the Operating
System and the hardware.
In monolithic systems, kernels can directly access all the resources of the operating System
like physical hardware, exp Keyboard, Mouse etc.
C. Layered Approach
In this type of structure, OS is divided into layers or levels. The hardware is on the bottom
layer (layer 0), while the user interface is on the top layer (layer N). These layers are arranged
in a hierarchical way in which the top-level layers use the functionalities of their lower-level
levels.
In this approach, functionalities of each layer are isolated, and abstraction is also available. In
layered structure, debugging is easier as it is a hierarchical model, so all lower-level layered
is debugged, and then the upper layer is checked. So all the lower layers are already checked,
and the current layer is to be checked only.
Q9. DEFINE VIRTAUL MACHINE. EXPLAIN IN DETAIL
Booting the system is done by loading the kernel into main memory, and
starting its execution.
The CPU is given a reset event, and the instruction register is loaded with
a predefined memory location, where execution starts.
The initial bootstrap program is found in the BIOS read-only memory.
This program can run diagnostics, initialize all components of the
system, loads and starts the Operating System loader. (Called boot
strapping)
The loader program loads and starts the operating system.
When the Operating system starts, it sets up needed data structures in
memory, sets several registers in the CPU, and then creates and starts the
first user level program. From this point, the operating system only runs
in response to interrupts. See CPU Response to Interrupts.