0% found this document useful (0 votes)
10 views

Important Points For Comprehensive

The document discusses various topics related to data structures, algorithms, computer organization and architecture, operating systems, and their properties. Some key points include binary search trees having worst case time complexity of O(n) for search, insert and delete operations, towers of Hanoi problem having a recurrence relation of T(n) = 2T(n-1) + 1, and round robin scheduling improving response time as all processes get CPU after a specified time interval.

Uploaded by

fitej56189
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Important Points For Comprehensive

The document discusses various topics related to data structures, algorithms, computer organization and architecture, operating systems, and their properties. Some key points include binary search trees having worst case time complexity of O(n) for search, insert and delete operations, towers of Hanoi problem having a recurrence relation of T(n) = 2T(n-1) + 1, and round robin scheduling improving response time as all processes get CPU after a specified time interval.

Uploaded by

fitej56189
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

DS

1. Stack is used in redo undo feature


2. Min and max number of keys in a B tree order m and height h :

min--->2 * 𝑚 − 1
(ℎ+1)
max--->𝑚 −1
3. We need 2 queues to implement a stack
4. Internal sorting algo---> algo that uses main memory during the sort
5. recurrence for worst case of Binary Search--->T(n) = T(n/2) + O(1) and T(1) = T(0) =
O(1)
6. worst case time complexity of the Quicksort algorithm for sorting n(≥ 2) numbers--->T(n)
= T(n – 1) + T(0) + cn
7. A queue is best suited for synchronization
8. Recurrence relation that shows the towers of Hanoi problem:T(n) = 2T(n − 1) + 1
9. worst case time complexity for search, insert and delete operations in a general Binary
Search Tree:O(n) for all
10. A priority queue can be efficiently implemented by data structures such as Binary heap
and fibonacci heap(heap data structures in general)
11. Round Robin is likely to increase the interactiveness
12. In a complete- k- ary tree. If every internal node has exactly k children then (k -1 ) key
contains no leaves. If there are n internal nodes, then the number of leaves is n(k -1) +
1.
(2𝑛)!
13. Number of distinct binary trees that can be made from n distinct keys are:
(𝑛+1)!𝑛!
14.

COA

1. Throughput = 1 / max delay


2. % increase in throughput = (t2 - t1) / t1
T2 = max throughput in stage 2
T1 = max throughput in stage 1
3. SIMD-Single Instruction Multiple Data-->includes many processing units under the
supervision of a common control unit
4. Bandwidth=Rate of data lines * Number of data Lines; Rate of data lines = 1 / (cycles *
time of each cycle)
5. RAM is volatile
6. Flip Flop is the circuit used to store one bit of data
7. Excess 3 code is not a weighted code
8. Cache hit ratio = (T2 - Tavg + T1) / T2; T2 = access time w/o cache, Tavg = access time
with cache, T1 = Access time of memory
9. Wire Through Technique-cache memory
10. PSW is saved in stack when an interrupt occurs
11. Memory unit accessed by content is called associative memory
12. Time interval between adjacent bits is called bit-time
13. An instruction pipeline can implemented by means of FIFO buffer
14. The performance of cache memory is frequently measured in terms of a quantity called
Latency ratio
15. TRAP is a non-maskable interrupt
16. ORG AND END are not machine instructions
17. The maximum addressing capacity of a micro processor which uses 16 bit database &
32 bit address base is 4G
18. a K bit field can specify any one of 2k registers
19. what characteristic of ram memory makes it not suitable for permanent storage?---> it is
volatile
20. Memory access in RISC architecture is limited to instructions--->JMP and MOV
21. Data hazards occur if an instruction reads a Register that a previous instruction
overwrites in a future cycle. We must eliminate data hazards of pipelining that produce
incorrect results.
22. The term microcomputer is used to describe a system that includes a minimum of a
microprocessor, program memory, data memory, and input-output (I/O). Some
microcomputer systems include additional components such as timers, counters,
analog-to-digital converters, and so on.
23. CPU doesn't perform data transfer
24. A stack is a set of memory locations in R/WM reserved for storing information
temporarily during the execution of computer
25. interrupts which are initiated by an instruction are software
26. Register memory has the lowest access time
27. A memory buffer used to accommodate a speed differential is called Cache
28. Auxiliary memory units are among computer peripheral equipment. They trade slower
access rates for greater storage capacity and data stability. Auxiliary memory holds
programs and data for future use,and, because it is nonvolatile (like ROM), it is used to
store inactive programs and to archive data.
29. 2's complement number : 1 --> 0 --> 1 --> 0 --> 1 --> 0 --> 1 --> 0
Booth's encoding : -1 +1 -1 +1 -1 +1 -1 0
Hence the required Booth's encoding of -86 : -1 +1 -1 +1 -1 +1 -1 0
30. In vectored interrupts, how does the device identify itself to the processor?
Explanation: By sending the starting address of the routine ,the device ids ,the routine
required and thereby identifying itself.
31. when dealing with multiple interrupts Polling method is the best
32. The code send by the device in vectored interrupts is 4-8 bits long
33. The starting address send by the device in vectored interrupts is called Interrupt Vector
34. The process indicates to the devices that it is ready to receive interrupts by activating the
interrupt ACK line
35. Vectored interrupts is possible and multiple interrupting devices is not possible for a CPU
having a single interrupt request line and single interrupt grant line.
36. In the Daisy chain mechanism, all the devices are connected using a single request line
and they’re serviced based on the interrupting device’s priority.
37. In a parallel priority system, the priority of the device is obtained by adding the contents
of the interrupt register and the mask register.The added output of the bits of the
interrupt register and the mask register is set as an input of Priority Encoder
38. The range of actual exponent in the IEEE single precision standard for floating point
numbers:-126 to 127
39. The method for updating the main memory as soon as a word is removed from the
Cache is called write-back
40. cache block size is 16 bytes, so block or word offset is 4 bits. i.e log2(cache block
size)=word or block offset=OFFSET
line/index offset=log2(cache size/block size)=SET
TAG bit size= processor address size - (line offset + word offset)
41. bytes occupied by:near=2 far=4 huge=4
42. To perform 'n' 'instructions' in a 'pipelined processor' time taken is k + (n - 1)
cycles,where k is the number of segments.
43.
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓 𝑜𝑝𝑐𝑜𝑑𝑒 = 𝑇𝑜𝑡𝑎𝑙 𝑖𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝑠𝑖𝑧𝑒 − (𝑛𝑜. 𝑜𝑓 𝑎𝑑𝑑𝑟 𝑓𝑖𝑒𝑙𝑑𝑠 * 𝑛𝑢𝑚 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓 𝑒𝑎𝑐ℎ 𝑎𝑑𝑑𝑟
𝑓𝑖𝑒𝑙𝑑
(𝑛𝑢𝑚 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓 𝑜𝑝𝑐𝑜𝑑𝑒)
○ 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑜𝑛𝑠 = 2
○ 𝑁𝑜 𝑜𝑓 𝑜𝑝𝑐𝑜𝑑𝑒𝑠 𝑢𝑛𝑢𝑠𝑒𝑑 𝑖𝑛 𝑛 𝑎𝑑𝑑𝑟𝑒𝑠𝑠 𝑖𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛𝑠 = 𝑛𝑢𝑚 𝑜𝑓 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑜𝑛𝑠 −
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛 𝑎𝑑𝑑𝑟𝑒𝑠𝑠 𝑖𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛𝑠
○ 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 (𝑛 − 1) 𝑎𝑑𝑑𝑟𝑒𝑠𝑠 𝑖𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛𝑠 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 = 𝑁𝑜. 𝑜𝑓 𝑜𝑝𝑐𝑜𝑑𝑒𝑠 𝑢𝑛𝑢𝑠𝑒𝑑 𝑖𝑛 𝑛 𝑎𝑑𝑑𝑟 𝑖𝑛𝑠𝑡𝑟
(𝑎𝑑𝑑𝑟 𝑓𝑖𝑒𝑙𝑑 𝑠𝑖𝑧𝑒)
𝑓𝑜𝑟𝑚𝑎𝑡 * 2

(𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑎𝑑𝑑𝑟𝑒𝑠𝑠𝑖𝑛𝑔 𝑚𝑜𝑑𝑒𝑠)


44. 𝑙𝑜𝑔2 2 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑓𝑜𝑟 𝑎𝑑𝑑𝑟𝑒𝑠𝑠𝑖𝑛𝑔 𝑚𝑜𝑑𝑒 𝑝𝑎𝑟𝑡
(𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑟𝑒𝑔𝑖𝑠𝑡𝑒𝑟𝑠)
𝑙𝑜𝑔22 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑓𝑜𝑟 𝑟𝑒𝑔𝑖𝑠𝑡𝑒𝑟𝑠(𝑟𝑒𝑔𝑖𝑠𝑡𝑒𝑟 𝑐𝑜𝑑𝑒 𝑝𝑎𝑟𝑡)
(𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑤𝑜𝑟𝑑𝑠)
𝑙𝑜𝑔22 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑓𝑜𝑟 𝑖𝑑𝑒𝑛𝑡𝑖𝑓𝑦𝑖𝑛𝑔 𝑎 𝑤𝑜𝑟𝑑(𝐴𝑑𝑑𝑟𝑒𝑠𝑠 𝑝𝑎𝑟𝑡)

𝑂𝑝𝑐𝑜𝑑𝑒 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓 𝑚𝑒𝑚𝑜𝑟𝑦 𝑢𝑛𝑖𝑡 − (𝑛𝑢𝑚 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓(𝑎𝑑𝑑 𝑚𝑜𝑑𝑒 𝑝𝑎𝑟𝑡 + 𝑎𝑑𝑑𝑟 + 𝑟𝑒𝑔 𝑝𝑎𝑟𝑡))

45. Size of Memory = No of words (Addresses) * No of bits per word


46. Characteristics used in the design of RISC processor:
● Register to Register Arithmetic operations
● Hardwired control unit
OS

1. With 4 byte entries in the page table we can reference 2^32 pages. Since each page is
2^13 B long, the maximum addressable physical memory size is 2^32 * 2^13 = 2^45 B
(assuming no protection bits are used).
2. 1 KB = 1024 bytes( 2 ^10 bytes)
3. 1 MB = 2 ^20 bytes
4. 1 GB = 2 ^30 bytes
5. Self-contained sequence of instructions that performs a given computational task is
called a function
6. A page fault occurs when an access to a page that has not been brought into main
memory takes place
7. FCFS suffers from BELADY’S ANOMALY
8. A time sharing system imply more than one program in memory
9. User Level thread cannot be scheduled by a kernel as these threads are managed by
thread library and the kernel is not aware of them
10. Effective access time = Hit ratio*Time during hit + Miss Ratio * Time During Miss
11. context switching can occur only in kernel mode
12. Shortest remaining time first scheduling is a preemptive version of shortest job
scheduling. It may cause starvation as shorter processes may keep coming and a long
CPU burst process never gets CPU.
13. Preemption may cause starvation. If priority based scheduling with preemption is used,
then a low priority process may never get CPU.
14. Round Robin Scheduling improves response time as all processes get CPU after a
specified time.
15. Round Robin Scheduling does not use the prior knowledge of burst time of processes
16. Long term scheduler controls the degree of mutliprogramming.It selects processes from
the queue and loads them into memory for execution. Process loads into the memory for
CPU scheduling.
17. Medium-term scheduling is a part of swapping. It removes the processes from the
memory.It reduces the degree of multiprogramming. The medium-term scheduler is
in-charge of handling the swapped out-processes.
18. Short Term scheduler selects processes which are ready to execute
19. SSTF is certainly an improvement over FCFS as it decreases the average response time
and increases the throughput of system
Disadvantages:
Overhead to calculate seek time in advance
Can cause Starvation for a request if it has higher seek time as compared to incoming
requests
High variance of response time as SSTF favors only some requests
20. SCAN---> Elevator
21. In fixed partition the degree of multiprogramming is bounded by the number of partitions
22. In paging size of the physical address=paging bits+ offset bits
(Hint: paging bits are basically the page table entry size and make sure to add (-1) to it
if it contains any valid bit and offset bits are 𝑙𝑜𝑔 (𝑝𝑎𝑔𝑒 𝑠𝑖𝑧𝑒 𝑜𝑟 𝑓𝑟𝑎𝑚𝑒 𝑠𝑖𝑧𝑒) as page
2
size= frame size)
23. While using semaphores remember that Wait (P/Sleep/Down) decrements the value of
its argument while signal(V/Signal/Wakeup) increments it
𝑢𝑠𝑒𝑓𝑢𝑙 𝑡𝑖𝑚𝑒
24. % CPU utilization =
𝑡𝑜𝑡𝑎𝑙 𝑡𝑖𝑚𝑒
* 100 where useful time=Number of processes per
minute * Burst time of each process and Total time=60 seconds
25. Thrashing is a condition or a situation when the system is spending a major portion of its
time servicing the page faults, but the actual processing done is very negligible.
26. Thrashing can be avoided if the pages, belonging to working set of programs, are in
main memory
27. The circular wait condition can be avoided by defining a linear ordering of resource
types

FLAT
2𝑛
1. Running time of DFA: O(n) and Running time of NFA =O( 𝑚 ), where m is the number of
nodes and n is the length of the input string
𝑚
2. The construction time for DFA from an equivalent NFA (m number of node)is: O( 2 )
3. If n is the length of Input string and m is the number of nodes, the running time of DFA is
x that of NFA is : 1/(m^2)
4. NFA, while computing strings, takes parallel paths, makes different copies of input and
goes along different paths in order to search for the result. This creates the difference in
processing speed of DFA and NFA. Hence NFA is slower to process and its
representation uses less memory
5. Closure properties of regular languages - union(sometimes closed under infinite
union), concatenation, intersection, difference, complement, reversal
6. Closure properties of context free languages - union, concatenation, kleene closure
7. Closure properties of deterministic context free languages - complement
8. Closure properties of recursive languages - union, concatenation, intersection,
complement, kleene closure
9. Closure properties of recursive enumerable languages - union, intersection
10. PDA-->accepts regular and context free grammar
11. Finite automata with output---> moore and mealy
12. Moore machine is a FA in which the output is associated with State only
13. Mealy machine is a FA in which the output is associated with State and Input
14. D-PDA AND ND-PDA cannot handle same set of languages
15. A regular language is a language that can be expressed with a regular expression or a
deterministic or non-deterministic finite automata or state machine.
Example:L2={ all strings of equal number of a's and b's } is not a regular language
16. The languages which can be accepted by PDA are called context-free languages (CFL)
17. Turing machine accepts all languages especially recursive enumerable languages
18. Language not accepted by Turing machine—> Diagonalization language as it is not
recursively enumerable.
19. The Language Accepted by Linear Bounded Automata is called Context
Dependent/sensitive language
20. A linear bounded automaton is a multi-track non-deterministic Turing machine with a
tape of some bounded finite length.
21. Context-sensitive Language: The language that can be defined by context-sensitive
grammar is called CSL. Properties of CSL are :
○ Union, intersection and concatenation of two context-sensitive languages is
context-sensitive.
○ Complement of a context-sensitive language is context-sensitive.
22. Power of deterministic finite automata is equivalent to power of non-deterministic
finite automata.
23. Power of deterministic Turing machine is equivalent to power of non-deterministic
Turing machine.
24. But Power of deterministic pushdown automata is not equivalent to the power of
nondeterministic pushdown automata.
25. Power of a deterministic Halting Turing machine is equivalent to the power of a
nondeterministic HaltingTuring machine.
26. When an NFA is converted into equivalent DFA accepting the same state the number of
states sometimes remains the same
27. Also when an NFA is converted into equivalent DFA the number of states is always
exponential to the number of states of NFA i.e if NFA contains n states then DFA
𝑛
contains at most 2 states.
𝑡ℎ
28. DFA that accepts the set of all strings over {0, 1} where the 𝑖 symbol from the right end
𝑖
is given then that DFA has 2 states
29. Intersection of a CFL with a regular language is always a CFL
30. Intersection of a CFL may or may not produce a CFL as CFL is not closed under
Intersection
31. Intersection of CFLs is always a CSL
32. The complement of CFL is always a CSL
33. CFL is not closed under intersection,complement and difference
34. A PDA can be defined in two equivalent models having acceptance by final state or
acceptance by empty store.
35. CFLs over a single alphabet are regular
*
36. L = {ww|w ϵΣ } is a standard CSL that is not a CFL(and hence not regular). This can be
shown using pumping lemma for CFLs
37. If L1 and L2 are accepted by a DPDA Machine then we can construct a NDPDA to
accept L1 ∪ L2(as it requires nondeterminism and cannot be a DCFL)
38.
39. The Transition Function for Transition Graph is:
* 𝑄×Σ
δ: 𝑄 × Σ → 2
40. To Construct minimal state DFA that accepts set of all binary no. which is r mod n
if n is odd then ans is n states
else if n is even check n=2^k format if this format is satisfied then k+1 states exist
(if in the question it is given that all the strings over {0,1} is starting with 1 then we need
to add 2 to the result that we get from applying the above algorithm)

DBMS

1. Every conflict serializable Schedule are view serializable schedule but the converse is
not true
2. Any view serializable schedule that is not conflict serializable must have blind writes
3. To check conflict serializability: draw precedence graph. Schedule is conflict serializable
if there are no cycles in graph
4. Dependency preservation is not always possible in BCNF. As BCNF is stricter than 3NF,
it cannot guarantee for it always.
5. Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples
then the maximum and minimum sizes of the join respectively are mn and 0
6. 1NF - No multivalued attribute (all relations databases are in 1NF)
7. 2NF - No partial dependency (PD - Proper subset of candidate key -> non prime attr)
8. 3NF - LHS of functional dependencies should be super key or RHS is a prime attr
9. BCNF - LHS of all FD are super key
10. Prime attribute - Attribute of candidate key
11. Candidate key - Minimal super key
12. cardinality--> number of tuples
13. Users who use easy-to-use menu are called naive users
14. Database level closer to user-->external
15. A set of possible data values is called Domain
16. Another name for weak entity-->Child
17. database object which physically doesn't exist--> view
18. Conceptual model is independent of both hardware and software
19. Relational ALgebra is procedural query language
20. A subschema expresses an external view
21. View of Total database content is called conceptual view
22. Charles Bachman along with his team invented the first DBMS known as Integrated Data
Store (IDS).
23. Decentralized--> is not a type of database
24. The important features of a database management system are:
1) Minimum Duplication and Redundancy of Data
2) High Level of Security
3) Multiple-user Access
4) Support ACID Property
25. The components of DBMS are as follows:
1) Hardware: Like a hard drive, monitor, etc.
2) Software: Provides a user interface
3) Data Manager: Manages operations of DBMS.
4) Data: The collection of information on the DB is known as data.
5) Data Languages: Languages like DDL, DML, DAL, and DCL allow you to perform
operations like creating, modifying, storing, or retrieving data.
26. Redundancy is dangerous as it is a potential threat to consistency
27. DBA is more concerned about the conceptual level of DBMS
28. There are two levels at which we can discuss the goodness of relational schema:
1)-->Conceptual/logical:how users interpret the relation schemas and the meaning of
their attributes
2)-->Implementation/physical storage level
29. A functional dependency is a property of the semantics or the meaning of the attributes
30. A relation is in 1NF if it doesn't contain any composite or multivalued attribute.It does not
eliminate redundancy
31. 2NF is based on the concept of full functional dependency. A relation must never have
partial dependency(i.e no non-prime attribute
(attributes which are not part of any candidate key) is dependent on any proper subset of
any candidate key of the table.)
32. 2NF has less redundancy compared to 1NF but they may still suffer from update
anomalies which is caused by Transitive dependency
33. Transitive dependencies can be removed by 3NF
34. A relation is in 3NF if at least one of the following condition holds in every non-trivial
functional dependency X –> Y:
X is a super key.
Y is a prime attribute (each element of Y is part of some candidate key).
35. A relation is in BCNF if X is superkey for every functional dependency (FD) X->Y in a
given relation.
36. BCNF may always not possible with dependency preservation however it always
satisfies lossless join condition
37. The way a particular application views the data from the database that the
application uses is a :Sub-schema
38. locking can be used for lost update
39. ER model comes under object based logical model
40. following are relational databases :
a) 4th Dimensions
b) FoxPro
c) dbase-IV
41. in relational schema each tuple is divided into fields called DOMAIN
42. A DBMS contains application programs called BPL
43. Transaction X holds a shared lock R. if transaction Y requests for a shared lock on R it
will be Immediately Granted
44. A report generator is used to print files on a paper
45. The modify operation is likely to be done after the look – up operation. The lookup
transformation performs lookups by joining data in input columns with columns in a
reference dataset. Lookups can be used to access additional information.
46. Manager's salary details are hidden from the employee . This is called External level
data hiding.
47. The distinguishable parts of a record are called files
48. A data dictionary does not provide info about the size of the disk storage device
49. use of preemption and transaction Rollback prevents deadlock situation
50. physical level abstraction shows how data are stored in database
51. B+ trees are preferred over Binary trees because disk access is much slower than
memory access
52. ER model is a top down approach
53. relations produced from ER diagram will be in 1NF
54. Information about data is called metadata
55. Identifying set should be associated with weak entity set for it to be meaningful
56. Inner join do not preserve non-matched tuples
57. Left outer join returns all the rows from the table that is on the left side and
matching rows on the right side of the join.
58. Inner join returns all rows when there is at least one match in BOTH tables.
59. Natural join returns the common columns from the tables being joined.
60. A right outer join returns all the rows from the table that is on the right side and matching
rows on the left side of the join.
61. 4NF forms have a relation that contains info about a single entity
62. The top level of hierarchy consists of catalogs each of which can contain schemas
63. Schemas represent the logical configuration of the DBMS. Catalogs consist of
metadata of the objects and system settings used.
64. The oldest Db model is a network
65. most 3NF tables are free of insertion, update, and deletion anomalies
66. The RDBMS table is sometimes regarded as “normalized” if it is in the Third Normal
Form.
67. Slicing is known as the process of viewing crosstab with a fixed value of one attribute
68. Ntil() functions construct histograms and use buckets for ranking
69. If some entities and relationships are given then the relationship which is “many to
many” will be considered as a separate table while relationships like one to
many,many to one and one to one together with the entities given will be considered
as a table.(sometimes questions will be asked to find the minimum number of tables to
represent the above entities and relationships so in such cases follow what the above
statement says)
70. Specialization is a top down process
71. If D1, D2, .., Dn are domains in a relational model, then the relation is a table, which
is a subset of D1×D2× … ×Dn

You might also like