Yes they can , it can grow out their business a lot , promotion work great for a business
<h2>This function will land up in infinite function call</h2>
Explanation:
first time when the function gets invoked,
f(6,8), so k=6 & n=8, inside the function it checks k==n, ie. 6==8, returns false, then one more if is available, so 6>8 is check for , once again it is false and else loop is executed, the function is called recursively using f(k-n,n), that is f(6-8,8), it means f(-2,8) is passed.
Second time,
if(-2==8) is false, so if(-2>8) is again false and function f(-10, 8) is called
if(-10==8) is false, so if(-10>8) is again false and function f(-18,8) is called
if(-18==8) is false, so if(-18>8) is again false and function f(-26,8) is called
So this goes recursively and ends in an infinite function call.
Answer:
Explanation:
To maintain data consistency and integrity in a large multi-user system, transactions are completed concurrently with the aid of concurrency management techniques.
The following are some of the benefits of concurrent transaction processing and execution versus serial transaction processing and/or execution:
Improved Resource Usage:
A transaction frequently combines both CPU and Input/output activities, resulting in better resource usage. Computers have the ability to run disks and CPUs in parallel. As a result, transactions can also be executed in parallel, with one employing the usage of the CPU and the other using the disk. As a result, resources are better used than in serial transaction processing and execution.
Improved throughput:
Running transactions in parallel has an immediate impact of increasing throughput since a greater number of transactions can be completed in the same period of time.
Lower/shorter waiting time:
Reduced wait time: When transactions are processed sequentially and serially, a short transaction is forced to wait for a longer transaction. Because transactions usually affect distinct portions of the database. As such, it's best if they happen at the same time i.e it is run concurrently.
The characteristics listed above are critical to a system's performance.
Thus, It is obvious that the benefits of concurrency exceed the extra programming work necessary to execute transactions concurrently. As a result, database systems must handle concurrent transactions despite the additional work necessary since it is worthwhile.