Академический Документы
Профессиональный Документы
Культура Документы
Functions:-
OS has different modules, libraries that helps to build an interface that brings the
user closer to the system
Physical memory is the actual real memory used in RAM. Virtual memory as the
name suggests is not real. The OS uses virtual memory as a memory management
technique in which non-contiguous memory is presented to software as contiguous
memory. If the RAM falls short of memory to accommodate more running
processes, the OS allocates a portion of your hard drive to act as though it were
RAM. That's what is referred to as virtual memory.
5.What is the difference between socket and pipe?
A socket is a part of the OSI model that enables communication between different
layers. Pipes are used in processing in the CPU. Communication in socket is bi
directional while it’s unidirectional in pipes. Pipes increase productivity By
processing multiple processes simultaneously.
7.What is multiprogramming?
8.What is Multiprocessing?
In multiprocessing, one or more programs are run by more than one processors.
The kernel is the essential center of a computer operating system, the core that
provides basic services for all other parts of the operating system.
Time Sharing: in this operating system OS assigns some time slots to each job.
Here each job is executed according to the alloted time slots.
Job1: 0 to 5
Job2: 5 to 10
Job3: 10 to 15
CPU1: Job1
CPU2: Job2
CPU3: Job3
A binary semaphore is one, which takes only 0 and 1 as values. They are used to
implement mutual exclusion and synchronize concurrent processes.
1. Mutual Exclusion: Only one process may use a critical resource at a time.
2. Hold & Wait: A process may be allocated some resources while waiting for
others.
3. No Pre-emption: No resource can be forcible removed from a process
holding it.
4. Circular Wait: A closed chain of processes exist such that each process
holds at least one resource needed by another process in the chain.
Long term scheduler determines which programs are admitted to the system for
processing. It controls the degree of multiprogramming. Once admitted, a job
becomes a process.
Medium term scheduling is part of the swapping function. This relates to
processes that are in a blocked or suspended state. They are swapped out of real-
memory until they are ready to execute. The swapping-in decision is based on
memory-management criteria.
Short term scheduler, also know as a dispatcher executes most frequently, and
makes the finest-grained decision of which process should execute next. This
scheduler is invoked whenever an event occurs. It may lead to interruption of one
process by preemption.
Turnaround time is the interval between the submission of a job and its
completion. Response time is the interval between submission of a request, and the
first response to that request.
Resident set is that portion of the process image that is actually in real-memory at a
particular instant. Working set is that subset of resident set that is actually needed
for execution. (Relate this to the variable-window size method for swapping
techniques.)
The set of dispatch able processes is in a safe state if there exists at least one
temporal order in which all processes can be run to completion without resulting in
a deadlock.
20. Define latency, transfer and seek time with respect to disk I/O.
Seek time is the time required to move the disk arm to the required track.
Rotational delay or latency is the time it takes for the beginning of the required
sector to reach the head. Sum of seek time (if any) and latency is the access time.
Time taken to actually transfer a span of data is transfer time.
21.What is time-stamping?
22. How are the wait/signal operations for monitor different from those for
semaphores?
If a process in a monitor signal and no task is waiting on the condition variable, the
signal is lost. So this allows easier program design. Whereas in semaphores, every
operation affects the value of the semaphore, so the wait and signal operations
should be perfectly balanced in the program.
For load-time dynamic linking: Load module to be loaded is read into memory.
Any reference to a target external module causes that module to be loaded and the
references are updated to a relative address from the start base address of the
application module.
With run-time dynamic loading: Some of the linking is postponed until actual
reference during execution. Then the correct module is loaded and linked.
With demand paging, a page is brought into memory only when a location on that
page is actually referenced during execution. With pre-paging, pages other than the
one demanded by a page fault are brought in. The selection of such pages is done
based on common access patterns, especially for secondary memory devices.
Yes.
29. What are the four layers that Windows NT have in order to achieve
independence?
When the OS at the explicit request of another process creates a process, this action
is called process spawning.
1. Normal completion
2. Time limit exceeded
3. Memory unavailable
4. Bounds violation
5. Protection error
6. Arithmetic error
7. Time overrun
8. I/O failure
9. Invalid instruction
10.Privileged instruction
11.Data misuse
12.Operator or OS intervention
13.Parent termination.
1. swapping
2. interactive user request
3. timing
4. parent process request
It is the transfer of sufficient amount of the state of process from one machine to
the target machine.
Memory management
The kernel has full access to the system's memory and must allow processes
to access safely this memory as they require it.
Device management
To perform useful functions, processes need access to the peripherals
connected to the computer, which are controlled by the kernel through
device drivers
System calls
To actually perform useful work, a process must be able to access the
services provided by the kernel.
Monolithic kernels
Every part which is to be accessed by most programs which cannot be put in
a library is in the kernel space:
Device drivers
Scheduler
Memory handling
File systems
Network stacks
Microkernls
In Microkernels, parts which really require to be in a privileged mode are in
kernel space:
-Inter-Process Communication,
-Basic scheduling
-Basic memory handling
-Basic I/O primitives
A command interpreter is a program which reads the instructions given by the user.
It then translates these instructions into the context of the operating system
followed by the execution. Command interpreter is also known as ‘shell’
Answer
A connection used to transfer data between separate processes, usually on separate
computers.
Its a pipe that an application opens by name in order to write data into or read data
from the pipe.
They are placed in the /dev directory and are treated as special files.
Using a named pipe facilitates interprocess communications.
Answer
Tasks are usually assigned with priorities. At times it is necessary to run a certain
task that has a higher priority before another task although it is running. Therefore,
the running task is interrupted for some time and resumed later when the priority
task has finished its execution. This is called preemptive scheduling.
42.What is a semaphore?
Answer
A semaphore is a variable. There are 2 types of semaphores:
Binary semaphores
Counting semaphores
Binary semaphores have 2 methods associated with it. (up, down / lock, unlock)
Binary semaphores can take only 2 values (0/1). They are used to acquire locks.
When a resource is available, the process in charge set the semaphore to 1 else 0.
Counting Semaphore may have value to be greater than one, typically used to
allocate resources from a pool of identical resources.
Answer
The types of memory in a computer system are:
When two or more processes wait for a resource to be freed which is controlled by
another process, a deadlock situation occurs. It usually occurs in a multiprocessing
environment. Example, one client application needs access to a table to acquire a
lock which is held by another client application that in turn may attempt to obtain
the lock that is held by the first application.
Real time systems respond to inputs immediately. For example a mobile phone
sends an email as soon as a phone call is made. They are called as real time
because they behave and respond as though in real life.
Job scheduling schedules or decides which process will get to acquire the resource
based on some parameters.
Shortest job First- The time taken to complete the job of all processes is computed
and the shortest length process is executed first.
Round Robin- Each process gets a time “share” for running and is later prevented
to get the next process running.
Priority scheduling- here, the process on highest priority gets the resource
A loader loads the programs into the main memory from the storage device. The
OS transparently calls the loader when needed.
When the page (data) requested by a program is not available in the memory, it is
called as a page fault. This usually results in the application being shut down
51.Define Thread.
A thread is the smallest unit of execution. A single operating system can have
multiple threads running thereby creating a multithreading environment. Each
thread has a priority based on which the process is executed.