400+ Top Control Systems LAB VIVA Questions and Answers Pdf

Control Systems VIVA Questions and Answers :-

1.What is control system?
A system consists of a number of components connected together to perform a specific function. In a system when the output quantity is controlled by varying the input quantity then the system is called control system.

2.What are the two major types of control system?
The two major types of control system are open loop and closed loop.

3.Define open loop control system.
The control system in which the output quantity has no effect upon the input quantity are called open loop control system. This means that the output is not feedback to the input for correction.

4.Define closed loop control system.
The control system in which the output has an effect upon the input quantity so as to maintain the desired output value are called closed loop control system.

5.What are the components of feedback control system?
The components of feedback control system are plant, feedback path elements, errordetector and controller.

6.Define transfer function.
The T.F of a system is defined as the ratio of the laplace transform of output to laplace transform of input with zero initial conditions.

7.What are the basic elements used for modeling mechanical translational system?
Mass, spring and dashpot

8.What are the basic elements used for modeling mechanical rotational system?
Moment of inertia J, dashpot with rotational frictional coefficient B and torsional spring with stiffness K.

9.Name two types of electrical analogous for mechanical system.
The two types of analogies for the mechanical system are Force voltage and force current analogy.

10.What is block diagram?
A block diagram of a system is a pictorial representation of the functions performed by each component of the system and shows the flow of signals. The basic elements of block diagram are block, branch point and summing point.

11.What is the basis for framing the rules of block diagram reduction technique?
The rules for block diagram reduction technique are framed such that any modification made on the diagram does not alter the input output relation.

12.What is Servo motor?

13.What are the features does Servo Motors possess?

14.What is the difference between AC servomotor and two phase induction motors?

15.Compare AC servo motor and DC servo motors?

16.Some Applications where Servo motors are used?

17.What is Synchro?

18.What is Synchro pair?

19.What are the applications of Synchro pair?

20.What is Proportional Controller? Advantages and Disadvantages?

21.What is Integral Controller? Advantages and Disadvantages?

22.Why Derivative Controller is not used in isolation like Proportional and Integral?

23.For reducing Steady State error which type of controller is used?

24.What is Reset rate?

25.Which type of controller anticipates the error?

26.Explain the behaviour of the system when PID controller is used?

Control Systems VIVA Questions and Answers :-

1. What is the need for starters?
2. Which is the basic protective device in any circuit?
3. Name the material used for Fuse.
4. Why is fuse rated for amperes?
5. What are the protective devices incorporated in DC starters?
6. Why is the field rheostat of dc motor kept at minimum resistance position and that of generator in maximum resistance position?
7. Why is the armature rheostat of dc motor kept at maximum resistance position?
8. Write the emf equation of DC and AC machine.
9. Write the torque equation of DC motor.
10. Draw the torque-slip characteristics of 3 phase induction motor and explain.
11.Explain the mechanical characteristics of DC shunt motor using electrical characteristics and N/Ia characteristics.
12. How are the ammeters and voltmeters connected in any circuit?
13. What is the difference between MI and MC type instruments?
14. How are MI meters used for measuring both ac and dc quantities?
15. Name the different types of DC and AC starters.
16. What is back emf? Give its significance.
17. What is the difference between self excited and separately excited machines?
18. Name the types of self excited dc machine.
19. Give the applications of each type of dc motor and dc generator.
20. What are the losses in dc machine?
21. How is the eddy current loss minimized in dc machine?
22. Name the parts of dc machine.
23. What is the use of commutator and brushes?
24. Name the material used for armature and core of dc machine.
25. Why is armature resistance less than field resistance of dc shunt machine?
26. Why is armature resistance more than field resistance of dc series machine?
27. Why is series motor best suited for traction applications?
28. Why shouldn’t dc series motor started at no load?
29. Define transformer.
30. What is the secondary side frequency of transformer?
31. What are the various types of transformer?
32. What are the methods of speed control of dc motors?
33. What do you mean by transformation coefficient?
34. What is the difference between two winding transformer and auto transformer?
35. Why transformers and alternators are rated with kVA?
36. What is the operating power factor of dc machine?
37. What is meant by power factor? Explain.
38. What do you mean by complex power?
39. What will happen if dc supply is connected to transformer?’
40. What are the parts of transformer?
41.What is regulation with respect to i)transformer ii)alternator
42. Why are synchronous motors not self starting? What are the methods of starting?
43. Why are single phase induction motors not self starting? Classify them according to the
starting methods.
44. What are the types of alternators?
45. Why is regulation so important for transformers and alternators?
46. What are the parts of synchronous machine? Name the material used in various parts.
47. Why is synchronous motor referred as doubly excited machine?
48. What is the result of varying the excitation of synchronous motor?
49. What is slip of an induction motor?
50. Why is always the induction motor running with less than the speed of rotating magnetic field?
51. What is slip frequency?
52. What will happen when the slip is 100% and zero?
53. What are the types of 3 phase induction motors?
54. How is the starting torque improved in slip ring induction motor? Justify mathematically.
55. Why is 3 phase induction motor referred as rotating transformer with short-circuited secondary?
56. What is the use of end rings in squirrel cage induction motor?
57. Why transformers have highest efficiency than any other electrical machine?
58. What is mutual inductance?
59.What is the principle of motor, generator and transformer?
60. How will you find the direction of induced emf in generator and the direction of motion of the conductor in motor?
61.How will you reverse the direction of rotation of i) dc motor ii) ac motor?
62. What is the difference between rheostat and potentiometer?
63. What is L, F, A, N in dc starters?
64. What is M, L, C, and V in wattmeter?
65. What is LPF, UPF and ZPF?
66. What is E and C in autotransformer?
67. What do you mean by power frequency?
68. What are the advantages and disadvantages of autotransformer?
69. What are the disadvantages of low power factor?
70. What are the methods of speed control of ac motors?
71.Why are electrical loads used for generators and motors whereas mechanical loads for motors?
72. What do you mean by stray losses in dc machine?
73. Given transformers A and B with following details:
A: η= 96% & reg: 5.8%
B: η= 94% & reg: 5.2%
Which transformer will you select? Justify your answer.
74.Given 4 terminals without indication. How will you manage to find the field and armature terminals of i) dc shunt machine ii) dc series machine.
75. What is the advantage of equivalent circuit?
76. What is meant by magnetizing current and working component of current with respect to transformer?
77. Give the relation between line and phase values of i) star connected network ii) delta connected network.
78.When can the squirrel cage machine be loaded to its fullest capacity? i) Star connection of stator ii) delta connection of stator.
79. How can the hysteresis loss of any machine be minimized?
80.What are the methods of electrical braking?

400+ TOP MOST CSE LAB VIVA Interview Questions And Answers

Below are the list of all CSE Lab Viva Questions and Answers for Computer science students.also we can provide 2 mark important objective type books & Interview questions

CSE Lab Viva Questions with Answers :-

  1. C LANGUAGE
  2. JAVA
  3. DATA STRUCTURE
  4. CAO
  5. OOPS
  6. DBMS
  7. SYSTEM SOFTWARE
  8. COMPILER DESIGN 
  9. COMPUTER NETWORKS
  10. UML& DESIGN
  11. OPERATING SYSTEMS
  12. OPEN SOURCE
  13. DIGITAL LOGIC DESIGN
  14. MOBILE APPLICATION
  15. Web Technology
  16. C++
  17. System Programming
  18. Computer Forensics

Hello Computer Science ENGINEERING students, We provide Basic CSE Lab Viva questions and answers with explanation & CSE objective type questions mcqs books pdf free download here. these are very important & Helpful for campus placement test, semester exams, job interviews and competitive exams like GATE, IES, PSU, NET/SET/JRF, UPSC and diploma.

CSE LAB VIVA Questions And Answers
CSE LAB VIVA Questions

Especially we are prepare for the CSE freshers and Experienced Candidates, these model questions are asked in the online technical test, Quiz and interview of many companies.

These are also very important in your university exams like JNTU, Andhra,OU,Anna university,Pune,VTU,UPTU,CUSAT etc.
CSE VIVA Interview Questions

300+ TOP Mobile Application Development LAB VIVA Questions & Answers

MOBILE APPLICATION DEVELOPMENT LAB VIVA Questions :-

1. What is Android?
It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets. It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions.

2. What Is the Google Android SDK?
The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes.

3. What is the Android Architecture?
Android Architecture is made up of 4 key components:

  1. Linux Kernel
  2. Libraries
  3. Android Framework
  4. Android Applications

4. Describe the Android Framework.
The Android Framework is an important aspect of the Android Architecture. Here you can find all the classes and methods that developers would need in order to write applications on the Android environment.

5. What is AAPT?
AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.

6. What is the importance of having an emulator within the Android environment?
The emulator lets developers “play” around an interface that acts as if it were an actual mobile device. They can write and test codes, and even debug. Emulators are a safe place for testing codes especially if it is in the early design phase.

7. What is the use of an activityCreator?
An activity Creator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE.

8 . Describe Activities.
Activities are what you refer to as the window to a user interface. Just as you create windows in order to display output or to ask for an input in the form of dialog boxes, activities play the same role, though it may not always be in the form of a user interface.

9. What are Intents?
Intents displays notification messages to the user from within the Android enabled device. It can be used to alert the user of a particular state that occurred. Users can be made to respond to intents.

10. Differentiate Activities from Services.
Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.

11. What items are important in every Android project?
These are the essential items that are present each time an Android project is created:

  • Android Manifest.xml
  • build.xml
  • bin/
  • src/
  • res/
  • assets/

12. What is the importance of XML-based layouts?
The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.

13. What are containers?
Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.

14. What is Orientation?
Orientation, which can be set using set Orientation(), dictates if the Linear Layout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.

15. What is the importance of Android in the mobile market?
Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.

16. What do you think are some disadvantages of Android?
Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades.
–> One app that runs on this particular version of Android OS may or may not run on another version.
–> Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.

17. What is adb?
Adb is short for “Android Debug Bridge”. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.

18. What are the four essential states of an activity?

  1. Active – if the activity is at the foreground
  2. Paused – if the activity is at the background and still visible
  3. Stopped – if the activity is not visible and therefore is hidden or obscured by another activity
  4. Destroyed – when the activity process is killed or completed terminated

19. What is ANR?
ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.

20. Which elements can occur only once and must be present?
Among the different elements, the and elements must be present and can occur only once. The rest are optional, and can occur as many times as needed.

21. How are escape characters used as attribute?
Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’

22. What is the importance of settings permissions in app development?
Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.

23. What is the function of an intent filter?
Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.

24. Enumerate the three key loops when monitoring an activity?

  • Entire lifetime – activity happens between on Create and on Destroy
  • Visible lifetime – activity happens between on Start and on Stop
  • Foreground lifetime – activity happens between on Resume and on Pause

25. When is the on Stop(. method invoked?
A call to on Stop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.

Mobile Application (Android. VIVA Questions and Answers :-

26. Is there a case wherein other qualifiers in multiple resources take precedence over locale?
Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code. and MNC (mobile network code. qualifiers.

27. What are the different states wherein a process is based?
There are 4 possible states:

  1. foreground activity
  2. visible activity
  3. background activity
  4. empty process

28. How can the ANR be prevented?
One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.

29. What role does Dalvik play in Android development?
Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.

30. What is the Android Manifest.xml?
This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.

31. What is the proper way of setting up an Android-powered device for app development?
The following are steps to be followed prior to actual application development in an Android-powered device:

  • Declare your application as “debuggable” in your Android Manifest.
  • Turn on “USB Debugging” on your device.
  • Set up your system to detect your device.

32. Enumerate the steps in creating a bounded service through AIDL.
1. create the .aidl file, which defines the programming interface
2. implement the interface, which involves extending the inner abstract Stub class as well as implanting its methods.
3. expose the interface, which involves implementing the service to the clients.

33. What is the importance of Default Resources?
When default resources, which contain default strings and files, are not present, an error will occur and the app will not run. Resources are placed in specially named subdirectories under the project res/ directory.

34. When dealing with multiple resources, which one takes precedence?
Assuming that all of these multiple resources are able to match the configuration of a device, the ‘locale’ qualifier almost always takes the highest precedence over the others.

35. When does ANR occur?
The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within 5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.

36. What is AIDL?
AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.

37. What data types are supported by AIDL?
AIDL has support for the following data types:

  • string
  • charSequence
  • List
  • Map
  • all native Java data types like int,long, char and Boolean

38. What is a Fragment?
A fragment is a part or portion of an activity. It is modular in a sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.

39. What is a visible activity?
A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.

40. When is the best time to kill a foreground activity?
The foreground activity, being the most important among the other states, is only killed or terminated as a last resort, especially if it is already consuming too much memory. When a memory paging state has been reach by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.

41. Is it possible to use or add a fragment without using a user interface?
Yes, it is possible to do that, such as when you want to create a background behavior for a particular activity. You can do this by using add(Fragment,string. method to add a fragment from the activity.

42. How do you remove icons and widgets from the main screen of the Android device?
To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.

43. What are the core components under the Android application architecture?
There are 5 key components under the Android application architecture:

  1. services
  2. intent
  3. resource externalization
  4. notifications
  5. content providers

44. What composes a typical Android application project?
A project under Android development, upon compilation, becomes an .apk file. This apk file format is actually made up of the AndroidManifest.xml file, application code, resource files, and other related files.

45. What is a Sticky Intent?
A Sticky Intent is a broadcast from sendStickyBroadcast(. method such that the intent floats around even after the broadcast, allowing others to collect data from it.

46. Do all mobile phones support the latest Android operating system?
Some Android-powered phone allows you to upgrade to the higher Android operating system version. However, not all upgrades would allow you to get the latest version. It depends largely on the capability and specs of the phone, whether it can support the newer features available under the latest Android version.

47. What is portable wi-fi hotspot?
Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device. For example, using your Android-powered phone as a Wi-Fi Hotspot, you can use your laptop to connect to the Internet using that access point.

48. What is an action?
In Android development, an action is what the intent sender wants to do or expected to get as a response. Most application functionality is based on the intended action.

49. What is the difference between a regular bitmap and a nine-patch image?
In general, a Nine-patch image allows resizing that can be used as background or other image size requirements for the target device. The Nine-patch refers to the way you can resize the image: 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.

50. What language is supported by Android for application development?
The main language supported is Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.

MOBILE APPLICATION DEVELOPMENT LAB VIVA Questions and Answers pdf free download ::

400+ TOP Digital Logic Design VIVA Questions and Answers

Digital Logic Design VIVA Questions :-

1) Explain about setup time and hold time, what will happen if there is setup time and hold tine violation, how to overcome this?

  • Set up time is the amount of time before the clock edge that the input signal needs to be stable to guarantee it is accepted properly on the clock edge.
  • Hold time is the amount of time after the clock edge that same input signal has to be held before changing it to make sure it is sensed properly at the clock edge.
  • Whenever there are setup and hold time violations in any flip-flop, it enters a state where its output is unpredictable: this state is known as metastable state (quasi stable state); at the end of metastable state, the flip-flop settles down to either ‘1’ or ‘0’. This whole process is known as metastability

2) What is skew, what are problems associated with it and how to minimize it?

  • In circuit design, clock skew is a phenomenon in synchronous circuits in which the clock signal (sent from the clock circuit) arrives at different components at different times.
  • This is typically due to two causes. The first is a material flaw, which causes a signal to travel faster or slower than expected. The second is distance: if the signal has to travel the entire length of a circuit, it will likely (depending on the circuit’s size) arrive at different parts of the circuit at different times. Clock skew can cause harm in two ways. Suppose that a logic path travels through combinational logic from a source flip-flop to a destination flip-flop. If the destination flip-flop receives the clock tick later than the source flip-flop, and if the logic path delay is short enough, then the data signal might arrive at the destination flip-flop before the clock tick, destroying there the previous data that should have been clocked through. This is called a hold violation because the previous data is not held long enough at the destination flip-flop to be properly clocked through. If the destination flip-flop receives the clock tick earlier than the source flip-flop, then the data signal has that much less time to reach the destination flip-flop before the next clock tick. If it fails to do so, a setup violation occurs, so-called because the new data was not set up and stable before the next clock tick arrived. A hold violation is more serious than a setup violation because it cannot be fixed by increasing the clock period.
  • Clock skew, if done right, can also benefit a circuit. It can be intentionally introduced to decrease the clock period at which the circuit will operate correctly, and/or to increase the setup or hold safety margins. The optimal set of clock delays is determined by a linear program, in which a setup and a hold constraint appears for each logic path. In this linear program, zero clock skew is merely a feasible point.
    Clock skew can be minimized by proper routing of clock signal (clock distribution tree) or putting variable delay buffer so that all clock inputs arrive at the same time

3) What is slack?

  • ‘Slack’ is the amount of time you have that is measured from when an event ‘actually happens’ and when it ‘must happen’.. The term ‘actually happens’ can also be taken as being a predicted time for when the event will ‘actually happen’.
  • When something ‘must happen’ can also be called a ‘deadline’ so another definition of slack would be the time from when something ‘actually happens’ (call this Tact) until the deadline (call this Tdead).
    Slack = Tdead – Tact.
  • Negative slack implies that the ‘actually happen’ time is later than the ‘deadline’ time…in other words it’s too late and a timing violation….you have a timing problem that needs some attention.

4) What is glitch? What causes it (explain with waveform)? How to overcome it?

The following figure shows a synchronous alternative to the gated clock using a data path. The flip-flop is clocked at every clock cycle and the data path is controlled by an enable. When the enable is Low, the multiplexer feeds the output of the register back on itself. When the enable is High, new data is fed to the flip-flop and the register changes its state

5) Given only two xor gates one must function as buffer and another as inverter?

  1. Tie one of xor gates input to 1 it will act as inverter.
  2. Tie one of xor gates input to 0 it will act as buffer.

6) What is difference between latch and flipflop?

The main difference between latch and FF is that latches are level sensitive while FF are edge sensitive. They both require the use of clock signal and are used in sequential logic. For a latch, the output tracks the input when the clock signal is high, so as long as the clock is logic 1, the output can change if the input also changes. FF on the other hand, will store the input only when there is a rising/falling edge of the clock.

7) Build a 4:1 mux using only 2:1 mux?

4:1 mux using only 2:1 mux

8.Difference between heap and stack?

The Stack is more or less responsible for keeping track of what’s executing in our code (or what’s been “called”). The Heap is more or less responsible for keeping track of our objects (our data, well… most of it – we’ll get to that later.).
Think of the Stack as a series of boxes stacked one on top of the next. We keep track of what’s going on in our application by stacking another box on top every time we call a method (called a Frame). We can only use what’s in the top box on the stack. When we’re done with the top box (the method is done executing) we throw it away and proceed to use the stuff in the previous box on the top of the stack. The Heap is similar except that its purpose is to hold information (not keep track of execution most of the time) so anything in our Heap can be accessed at any time. With the Heap, there are no constraints as to what can be accessed like in the stack. The Heap is like the heap of clean laundry on our bed that we have not taken the time to put away yet – we can grab what we need quickly. The Stack is like the stack of shoe boxes in the closet where we have to take off the top one to get to the one underneath it.

9) Difference between mealy and moore state machine?

A) Mealy and Moore models are the basic models of state machines. A state machine which uses only Entry Actions, so that its output depends on the state, is called a Moore model. A state machine which uses only Input Actions, so that the output depends on the state and also on inputs, is called a Mealy model. The models selected will influence a design but there are no general indications as to which model is better. Choice of a model depends on the application, execution means (for instance, hardware systems are usually best realized as Moore models) and personal preferences of a designer or programmer

B) Mealy machine has outputs that depend on the state and input (thus, the FSM has the output written on edges)
Moore machine has outputs that depend on state only (thus, the FSM has the output written in the state itself.

Adv and Disadv
In Mealy as the output variable is a function both input and state, changes of state of the state variables will be delayed with respect to changes of signal level in the input variables, there are possibilities of glitches appearing in the output variables. Moore overcomes glitches as output dependent on only states and not the input signal level.
All of the concepts can be applied to Moore-model state machines because any Moore state machine can be implemented as a Mealy state machine, although the converse is not true.
Moore machine: the outputs are properties of states themselves… which means that you get the output after the machine reaches a particular state, or to get some output your machine has to be taken to a state which provides you the output.The outputs are held until you go to some other state Mealy machine:
Mealy machines give you outputs instantly, that is immediately upon receiving input, but the output is not held after that clock cycle.

10) Difference between onehot and binary encoding?

Common classifications used to describe the state encoding of an FSM are Binary (or highly encoded) and One hot.
A binary-encoded FSM design only requires as many flip-flops as are needed to uniquely encode the number of states in the state machine. The actual number of flip-flops required is equal to the ceiling of the log-base-2 of the number of states in the FSM.
A onehot FSM design requires a flip-flop for each state in the design and only one flip-flop (the flip-flop representing the current or “hot” state) is set at a time in a one hot FSM design. For a state machine with 9- 16 states, a binary FSM only requires 4 flip-flops while a onehot FSM requires a flip-flop for each state in the design
FPGA vendors frequently recommend using a onehot state encoding style because flip-flops are plentiful in an FPGA and the combinational logic required to implement a onehot FSM design is typically smaller than most binary encoding styles. Since FPGA performance is typically related to the combinational logic size of the FPGA design, onehot FSMs typically run faster than a binary encoded FSM with larger combinational logic blocks

11) How to achieve 180 degree exact phase shift?

Never tell using inverter
a) dcm’s an inbuilt resource in most of fpga can be configured to get 180 degree phase shift.
b) Bufgds that is differential signaling buffers which are also inbuilt resource of most of FPGA can be used.

12) What is significance of ras and cas in SDRAM?

  • SDRAM receives its address command in two address words.
  • It uses a multiplex scheme to save input pins. The first address word is latched into the DRAM chip with the row address strobe (RAS).
  • Following the RAS command is the column address strobe (CAS) for latching the second address word.
  • Shortly after the RAS and CAS strobes, the stored data is valid for reading.

13) Tell some of applications of buffer?

a)They are used to introduce small delays
b)They are used to eliminate cross talk caused due to inter electrode capacitance due to close routing.
c)They are used to support high fanout,eg:bufg

14) Implement an AND gate using mux?

This is the basic question that many interviewers ask. for and gate, give one input as select line,incase if u r giving b as select line, connect one input to logic ‘0’ and other input to a.

15) What will happen if contents of register are shifter left, right?

  • It is well known that in left shift all bits will be shifted left and LSB will be appended with 0 and in right shift all bits will be shifted right and MSB will be appended with 0 this is a straightforward answer
  • What is expected is in a left shift value gets Multiplied by 2 eg:consider 0000_1110=14 a left shift will make it 0001_110=28, it the same fashion right shift will Divide the value by 2.

16)Given the following FIFO and rules, how deep does the FIFO need to be to prevent underflow or overflow?

RULES:
1) frequency(clk_A) = frequency(clk_B) / 4
2) period(en_B) = period(clk_A) * 100
3) duty_cycle(en_B) = 25%

Assume clk_B = 100MHz (10ns)
From (1), clk_A = 25MHz (40ns)
From (2), period(en_B) = 40ns * 400 = 4000ns, but we only output for
1000ns,due to (3), so 3000ns of the enable we are doing no output work. Therefore, FIFO size = 3000ns/40ns = 75 entries.

Digital Logic Design LAB VIVA Questions :

300+ TOP Operating System LAB VIVA Questions and Answers

Operating System VIVA Questions :-

1.What is an operating system?
An operating system is a program that acts as an intermediary between the user and the computer hardware. The purpose of an OS is to provide a convenient environment in which user can execute programs in a convenient and efficient manner.It is a resource allocator responsible for allocating system resources and a control program which controls the operation of the computer h/w.

2.What are the various components of a computer system?

  1. The hardware
  2. The operating system
  3. The application programs
  4. The users.

3.What is purpose of different operating systems?
The machine Purpose Workstation individual usability &Resources utilization Mainframe Optimize utilization of hardware PC Support complex games, business application Hand held PCs Easy interface & min. power consumption

4.What are the different operating systems?
1. Batched operating systems
2. Multi-programmed operating systems
3. timesharing operating systems
4. Distributed operating systems
5. Real-time operating systems

6.What is a boot-strap program?
Bootstrapping is a technique by which a simple computer program activates a more complicated system of programs. It comes from an old expression “to pull oneself up by one’s bootstraps.”

7.What is BIOS?
A BIOS is software that is put on computers. This allows the user to configure the input and output of a computer. A BIOS is also known as firmware.

8.Explain the concept of the batched operating systems?
In batched operating system the users gives their jobs to the operator who sorts the programs according to their requirements and executes them. This is time consuming but makes the CPU busy all the time.

9.Explain the concept of the multi-programmed operating systems?
A multi-programmed operating systems can execute a number of programs concurrently. The operating system fetches a group of programs from the job-pool in the secondary storage which contains all the programs to be executed, and places them in the main memory. This process is called job scheduling. Then it chooses a program from the ready queue and gives them to CPU to execute. When a executing program needs some I/O operation then the operating system fetches another program and hands it to the CPU for execution, thus keeping the CPU busy all the time.

10.Explain the concept of the time sharing operating systems?
It is a logical extension of the multi-programmed OS where user can interact with the program. The CPU executes multiple jobs by switching among them, but the switches occur so frequently that the user feels as if the operating system is running only his program.

11.Explain the concept of the multi-processor systems or parallel systems?
They contain a no. of processors to increase the speed of execution, and reliability, and economy. They are of two types:
1. Symmetric multiprocessing
2. Asymmetric multiprocessing
In Symmetric multi processing each processor run an identical copy of the OS, and these copies communicate with each other as and when needed.But in Asymmetric multiprocessing each processor is assigned a specific task.

12.Explain the concept of the Distributed systems?
Distributed systems work in a network. They can share the network resources,communicate with each other

13.Explain the concept of Real-time operating systems?
A real time operating system is used when rigid time requirement have been placed on the operation of a processor or the flow of the data; thus, it is often used as a control device in a dedicated application. Here the sensors bring data to the computer. The computer must analyze the data and possibly adjust controls to
modify the sensor input.
They are of two types:
1. Hard real time OS
2. Soft real time OS
Hard-real-time OS has well-defined fixed time constraints. But soft real time operating systems have less stringent timing constraints.

14.Define MULTICS?
MULTICS (Multiplexed information and computing services) operating system was developed from 1965-1970 at Massachusetts institute of technology as a computing utility. Many of the ideas used in MULTICS were subsequently used in UNIX.

15.What is SCSI?
Small computer systems interface.

16.What is a sector?
Smallest addressable portion of a disk.

17.What is cache-coherency?
In a multiprocessor system there exist several caches each may containing a copy of same variable A. Then a change in one cache should immediately be reflected in all other caches this process of maintaining the same value of a data in all the caches s called cache-coherency.

18.What are residence monitors?
Early operating systems were called residence monitors.

19.What is dual-mode operation?
In order to protect the operating systems and the system programs from the malfunctioning programs the two mode operations were evolved:
1. System mode.
2. User mode.
Here the user programs cannot directly interact with the system resources, instead they request the operating system which checks the request and does the required task for the user programs-DOS was written for / intel 8088 and has no dual-mode. Pentium provides dual-mode operation.

20.What are the operating system components?
1. Process management
2. Main memory management
3. File management
4. I/O system management
5. Secondary storage management
6. Networking
7. Protection system
8. Command interpreter system

21.What are operating system services?
1. Program execution
2. I/O operations
3. File system manipulation
4. Communication
5. Error detection
6. Resource allocation
7. Accounting
8. Protection

22.What are system calls?
System calls provide the interface between a process and the operating system. System calls for modern Microsoft windows platforms are part of the win32 API, which is available for all the compilers written for Microsoft windows.

23.What is a layered approach and what is its advantage?

Layered approach is a step towards modularizing of the system, in which the operating system is broken up into a number of layers (or levels), each built on top of lower layer. The bottom layer is the hard ware and the top most is the user interface.The main advantage of the layered approach is modularity. The layers are
selected such that each uses the functions (operations) and services of only lower layer. This approach simplifies the debugging and system verification.

24.What is micro kernel approach and site its advantages?

Micro kernel approach is a step towards modularizing the operating system where all nonessential components from the kernel are removed and implemented as system and user level program, making the kernel smaller.The benefits of the micro kernel approach include the ease of extending the operating system. All new services are added to the user space and consequently do not require modification of the kernel. And as kernel is smaller it is easier to upgrade it. Also this approach provides more security and reliability since most services are running as user processes rather than kernel’s keeping the kernel intact.

25.What are a virtual machines and site their advantages?

It is the concept by which an operating system can create an illusion that a process has its own processor with its own (virtual) memory.
The operating system implements virtual machine concept by using CPU scheduling and virtual memory.

1. The basic advantage is it provides robust level of security as each virtual machine is isolated from all other VM. Hence the system resources are completely protected.
2. Another advantage is that system development can be done without disrupting normal operation. System programmers are given their own virtual machine, and as system development is done on the virtual machine instead of on the actual
physical machine.
3. Another advantage of the virtual machine is it solves the compatibility problem.
EX: Java supplied by Sun micro system provides a specification for java virtual machine.

26.What is a process?
A program in execution is called a process. Or it may also be called a unit of work. A process needs some system resources as CPU time, memory, files, and i/o devices to accomplish the task. Each process is represented in the operating system by a process control block or task control block (PCB).Processes are of two types:
1. Operating system processes
2. User processes

27.What are the states of a process?
1. New
2. Running
3. Waiting
4. Ready
5. Terminated

28.What are various scheduling queues?
1. Job queue
2. Ready queue
3. Device queue

29.What is a job queue?
When a process enters the system it is placed in the job queue.

30.What is a ready queue?
The processes that are residing in the main memory and are ready and waiting to execute are kept on a list called the ready queue.

31.What is a device queue?
A list of processes waiting for a particular I/O device is called device queue.

32.What is a long term scheduler & short term schedulers?
Long term schedulers are the job schedulers that select processes from the job queue and load them into memory for execution. The short term schedulers are the CPU schedulers that select a process form the ready queue and allocate the CPU to one of them.

33.What is context switching?
Transferring the control from one process to other process requires saving the state of the old process and loading the saved state for new process. This task is known as context switching.

34.What are the disadvantages of context switching?
Time taken for switching from one process to other is pure over head. Because the system does no useful work while switching. So one of the solutions is to go for threading when ever possible.

35.What are co-operating processes?
The processes which share system resources as data among each other. Also the processes can communicate with each other via interprocess communication facility generally used in distributed systems. The best example is chat program used on the www.

36.What is a thread?
A thread is a program line under execution. Thread sometimes called a light-weight process, is a basic unit of CPU utilization; it comprises a thread id, a program counter, a register set, and a stack.

37.What are the benefits of multithreaded programming?
1. Responsiveness (needn’t to wait for a lengthy process)
2. Resources sharing
3. Economy (Context switching between threads is easy)
4. Utilization of multiprocessor architectures (perfect utilization of the multiple processors).

38.What are types of threads?
1. User thread
2. Kernel thread
User threads are easy to create and use but the disadvantage is that if they perform a blocking system calls the kernel is engaged completely to the single user thread blocking other processes. They are created in user space.Kernel threads are supported directly by the operating system. They are slower to create and manage. Most of the OS like Windows NT, Windows 2000, Solaris2, BeOS, and Tru64 Unix support kernel threading.

39.Which category the java thread do fall in?
Java threads are created and managed by the java virtual machine, they do not easily fall under the category of either user or kernel thread……

40.What are multithreading models?
Many OS provide both kernel threading and user threading. They are called multithreading models. They are of three types:
1. Many-to-one model (many user level thread and one kernel thread).
2. One-to-one model
3. Many-to –many
In the first model only one user can access the kernel thread by not allowing multi-processing. Example: Green threads of Solaris.The second model allows multiple threads to run on parallel processing systems. Creating user thread needs to create corresponding kernel thread (disadvantage).Example: Windows NT, Windows 2000, OS/2.The third model allows the user to create as many threads as necessary and the corresponding kernel threads can run in parallel on a multiprocessor.
Example: Solaris2, IRIX, HP-UX, and Tru64 Unix.

41.What is a P-thread?
P-thread refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creation and synchronization. This is a specification for thread behavior, not an implementation. The windows OS have generally not supported the P-threads.

42.What are java threads?
Java is one of the small number of languages that support at the language level for the creation and management of threads. However, because threads are managed by the java virtual machine (JVM), not by a user-level library or kernel, it is difficult to classify Java threads as either user- or kernel-level.

43.What is process synchronization?
A situation, where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called race condition. To guard against the race condition we need to ensure that only one process at a time can be manipulating
the same data. The technique we use for this is called process synchronization.

44.What is critical section problem?
Critical section is the code segment of a process in which the process may be changing common variables, updating tables, writing a file and so on. Only one process is allowed to go into critical section at any given time (mutually exclusive).The critical section problem is to design a protocol that the processes can use to
co-operate. The three basic requirements of critical section are:
1. Mutual exclusion
2. Progress
3. bounded waiting
Bakery algorithm is one of the solutions to CS problem.

45.What is a semaphore?
It is a synchronization tool used to solve complex critical section problems. A semaphore is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: Wait and Signal.

46.What is bounded-buffer problem?
Here we assume that a pool consists of n buffers, each capable of holding one item. The semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1.The empty and full semaphores count the number of empty and full buffers, respectively. Empty is initialized to n, and full is initialized to 0.

47.What is readers-writers problem?
Here we divide the processes into two types:
1. Readers (Who want to retrieve the data only)
2. Writers (Who want to retrieve as well as manipulate)
We can provide permission to a number of readers to read same data at same time.But a writer must be exclusively allowed to access. There are two solutions to this problem:
1. No reader will be kept waiting unless a writer has already obtained permission to use the shared object. In other words, no reader should wait for other readers to complete simply because a writer is waiting.
2. Once a writer is ready, that writer performs its write as soon as possible. In other words, if a writer is waiting to access the object, no new may start reading.

48.What is dining philosophers’ problem?

Consider 5 philosophers who spend their lives thinking and eating. The philosophers share a common circular table surrounded by 5 chairs, each belonging to one philosopher. In the center of the table is a bowl of rice, and the table is laid with five single chop sticks. When a philosopher thinks, she doesn’t interact with her colleagues.
From time to time, a philosopher gets hungry and tries to pick up two chop sticks that are closest to her .A philosopher may pick up only one chop stick at a time. Obviously she can’t pick the stick in some others hand. When a hungry philosopher has both her chopsticks at the same time, she eats without releasing her chopsticks. When she is finished eating, she puts down both of her chopsticks and start thinking again.

49.What is a deadlock?
Suppose a process request resources; if the resources are not available at that time the process enters into a wait state. A waiting process may never again change state, because the resources they have requested are held by some other waiting processes. This situation is called deadlock.

50.What are necessary conditions for dead lock?
1. Mutual exclusion (where at least one resource is non-sharable)
2. Hold and wait (where a process hold one resource and waits for other resource)
3. No preemption (where the resources can’t be preempted)
4. circular wait (where p[i] is waiting for p[j] to release a resource. i= 1,2,…n
j=if (i!=n) then i+1
else 1 )

OS LAB VIVA Questions ::

51.What is resource allocation graph?

This is the graphical description of deadlocks. This graph consists of a set of edges E and a set of vertices V. The set of vertices V is partitioned into two different types of nodes P={p1,p2,…,pn}, the set consisting of all the resources in the system, R={r1,r2,…rn}.A directed edge Pi?Rj is called a request edge; a directed edge Rj?
Pi is called an assignment edge. Pictorially we represent a process Pi as a circle, and each resource type Rj as square.Since resource type Rj may have more than one instance, we represent each such instance as a dot within the square.When a request is fulfilled the request edge is transformed into an assignment edge. When a process releases a resource the assignment edge is deleted. If the cycle involves a set of resource types, each of which has only a single instance, then a deadlock has occurred. Each process involved in the cycle is deadlock.

52.What are deadlock prevention techniques?

  1. Mutual exclusion : Some resources such as read only files shouldn’t be mutually exclusive. They should be sharable. But some resources such as printers must be
    mutually exclusive.
  2. Hold and wait : To avoid this condition we have to ensure that if a process is requesting for a resource it should not hold any resources.
  3. No preemption : If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is the process must wait), then all the resources currently being held are preempted(released autonomously).
  4. Circular wait : the way to ensure that this condition never holds is to impose a total ordering of all the resource types, and to require that each process requests resources in an increasing order of enumeration.

53.What is a safe state and a safe sequence?

A system is in safe state only if there exists a safe sequence. A sequence of processes is a safe sequence for the current allocation state if, for each Pi, the resources that the Pi can still request can be satisfied by the currently available resources plus the resources held by all the Pj, with j

54.What are the deadlock avoidance algorithms?

A dead lock avoidance algorithm dynamically examines the resource-allocation state to ensure that a circular wait condition can never exist. The resource allocation state is defined by the number of available and allocated resources, and the maximum demand of the process.There are two algorithms:
1. Resource allocation graph algorithm
2. Banker’s algorithm
a. Safety algorithm
b. Resource request algorithm

55. What are the basic functions of an operating system?

Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.

56.Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.

  • Processor:- A processor is the part a computer system that executes instructions .It is also called a CPU
  • Assembler:- An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer’s processor can use to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language.
  • Compiler:- A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or “code” that a computer’s processor uses. Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor. The file that is created contains what are called the source statements. The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements.
  • Loader:- In a computer operating system, a loader is a component that locates a given program (which can be an application or, in some cases, part of the operating system itself) in offline storage (such as a hard disk), loads it into main storage (in a personal computer, it’s called random access memory), and gives that program control of the compute
  • Linker:- Linker performs the linking of libraries with the object code to make the object code into an executable machine code.

57. What is a Real-Time System?

A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully

58. What is the difference between Hard and Soft real-time systems?

A hard real-time system guarantees that critical tasks complete on time. This goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it takes the operating system to finish any request made of it. A soft real time system where a critical real-time task gets priority over other tasks and retains that priority until it completes. As in hard real time systems kernel delays need to be bounded

59. What is virtual memory?

A virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used

60. What is cache memory?

Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data

61.Differentiate between Complier and Interpreter?

An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions.

62.What are different tasks of Lexical Analysis?

The purpose of the lexical analyzer is to partition the input text, delivering a sequence of comments and basic symbols. Comments are character sequences to be ignored, while basic symbols are character sequences that correspond to terminal symbols of the grammar defining the phrase structure of the input

63. Why paging is used?

Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available.

64. What is Context Switch?

Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task is known as a context switch.Context-switch time is pure overhead, because the system does no useful work while switching. Its speed varies from machine to machine, depending on the memory speed, the number of registers which must be copied, the existed of special instructions(such as a single instruction to load or store all registers).

65. Distributed Systems?

Distribute the computation among several physical processors.
Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines
Advantages of distributed systems:
->Resources Sharing
->Computation speed up – load sharing
->Reliability
->Communications

66.Difference between Primary storage and secondary storage?

Main memory: – only large storage media that the CPU can access directly.
Secondary storage: – extension of main memory that provides large nonvolatile storage capacity.

67. What is CPU Scheduler?

  • Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them.
  • CPU scheduling decisions may take place when a process:
    1.Switches from running to waiting state.
    2.Switches from running to ready state.
    3.Switches from waiting to ready.
    4.Terminates.
  • Scheduling under 1 and 4 is nonpreemptive.
  • All other scheduling is preemptive.

68. What do you mean by deadlock?

Deadlock is a situation where a group of processes are all blocked and none of them can become unblocked until one of the other becomes unblocked.The simplest deadlock is two processes each of which is waiting for a message from the other

69. What is Dispatcher?

->Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves:
Switching context
Switching to user mode
Jumping to the proper location in the user program to restart that program
Dispatch latency – time it takes for the dispatcher to stop one process and start another running.

70. What is Throughput, Turnaround time, waiting time and Response time?

Throughput – number of processes that complete their execution per time unit
Turnaround time – amount of time to execute a particular process
Waiting time – amount of time a process has been waiting in the ready queue
Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

71. Explain the difference between microkernel and macro kernel?

Micro-Kernel: A micro-kernel is a minimal operating system that performs only the essential functions of an operating system. All other operating system functions are performed by system processes.
Monolithic: A monolithic operating system is one where all operating system code is in a single executable image and all operating system code runs in system mode.

72.What is multi tasking, multi programming, multi threading?

Multi programming: Multiprogramming is the technique of running several programs at a time using timesharing.It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism.
The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. So the main idea here is that the CPU is never idle.
Multi tasking: Multitasking is the logical extension of multiprogramming .The concept of multitasking is quite similar to multiprogramming but difference is that the switching between jobs occurs so frequently that the users can interact with each program while it is running. This concept is also known as time-sharing systems. A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of time-shared system.
Multi threading: An application typically is implemented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tasks for example a web server accepts client requests for web pages, images, sound, and so forth. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process, it would be able to service only one client at a time. The amount of time that a client might have to wait for its request to be serviced could be enormous.
So it is efficient to have one process that contains multiple threads to serve the same purpose. This approach would multithread the web-server process, the server would create a separate thread that would listen for client requests when a request was made rather than creating another process it would create another thread to service the request.
So to get the advantages like responsiveness, Resource sharing economy and utilization of multiprocessor architectures multithreading concept can be used

73. Give a non-computer example of preemptive and non-preemptive scheduling?

Consider any system where people use some kind of resources and compete for them. The non-computer examples for preemptive scheduling the traffic on the single lane road if there is emergency or there is an ambulance on the road the other vehicles give path to the vehicles that are in need. The example for preemptive scheduling is people standing in queue for tickets.

74. What is starvation and aging?

Starvation: Starvation is a resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.
Aging: Aging is a technique to avoid starvation in a scheduling system. It works by adding an aging factor to the priority of each request. The aging factor must increase the request’s priority as time passes and must ensure that a request will eventually be the highest priority request (after it has waited long enough)

75. Different types of Real-Time Scheduling?

Hard real-time systems – required to complete a critical task within a guaranteed amount of time.
Soft real-time computing – requires that critical processes receive priority over less fortunate ones.

76. What are the Methods for Handling Deadlocks?

Ensure that the system will never enter a deadlock state.
->Allow the system to enter a deadlock state and then recover.
->Ignore the problem and pretend that deadlocks never occur in the system; used by most operating systems, including
UNIX.

77. What is a Safe State and its’ use in deadlock avoidance?

When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state
->System is in safe state if there exists a safe sequence of all processes.
->Sequence is safe if for each Pi, the resources that Pi can still request can be satisfied by
currently available resources + resources held by all the Pj, with j
If Pi resource needs are not immediately available, then Pi can wait until all Pj have finished.
When Pj is finished, Pi can obtain needed resources, execute, return allocated resources, and terminate.
When Pi terminates, Pi+1 can obtain its needed resources, and so on.
->Deadlock Avoidance Þ ensure that a system will never enter an unsafe state.

78. Recovery from Deadlock?

Process Termination:
->Abort all deadlocked processes.
->Abort one process at a time until the deadlock cycle is eliminated.
->In which order should we choose to abort?
Priority of the process.
How long process has computed, and how much longer to completion.
Resources the process has used.
Resources process needs to complete.
How many processes will need to be terminated?
Is process interactive or batch?
Resource Preemption:
->Selecting a victim – minimize cost.
->Rollback – return to some safe state, restart process for that state.
->Starvation – same process may always be picked as victim, include number of rollback in cost factor.

79.Difference between Logical and Physical Address Space?

->The concept of a logical address space that is bound to a separate physical address space is central to proper memory management.
Logical address – generated by the CPU; also referred to as virtual address.
Physical address – address seen by the memory unit.
->Logical and physical addresses are the same in compile-time and load-time address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme

80. Binding of Instructions and Data to Memory?

Address binding of instructions and data to memory addresses can happen at three different stages
Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes.
Load time: Must generate relocatable code if memory location is not known at compile time.
Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.g., base and limit registers).

81. What is Memory-Management Unit (MMU)?

Hardware device that maps virtual to physical address.
In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.
->The user program deals with logical addresses; it never sees the real physical addresses

82. What are Dynamic Loading, Dynamic Linking and Overlays?

Dynamic Loading:

  • Routine is not loaded until it is called
  • Better memory-space utilization; unused routine is never loaded.
  • Useful when large amounts of code are needed to handle infrequently occurring cases.
  • No special support from the operating system is required implemented through program design.
    Dynamic Linking:
  • Linking postponed until execution time.
  • Small piece of code, stub, used to locate the appropriate memory-resident library routine.
  • Stub replaces itself with the address of the routine, and executes the routine.
  • Operating system needed to check if routine is in processes’ memory address.
  • Dynamic linking is particularly useful for libraries.
    Overlays:
  • Keep in memory only those instructions and data that are needed at any given time.
  • Needed when process is larger than amount of memory allocated to it.
  • Implemented by user, no special support needed from operating system, programming design of overlay structure is complex.

83. What is fragmentation? Different types of fragmentation?

Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.
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 Reduce external fragmentation by compaction
->Shuffle memory contents to place all free memory together in one large block.
->Compaction is possible only if relocation is dynamic, and is done at execution time.

84. Explain Demand Paging, Page fault interrupt, and Trashing?

Demand Paging: Demand paging is the paging policy that a page is not read into memory until it is requested, that is, until there is a page fault on the page.
Page fault interrupt: A page fault interrupt occurs when a memory reference is made to a page that is not in memory.The present bit in the page table entry will be found to be off by the virtual memory hardware and it will signal an interrupt.
Trashing: The problem of many page faults occurring in a short time, called “page thrashing,”

85. Explain Segmentation with paging?

Segments can be of different lengths, so it is harder to find a place for a segment in memory than a page. With segmented virtual memory, we get the benefits of virtual memory but we still have to do dynamic storage allocation of physical memory. In order to avoid this, it is possible to combine segmentation and paging into a two-level virtual memory system. Each segment descriptor points to page table for that segment.This give some of the advantages of paging (easy placement) with some of the advantages of segments (logical division of the program).

86. Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs?

A page fault occurs when an access to a page that has not been brought into main memory takes place. The operating system verifies the memory access, aborting the program if it is invalid. If it is valid, a free frame is located and I/O is requested to read the needed page into the free frame. Upon completion of I/O, the process table and page table are updated and the instruction is restarted

87. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?

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.

300+ TOP UML LAB VIVA Questions and Answers

UML VIVA Questions and Answers :-

1. What is UML?
UML stands for the Unified Modeling Language.
It is a graphical language for

  1. visualizing
  2. constructing
  3. documenting the artifacts of a system.

It allows you to create a blue print of all the aspects of the system, before actually physically implementing the system.

2. What are the advantages of creating a model?

  • Modeling is a proven and well-accepted engineering technique which helps build a model.
  • Model is a simplification of reality; it is a blueprint of the actual system that needs to be built.
  • Model helps to visualize the system.
  • Model helps to specify the structural and behavior of the system.
  • Model helps make templates for constructing the system.
  • Model helps document the system.

3. What are the different views that are considered when building an object-oriented software system?
Normally there are 5 views.

  1. Use Case view – This view exposes the requirements of a system.
  2. Design View – Capturing the vocabulary.
  3. Process View – modeling the distribution of the systems processes and threads.
  4. Implementation view – addressing the physical implementation of the system.
  5. Deployment view – focus on the modeling the components required for deploying the system.

4. What are the major three types of modeling used?
The 3 Major types of modeling are

  • architectural,
  • behavioral, and
  • structural.

5. Name 9 modeling diagrams that are frequently used?
9 Modeling diagrams that are commonly used are

  1. Use case diagram
  2. Class Diagram
  3. Object Diagram
  4. Sequence Diagram
  5. statechart Diagram
  6. Collaboration Diagram
  7. Activity Diagram
  8. Component diagram
  9. Deployment Diagram.

6. How would you define Architecture?
Architecture is not only taking care of the structural and behavioral aspect of a software system but also taking into account the software usage, functionality, performance, reuse, economic and technology constraints.

7.What is SDLC (Software Development Life Cycle)?
SDLC is a system including processes that are

  • Use case driven,
  • Architecture centric,
  • Iterative, and
  • Incremental.

UML VIVA Questions and Answers :-

8. What is the Life Cycle divided into?
This Life cycle is divided into phases.
Each Phase is a time span between two milestones.
The milestones are

  • Inception,
  • Elaboration,
  • Construction, and
  • Transition.

9. What are the Process Workflows that evolve through these phases?
The Process Workflows that evolve through these phases are

  • Business Modeling,
  • Requirement gathering,
  • Analysis and Design,
  • Implementation,
  • Testing,
  • Deployment.
    Supporting Workflows are Configuration, change management, and Project management.

10. What are Relationships?
There are different kinds of relationships:

  • Dependencies,
  • Generalization, and
  • Association.

Dependencies are relationships between two entities.
A change in specification of one thing may affect another thing.
Most commonly it is used to show that one class uses another class as an argument in the signature of the operation.

Generalization is relationships specified in the class subclass scenario, it is shown when one entity inherits from other.
Associations are structural relationships that are:
a room has walls,
Person works for a company.

Aggregation is a type of association where there is a has a relationship.
As in the following examples: A room has walls, or if there are two classes room and walls then the relation ship is called a association and further defined as an aggregation.

11. How are the diagrams divided?
The nine diagrams are divided into static diagrams and dynamic diagrams.

12. Static Diagrams (Also called Structural Diagram):
The following diagrams are static diagrams.

  • Class diagram,
  • Object diagram,
  • Component Diagram,
  • Deployment diagram.

13. Dynamic Diagrams (Also called Behavioral Diagrams):
The following diagrams are dynamic diagrams.

  • Use Case Diagram,
  • Sequence Diagram,
  • Collaboration Diagram,
  • Activity diagram,
  • Statechart diagram.

14. What are Messages?
A message is the specification of a communication, when a message is passed that results in action that is in turn an executable statement.

15. What is an Use Case?

  • A use case specifies the behavior of a system or a part of a system.
  • Use cases are used to capture the behavior that need to be developed.
  • It involves the interaction of actors and the system.