1. In multiprocessor systems, failure of one processor will not halt the system, but only slow it down
    by sharing the work of failure system by other systems. This ability to continue providing service is
    proportional to the surviving hardware is called graceful degradation

2. The invocation of an operating system routine. Operating systems contain sets of routines for performing various low-
level operations. For example, all operating systems have a routine for creating a directory. If you want to execute an
operating system routine from a program, you must make a system call.
                                      OR
System calls are required to access services of OS for user level processes.
3. Solution to critical section problem must satisfy these three requirements:
1. mutual exclusion - only one process in its critical section at a time
2. progress - waiting processes must be permitted to enter critical sections if no other process is in its
critical section
3. bounded waiting - there must be a limit to how long a process is delayed waiting for entry into its critical
section
    1. mutual exclusion
       The resources involved must be unshareable; otherwise, the processes would not be
       prevented from using the resource when necessary.
    2. hold and wait or partial allocation
       The processes must hold the resources they have already been allocated while waiting for
       other (requested) resources. If the process had to release its resources when a new resource
       or resources were requested, deadlock could not occur because the process would not
       prevent others from using resources that it controlled.
    3. no pre-emption
       The processes must not have resources taken away while that resource is being used.
       Otherwise, deadlock could not occur since the operating system could simply take enough
       resources from running processes to enable any process to finish.
    4. resource waiting or circular wait
       A circular chain of processes, with each process holding resources which are currently
       being requested by the next process in the chain, cannot exist. If it does, the cycle theorem
       (which states that "a cycle in the resource graph is necessary for deadlock to occur")
       indicated that deadlock could occur.

         Q5. Paging is a memory management technique in which the memory is divided into fixed size pages. Paging
         is used for faster access to data. When a program needs a page, it is available in the main memory as the OS
         copies a certain number of pages from your storage device to main memory. Paging allows the physical
         address space of a process to be noncontiguous.

         H. Thrashing is caused by under allocation of the minimum number of pages required
         by a process, forcing it to continuously page fault. The system can detect thrashing by
         evaluating the level of CPU utilization as compared to the level of multiprogramming. It
         can be eliminated by reducing the level of multiprogramming

         I.A kernel is a central component of an operating system. It acts as an interface between the user
         applications and the hardware. The sole aim of the kernel is to manage the communication
         between the software (user level applications) and the hardware (CPU, disk memory etc

J.Swap-space management is essential just because of two reasons. First and foremost this kind of system needs
more memory in comparison with physical availability. It swaps out less used pages while giving memory to the other
current application. It requires the memory very currently. The second reason is in a large number of the pages that
are used through an application. At the time of its start up process a phase can be used for initializing and then to use.
This kind of system can swap such pages with free memory for every application for the disk cache
1.what is semaphore and its uses?
     Ans. A semaphore is hardware or a software tag variable whose value indicates the status of a common
     resource. Its purpose is to lock the resource being used. A process which needs the resource will check the
     semaphore for determining the status of the resource followed by the decision for proceeding. In multitasking
     operating systems, the activities are synchronized by using the semaphore techniques.

      2.what is thread why is it used?
1.   Ans. A thread is a single sequence stream within in a process. Because threads have some of the
     properties of processes, they are sometimes called lightweight processes. In a process, threads
     allow multiple executions of streams. In many respect, threads are popular way to improve
     application through parallelism. The CPU switches rapidly back and forth among the threads giving
     illusion that the threads are running in parallel. Like a traditional process i.e., process with one
     thread, a thread can be in any of several states (Running, Blocked, Ready or Terminated). Each
     thread has its own stack. Since thread will generally call different procedures and thus a different
     execution history. This is why thread needs its own stack. An operating system that has thread
     facility, the basic unit of CPU utilization is a thread. A thread has or consists of a program counter
     (PC), a register set, and a stack space. Threads are not independent of one other like processes as a
     result threads shares with other threads their code section, data section, OS resources also known
     as task, such as open files and signals.
2. A process with multiple threads make a great server for example printer server.
3. Because threads can share common data, they do not need to use interprocess
   communication. 4.Because of the very nature, threads can take advantage of
   multiprocessors.
4.
5. 3.diff.bet.paging and segmentation?
Ans.Paging – Computer memory is divided into small partitions that are all the same size and referred
to as, page frames. Then when a process is loaded it gets divided into pages which are the same size as
those previous frames. The process pages are then loaded into the frames.

Segmentation – Computer memory is allocated in various sizes (segments) depending on the need for
address space by the process. These segments may be individually protected or shared between
processes. Commonly you will see what are called “Segmentation Faults” in programs, this is because
the data that’s is about to be read or written is outside the permitted address space of that process.
So now we can distinguish the differences and look at a comparison between the two:
Paging:
Transparent to programmer (system allocates memory)
No separate protection
No separate compiling
No shared code
Segmentation:
Involves programmer (allocates memory to specific function inside code)
Separate compiling
Separate protection
Share code
     4.diff. bet.external and internal fragramatation?
     External Fragmentation: External Fragmentation happens when a dynamic memory allocation
     algorithm allocates some memory and a small piece is left over that cannot be effectively used. If
     too much external fragmentation occurs, the amount of usable memory is drastically reduced.
     Total memory space exists to satisfy a request, but it is not contiguous.

     Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory
     blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be
     slightly larger than requested memory; this size difference is memory internal to a partition, but
     not being used
5.diff.bet. logical and physical file sysrem?

         Physical file (PF) contains the data and have only one record format. Logical file (LF) is a view of
         the physical file which does not contain any data may be based on one physical file or more then
         one physical file. Logical file can have more then one record format. Logical can be non join or join
         logical file. Performance becomes better if you use the logical file in the program.

6 . A program is a set of instructions that are to perform a designated task, where as the process is an operation which
takes the given instructions and perform the manipulations as per the code, called ‘execution of instructions’. A process
is entirely dependent of a ‘program’.

- A process is a module that executes modules concurrently. They are separate loadable modules. Where as the
program perform the tasks directly relating to an operation of a user like word processing, executing presentation
software etc.

         7.belady’s anomaly?

Ans. It is also called FIFO anomaly. Usually, on increasing
the
number of frames allocated to a process' virtual memory,
the process execution is faster, because fewer page faults
occur. Sometimes, the reverse happens, i.e., the execution
time increases even when more frames are allocated to the
process. This is Belady's Anomaly. This is true for
certain
page reference patterns
         8.semaphore?
         Ans.Semaphores are devices used to help with synchronization. If multiple processes share a
         common resource, they need a way to be able to use that resource without disrupting each other.
         You want each process to be able to read from and write to that resource uninterrupted.

         A semaphore will either allow or disallow access to the resource, depending on how it is set up.
         One example setup would be a semaphore which allowed any number of processes to read from
         the resource, but only one could ever be in the process of writing to that resource at a time
         9.thrasing?
         Ans.

When referring to a computer, thrashing or disk thrashing is a term used to describe when the
hard drive is being overworked by moving information between the system memory and virtual
memory excessively. Thrashing is often caused when the system does not have enough memory,
the system swap file is not properly configured, or too much is running on the computer and it has
low system resources.

When thrashing occurs, a user will notice the computer hard drive always working and a decrease
in system performance. Thrashing is bad on a hard drive because of the amount of work the hard
drive has to do and if is left unfixed will likely cause an early failure of the hard drive.

To resolve hard drive thrashing, a user can do any of the below.

    1. Increase the amount of RAM in the computer.
    2. Decrease the amount of programs being run on the computer.
    3. Adjust the size of the swap file.
Os

More Related Content

PDF
Operating Systems - memory management
PDF
PDF
Sucet os module_4_notes
PDF
os mod1 notes
PPTX
Overview of Distributed Systems
DOCX
Operating system introduction
PPTX
previous question solve of operating system.
Operating Systems - memory management
Sucet os module_4_notes
os mod1 notes
Overview of Distributed Systems
Operating system introduction
previous question solve of operating system.

What's hot (17)

PPT
Chapter 2 part 1
PDF
Sucet os module_5_notes
PDF
Memory Management
PPT
Memory Management in OS
DOCX
Os solved question paper
PPTX
Operating system interview question
DOCX
Memory managment
PDF
Cs8493 unit 3
DOCX
Complete Operating System notes
DOCX
operating system question bank
PDF
Operating Systems 1 (9/12) - Memory Management Concepts
PDF
VIEW OF MEMORY ALLOCATION AND MANAGEMENT IN COMPUTER SYSTEMS
PPT
Chapter 2 (Part 2)
PPTX
Paging +Algorithem+Segmentation+memory management
PPT
Chapter 1 - Introduction
PPTX
Operating system
PPTX
Os unit 3
Chapter 2 part 1
Sucet os module_5_notes
Memory Management
Memory Management in OS
Os solved question paper
Operating system interview question
Memory managment
Cs8493 unit 3
Complete Operating System notes
operating system question bank
Operating Systems 1 (9/12) - Memory Management Concepts
VIEW OF MEMORY ALLOCATION AND MANAGEMENT IN COMPUTER SYSTEMS
Chapter 2 (Part 2)
Paging +Algorithem+Segmentation+memory management
Chapter 1 - Introduction
Operating system
Os unit 3
Ad

Viewers also liked (12)

PDF
LINEE GUIDA PER IL DISASTER RECOVERY
DOCX
Wilm
PPTX
Share2B - Accelerate Your Business
PPTX
Seminario 3
PDF
Uverenje o stručnoj osposobljenosti zavarivača
DOCX
What are the reasons moises gonzalez
PDF
S.o.t.b. issue 01
PPTX
Uticaj debljine šava i geometrije konture šava na promenu naponskog stanja
PDF
Fabricka postrojenja i tehnicka logistika kolokvijum #1
PPTX
Iwo jima battle
PPTX
Foreign Investment
LINEE GUIDA PER IL DISASTER RECOVERY
Wilm
Share2B - Accelerate Your Business
Seminario 3
Uverenje o stručnoj osposobljenosti zavarivača
What are the reasons moises gonzalez
S.o.t.b. issue 01
Uticaj debljine šava i geometrije konture šava na promenu naponskog stanja
Fabricka postrojenja i tehnicka logistika kolokvijum #1
Iwo jima battle
Foreign Investment
Ad

Similar to Os (20)

DOCX
Operating system
PPTX
Difference Program vs Process vs Thread
PDF
Operating system (OS) itself is a process, what approaches are there.pdf
PPTX
Os unit 2
PPTX
Memory Managementgggffffffffffgggggggggg
DOCX
Opetating System Memory management
PPTX
Operating system
PPTX
UNIT-2 OS.pptx
PPT
OPERATING SYSTEM BY DR .MUGABO MG MKAMA
PPT
Memory management
DOC
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
DOCX
Memory management
DOC
Introduction to Operating System (Important Notes)
PPTX
Memory management Assignment Help
PPT
operating system for computer engineering ch3.ppt
PDF
OS ppt.pdf
PPTX
unit5_os (1).pptx
PPT
Basics of Operating System
PPTX
Operating system
Difference Program vs Process vs Thread
Operating system (OS) itself is a process, what approaches are there.pdf
Os unit 2
Memory Managementgggffffffffffgggggggggg
Opetating System Memory management
Operating system
UNIT-2 OS.pptx
OPERATING SYSTEM BY DR .MUGABO MG MKAMA
Memory management
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
Memory management
Introduction to Operating System (Important Notes)
Memory management Assignment Help
operating system for computer engineering ch3.ppt
OS ppt.pdf
unit5_os (1).pptx
Basics of Operating System

Os

  • 1. 1. In multiprocessor systems, failure of one processor will not halt the system, but only slow it down by sharing the work of failure system by other systems. This ability to continue providing service is proportional to the surviving hardware is called graceful degradation 2. The invocation of an operating system routine. Operating systems contain sets of routines for performing various low- level operations. For example, all operating systems have a routine for creating a directory. If you want to execute an operating system routine from a program, you must make a system call. OR System calls are required to access services of OS for user level processes. 3. Solution to critical section problem must satisfy these three requirements: 1. mutual exclusion - only one process in its critical section at a time 2. progress - waiting processes must be permitted to enter critical sections if no other process is in its critical section 3. bounded waiting - there must be a limit to how long a process is delayed waiting for entry into its critical section 1. mutual exclusion The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary. 2. hold and wait or partial allocation The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled. 3. no pre-emption The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish. 4. resource waiting or circular wait A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that "a cycle in the resource graph is necessary for deadlock to occur") indicated that deadlock could occur. Q5. Paging is a memory management technique in which the memory is divided into fixed size pages. Paging is used for faster access to data. When a program needs a page, it is available in the main memory as the OS copies a certain number of pages from your storage device to main memory. Paging allows the physical address space of a process to be noncontiguous. H. Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming I.A kernel is a central component of an operating system. It acts as an interface between the user applications and the hardware. The sole aim of the kernel is to manage the communication between the software (user level applications) and the hardware (CPU, disk memory etc J.Swap-space management is essential just because of two reasons. First and foremost this kind of system needs more memory in comparison with physical availability. It swaps out less used pages while giving memory to the other current application. It requires the memory very currently. The second reason is in a large number of the pages that are used through an application. At the time of its start up process a phase can be used for initializing and then to use. This kind of system can swap such pages with free memory for every application for the disk cache
  • 2. 1.what is semaphore and its uses? Ans. A semaphore is hardware or a software tag variable whose value indicates the status of a common resource. Its purpose is to lock the resource being used. A process which needs the resource will check the semaphore for determining the status of the resource followed by the decision for proceeding. In multitasking operating systems, the activities are synchronized by using the semaphore techniques. 2.what is thread why is it used? 1. Ans. A thread is a single sequence stream within in a process. Because threads have some of the properties of processes, they are sometimes called lightweight processes. In a process, threads allow multiple executions of streams. In many respect, threads are popular way to improve application through parallelism. The CPU switches rapidly back and forth among the threads giving illusion that the threads are running in parallel. Like a traditional process i.e., process with one thread, a thread can be in any of several states (Running, Blocked, Ready or Terminated). Each thread has its own stack. Since thread will generally call different procedures and thus a different execution history. This is why thread needs its own stack. An operating system that has thread facility, the basic unit of CPU utilization is a thread. A thread has or consists of a program counter (PC), a register set, and a stack space. Threads are not independent of one other like processes as a result threads shares with other threads their code section, data section, OS resources also known as task, such as open files and signals. 2. A process with multiple threads make a great server for example printer server. 3. Because threads can share common data, they do not need to use interprocess communication. 4.Because of the very nature, threads can take advantage of multiprocessors. 4. 5. 3.diff.bet.paging and segmentation? Ans.Paging – Computer memory is divided into small partitions that are all the same size and referred to as, page frames. Then when a process is loaded it gets divided into pages which are the same size as those previous frames. The process pages are then loaded into the frames. Segmentation – Computer memory is allocated in various sizes (segments) depending on the need for address space by the process. These segments may be individually protected or shared between processes. Commonly you will see what are called “Segmentation Faults” in programs, this is because the data that’s is about to be read or written is outside the permitted address space of that process. So now we can distinguish the differences and look at a comparison between the two: Paging: Transparent to programmer (system allocates memory) No separate protection No separate compiling No shared code Segmentation: Involves programmer (allocates memory to specific function inside code) Separate compiling Separate protection Share code 4.diff. bet.external and internal fragramatation? External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used
  • 3. 5.diff.bet. logical and physical file sysrem? Physical file (PF) contains the data and have only one record format. Logical file (LF) is a view of the physical file which does not contain any data may be based on one physical file or more then one physical file. Logical file can have more then one record format. Logical can be non join or join logical file. Performance becomes better if you use the logical file in the program. 6 . A program is a set of instructions that are to perform a designated task, where as the process is an operation which takes the given instructions and perform the manipulations as per the code, called ‘execution of instructions’. A process is entirely dependent of a ‘program’. - A process is a module that executes modules concurrently. They are separate loadable modules. Where as the program perform the tasks directly relating to an operation of a user like word processing, executing presentation software etc. 7.belady’s anomaly? Ans. It is also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns 8.semaphore? Ans.Semaphores are devices used to help with synchronization. If multiple processes share a common resource, they need a way to be able to use that resource without disrupting each other. You want each process to be able to read from and write to that resource uninterrupted. A semaphore will either allow or disallow access to the resource, depending on how it is set up. One example setup would be a semaphore which allowed any number of processes to read from the resource, but only one could ever be in the process of writing to that resource at a time 9.thrasing? Ans. When referring to a computer, thrashing or disk thrashing is a term used to describe when the hard drive is being overworked by moving information between the system memory and virtual memory excessively. Thrashing is often caused when the system does not have enough memory, the system swap file is not properly configured, or too much is running on the computer and it has low system resources. When thrashing occurs, a user will notice the computer hard drive always working and a decrease in system performance. Thrashing is bad on a hard drive because of the amount of work the hard drive has to do and if is left unfixed will likely cause an early failure of the hard drive. To resolve hard drive thrashing, a user can do any of the below. 1. Increase the amount of RAM in the computer. 2. Decrease the amount of programs being run on the computer. 3. Adjust the size of the swap file.