Sr. No. Network Operating System Distributed Operating System
Sr. No. Network Operating System Distributed Operating System
Sr. No. Network Operating System Distributed Operating System
Answer: If C.P.U and I/O devices are nearly same at speed, the buffering
helps in making the C.P.U and the I/O devices work at full speed in such a
way that C.P.U and the I/O devices never sit idle at any moment.
Normally the C.P.U is much faster than an input device. In this case the C.P.U
always faces an empty input buffer and sits idle waiting for the input device
which is to read a record into the buffer.For output, the C.P.U continues to
work at full speed till the output buffer is full and then it starts waiting.
Thus buffering proves useful for those jobs that have a balance between
computational work and I/O operations. In other cases, buffering scheme
may not work well.
Question: What inconveniences that a user can face while interacting with a
computer system, which is without an operating system?
What are the differences between Batch processing system and Real Time
Processing System?
Answer: Following are the differences between Batch processing system and
Real Time Processing System.
I/O operations
Communication
Error Detection
Resource Allocation
Protection
Program execution
Operating systems handle many kinds of activities from user programs to
system programs like printer spooler, name servers, file server, etc. Each of
these activities is encapsulated as a process.
I/O Operation
An I/O subsystem comprises of I/O devices and their corresponding driver
software. Drivers hide the peculiarities of specific hardware devices from the
users.
I/O operation means read or write operation with any file or any specific I/O
device.
Operating system provides the access to the required I/O device when required.
File system manipulation
A file represents a collection of related information. Computers can store files
on the disk (secondary storage), for long-term storage purpose. Examples of
storage media include magnetic tape, magnetic disk and optical disk drives
like CD, DVD. Each of these media has its own properties like speed, capacity,
data transfer rate and data access methods.
A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directions. Following are
the major activities of an operating system with respect to file management
−
The operating system gives the permission to the program for operation on file.
Communication
In case of distributed systems which are a collection of processors that do
not share memory, peripheral devices, or a clock, the operating system
manages communications between all the processes. Multiple processes
communicate with one another through communication lines in the network.
Both the processes can be on one computer or on different computers, but are
connected through a computer network.
Error handling
Errors can occur anytime and anywhere. An error may occur in CPU, in I/O
devices or in the memory hardware. Following are the major activities of an
operating system with respect to error handling −
Resource Management
In case of multi-user or multi-tasking environment, resources such as main
memory, CPU cycles and files storage are to be allocated to each user or job.
Following are the major activities of an operating system with respect to
resource management −
Protection
Considering a computer system having multiple users and concurrent
execution of multiple processes, the various processes must be protected
from each other's activities.
The OS ensures that external I/O devices are protected from invalid access
attempts.
i) high-level abstractions
why?
- more friendly to programmers
- provides common core for all applications
- hides details of hardware to make application code portable
The operating system needs to verify that the memory being written to / read from
is a valid address, owned by the process making the request. It must prevent
processes from corrupting other processes, or reading memory owned by other
processes.
The operating system much take care with inputs from memory as:
a) The address given by the application as the address of the input or output could
be
- an address of an illegal area of memory
- an address of a legal area that is paged to disk
Basically, the operating system must ensure that it cannot be corrupted, crashed, or
bypassed as a result of accessing memory as directed by the application.
3.3 Enumerate the advantages and disadvantages of supporting multi-threaded
applications with kernel-level threads.
Enumerate eh?
Advantages
Disadvantages
1. the user program must use locks and mutexes appropriately around critical
sections, since it cannot control when context switching will occur (...but so
what)
2. code is less portable since this requires operating system support
3. cannot choose the scheduling algorithm
4. Thread management (create, delete, ect) is more expensive as it now requires
system calls.
1 Process control Create process, terminate process,end,allocate and free memory etc
2 File manipulation Create file, delete file, open file, close file, read, write.
3 Device manipulation request device, release device, read, write, reposition, get device
attributes, set device attributes etc.
When a user first turn on or booted the computer, it needs some initial program to run. This
initial program is known as Bootstrap Program. It is stored in read-only memory (ROM) or
electrically erasable programmable read-only memory (EEPROM). Bootstrap program locates
the kernel and loads it into main memory and starts its execution.
Some of the popular Operating Systems are DOS, Windows, Ubuntu, Solaris etc.
- Kernel is the part of OS which handles all details of sharing resources and device handling.
- It can be considered as the core of OS which manages the core features of an OS.
- Its purpose is to handle the communication between software and hardware
- Its services are used through system calls.
- A layer of software called shell wraps around the Kernel.
- Process management
- Device management
- Memory management
- Interrupt handling
- I/O communication
- File system management
5.2
a. Monolithic Kernels - In this architecture of kernel, all the system services were packaged into a single system
module which lead to poor maintainability and huge size of kernel.
b. Microkernels - They follow the modular approach of architecture. Maintainability became easier with this
model as only the concerned module is to be altered and loaded for every function. This model also keeps a tab
on the ever growing code size of the kernel.
Following are the main disadvantages of Microkernels. Usually these disadvantages are situation based.
Synchronization means controlling access to a resource that is available to two or more threads or process.
Different synchronization mechanisms are:
- Mutex
- Semaphores
- Monitors
- Condition variables
- Critical regions
- Read/ Write locks
- This memory consists of a set of high-speed registers. They work as temporary storage for instructions and
data.
6.4 What are the basic functions of file management in OS?
- The operating system these days are interrupt driven and this requires the interrupt vector.
- This interrupt vector contains the addresses of the interrupt service routines for various devices.
- Here the interrupts can be indirectly called through the table with no intermediate routine needed.
- This leads to interrupt handling at a faster rate.
- Operating systems like MS DOS and UNIX are using the interrupt vector.
- User mode and monitor mode are distinguished by a bit called the mode bit.
- User mode uses bit 1 and monitor mode uses bit 0.
- At the boot time hardware starts with the monitor mode.
- Also, at the time of interrupt user mode is shifted to the transfer mode.
- System always switches to the user mode before passing control to the user program.
- Whenever system gains control of the computer it works in monitor mode otherwise in user mode.
8.2 The UNIX OS consists of two separable parts Systems programs The kernel Consists of everything below
the system-call interface and above the physical hardwareProvides the file system, CPU scheduling, memory
management, and other operating-system functions; a large number of functions for one levelLayered
Operating SystemLayered approach is used to break the OS into a number of layers (levels). The overall
functionality and features are determined and are separated into components. The bottom layer (layer 0) is the
hardware; the highest (layer N) is the user interface15