Important Points For Comprehensive
Important Points For Comprehensive
COA
𝑂𝑝𝑐𝑜𝑑𝑒 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓 𝑚𝑒𝑚𝑜𝑟𝑦 𝑢𝑛𝑖𝑡 − (𝑛𝑢𝑚 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑜𝑓(𝑎𝑑𝑑 𝑚𝑜𝑑𝑒 𝑝𝑎𝑟𝑡 + 𝑎𝑑𝑑𝑟 + 𝑟𝑒𝑔 𝑝𝑎𝑟𝑡))
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