answersLogoWhite

0

📱

Operating Systems

Operating systems, both proprietary and open-source, include those produced by Microsoft, Linux, and Apple Mac

4,423 Questions

What are the uses of rtos?

* Enables real-time, deterministic scheduling and task prioritization

* Abstracts away the complexities of the processor

* Provides a solid infrastructure constructed of rules and policies

* Simplifies development and improves developer productivity

* Integrates and manages resources needed by communications stacks and middleware

* Optimizes use of system resources

* Improves product reliability, maintainability and quality

* Promotes product evolution and scaling

What is the difference between task-switching and multitasking?

When a person is task switching, they are working on one thing at a time. If a person is multitasking, they are working on more than one thing at once.

What is the name of Google's operating system?

Google has publicly released two operating systems, ChromeOS and Android.

ChromeOS is a webtop based on Google's Chrome browser and Google's suite of web services. First announced in 2009, Google received a patent for it entitled "Network based Operating System across Devices".

Android is an operating system targetted at smartphones and webtops. Google first announced plans to cooperate in building a smartphone in 2007 and shipped the first Android smartphones in late 2008.

When a user-level thread executes a system call not only is that thread blocked but also all the threads within the process are blocked Why is that so?

A system call is actually a transition from user mode to kernel space to carry out a required operation..

For exp: Write() function resides in kernel space and can be accessed by a only corresponding wrapper function which was implemented in user space.. In case of Windows OS, Win32 API is the implementation to such as wrapper functions that make the actual system calls from user mode..

A kernel thread is created, scheduled and destroyed by the kernel..

Whereas a library thread (user thread) is created, scheduled and destroyed by a user level library like special threading libraries.. The kernel does know of nothing about library threads since they live in a process's boundaries and bound to its life cycle tightly..

Actually, a process is not the primary execution unit in all operating systems..

When a process is made by kernel, a new kernel thread is created and attached to that process in question..

So the library threads created in user mode by a user mode library must share the time slices given to the kernel thread by the scheduler arbitrarily during the lifetime of a process..

So a process actually has one kernel thread and all other library threads have to share the kernel thread's cycles..

Hence when a library thread makes a blocking call, all the threads within the process are blocked because as I said, actually process has only one kernel thread assigned to it and others try to make use of it..

So to prevent other threads from blocking, either you should use library threads that make use of kernel threads or you could just use the CreateThread() Win32 API system function for kernel threads but the synchronization mechanism must be provided by the programmer using events, signals, mutex, semaphore etc..

Sun, BSD Unix flavours, Windows etc follow the same threading architecture in their systems as POSIX standard..

However, a thread is a process in Linux.. That's why Linux is so powerful in server systems.. So the control is left to programmers to create a POSIX way of treading model by Clone(2) system call(s).. So address space and data etc can be shared by lightweight processes easily.. When a Linux kernel thread (child process) is crashed, it won't affect the rest of the threads belong to parent process.. This is just the opposite in other operating systems that a crashing thread will destroy all of the threads in the process..

NPTL is a great threading library that was implemented by using Linux clone(2) system call.. Linux also has another type of kernel thread only lives in kernel space that can be utilized by kernel code like modules..

User threads can't be run in parallel on the different CPUs because of this. However, they are portable..

Kernel threads can be scheduled by kernel to be run on a SMP system..

Hope this helps..

hsaq19@ TH Algan

Difference between monolithic and microlithic kernel?

Main classification of kernel:

Monolithic & microlithic

Monolithic kernel is a large program ,which contains different modules and they can interact each other . New modules can be dynamically linked or inserted in it.Ie at run time, and we do not want to reboot the system.

Microlithic kernel contains different modules .They may be linked together .These modules can communicate with those modules ,which are linked with it.We can only statically insert a new module in it.And when inserting a new module ,we have to link it with other modules to whom with which it has to communicate.

Retheesh Soman & Saneeth P R

Vadakara,Calicut

Ph:9947874780

8 Explain concurrency control issues in real time systems?

• Concurrency control is the problem of synchronizing concurrent transactions (i.e., order the operations of concurrent transactions) such that the following two propertiesare achieved:

- the consistency of the DB is maintained

- the maximum degree of concurrency of operations is achieved

• Obviously, the serial execution of a set of transaction achieves consistency, if each single transaction is consistent

Conflicts

• Conflicting operations: Two operations Oij (x) and Okl(x) of transactions Ti and Tk

are in conflict iff at least one of the operations is a write, i.e.,

- Oij = read(x) and Okl = write(x)

- Oij = write(x) and Okl = read(x)

- Oij = write(x) and Okl = write(x)

• Intuitively, a conflict between two operations indicates that their order of execution is important.

• Read operations do not conflict with each other, hence the ordering of read operations does not matter.

• Example: Consider the following two transactions

T1: Read(x)

x ← x + 1

Write(x)

Commit

T2: Read(x)

x ← x + 1

Write(x)

Commit

- To preserve DB consistency, it is important that the read(x) of one transaction is not between read(x) and write(x) of the other transaction.

Schedules

• A schedule (history) specifies a possibly interleaved order of execution of the operations O of a set of transactions T = {T1, T2, . . . , Tn}, where Ti is specified by a partial order (Σi , ≺i). A schedule can be specified as a partial order over O, where - ΣT =Sn i=1 Σi - ≺T ⊇ Sn i=1 ≺I - For any two conflicting operations Oij , Okl ∈ ΣT , either Oij ≺T Okl or Okl ≺T Oij

• A schedule is serial if all transactions in T are executed serially.

• Example: Consider the following two transactions

T1: Read(x)

x ← x + 1

Write(x)

Commit

T2: Read(x)

x ← x + 1

Write(x)

Commit

- The two serial schedules are S1 = {Σ1, ≺1} and S2 = {Σ2, ≺2}, where

Σ1 = Σ2 = {R1(x), W1(x), C1, R2(x), W2(x), C2}

≺1= {(R1, W1),(R1, C1),(W1, C1),(R2, W2),(R2, C2),(W2, C2),

(C1, R2), . . . }

≺2= {(R1, W1),(R1, C1),(W1, C1),(R2, W2),(R2, C2),(W2, C2),

(C2, R1), . . . }

• We will also use the following notation:

- {T1, T2} = {R1(x), W1(x), C1, R2(x), W2(x), C2}

- {T2, T1} = {R2(x), W2(x), C2, R1(x), W1(x), C1}

Serializability

• Two schedules are said to be equivalent if they have the same effect on the DB.

• Conflict equivalence: Two schedules S1 and S2 defined over the same set of

transactions T = {T1, T2, . . . , Tn} are said to be conflict equivalent if for each pair

of conflicting operations Oij and Okl , whenever Oij <1 Okl then Oij <2 Okl.

- i.e., conflicting operations must be executed in the same order in both transactions.

• A concurrent schedule is said to be (conflict-)serializable iff it is conflict equivalent to a serial schedule

• A conflict-serializable schedule can be transformed into a serial schedule by swapping non-conflicting operations

• Example: Consider the following two schedules

T1: Read(x)

x ← x + 1

Write(x)

Write(z)

Commit

T2: Read(x)

x ← x + 1

Write(x)

Commit

- The schedule {R1(x), W1(x), R2(x), W2(x), W1(z), C2, C1} is

conflict-equivalent to {T1, T2} but not to {T2, T1}

Concurrency Control Algorithms

• Taxonomy of concurrency control algorithms

- Pessimistic methods assume that many transactions will conflict, thus the concurrent

execution of transactions is synchronized early in their execution life cycle

∗ Two-Phase Locking (2PL)

· Centralized (primary site) 2PL

· Primary copy 2PL · Distributed 2PL

∗ Timestamp Ordering (TO)

· Basic TO

· Multiversion TO

· Conservative TO

∗ Hybrid algorithms

- Optimistic methods assume that not too many transactions will conflict, thus delay

the synchronization of transactions until their termination

∗ Locking-based

∗ Timestamp ordering-based

DDB 2008/09 J. Gamper Page 10Locking Based Algorithms

• Locking-based concurrency algorithms ensure that data items shared by conflicting operations are accessed in a mutually exclusive way. This is accomplished by associating a "lock" with each such data item.

• Two types of locks (lock modes)

- read lock (rl) - also called shared lock

- write lock (wl) - also called exclusive lock

• Compatibility matrix of locks rli(x) wli(x) rlj (x) compatible not compatible

wlj (x) not compatible not compatible

• General locking algorithm

1. Before using a data item x, transaction requests lock for x from the lock manager

2. If x is already locked and the existing lock is incompatible with the requested lock, the transaction is delayed

3. Otherwise, the lock is granted Locking Based Algorithms

• Example: Consider the following two transactions

T1: Read(x)

x ← x + 1

Write(x)

Read(y)

y ← y − 1

Write(y)

T2: Read(x)

x ← x ∗ 2

Write(x)

Read(y)

y ← y ∗ 2

Write(y)

- The following schedule is a valid locking-based schedule (lri(x) indicates the

release of a lock on x):

S = {wl1(x), R1(x), W1(x), lr1(x)

wl2(x), R2(x), W2(x), lr2(x)

wl2(y), R2(y), W2(y), lr2(y)

wl1(y), R1(y), W1(y), lr1(y)}

- However, S is not serializable

∗ S cannot be transformed into a serial schedule by using only non-conflicting swaps

∗ The result is different from the result of any serial execution

Two-Phase Locking (2PL)

• Two-phase locking protocol

- Each transaction is executed in two phases

∗ Growing phase: the transaction obtains locks

∗ Shrinking phase: the transaction releases locks

- The lock point is the moment when transitioning from the growing phase to the

shrinking phase Two-Phase Locking (2PL) . . .

• Properties of the 2PL protocol

- Generates conflict-serializable schedules

- But schedules may cause cascading aborts

∗ If a transaction aborts after it releases a lock, it may cause other transactions that

have accessed the unlocked data item to abort as well

• Strict 2PL locking protocol

- Holds the locks till the end of the transaction

- Cascading aborts are avoided

DDB 2008/09 J. Gamper Page 14Two-Phase Locking (2PL) . . .

• Example: The schedule S of the previous example is not valid in the 2PL protocol:

S = {wl1(x), R1(x), W1(x), lr1(x)

wl2(x), R2(x), W2(x), lr2(x)

wl2(y), R2(y), W2(y), lr2(y)

wl1(y), R1(y), W1(y), lr1(y)}

- e.g., after lr1(x) (in line 1) transaction T1 cannot request the lock wl1(y) (in line 4).

- Valid schedule in the 2PL protocol

S = {wl1(x), R1(x), W1(x),

wl1(y), R1(y), W1(y), lr1(x), lr1(y)

wl2(x), R2(x), W2(x),

wl2(y), R2(y), W2(y), lr2(x), lr2(y)}

Timestamp Ordering . . .

• Basic timestamp ordering is "aggressive": It tries to execute an operation as soon as it receives it

• Conservative timestamp ordering delays each operation until there is an assurance that it will not be restarted, i.e., that no other transaction with a smaller timestamp can arrive

- For this, the operations of each transaction are buffered until an ordering can be established so that rejections are not possible

• If this condition can be guaranteed, the scheduler will never reject an operation

• However, this delay introduces the possibility for deadlocks

• Multiversion timestamp ordering

- Write operations do not modify the DB; instead, a new version of the data item is created: x1, x2, . . . , xn

- Ri(x) is always successful and is performed on the appropriate version of x, i.e., the version of x (say xv) such that wts(xv) is the largest timestamp less than ts(Ti)

- Wi(x) produces a new version xw with ts(xw) = ts(Ti) if the scheduler has not

yet processed any Rj (xr) on a version xr such that ts(Ti) < rts(xr)

i.e., the write is too late.

- Otherwise, the write is rejected.

• The previous concurrency control algorithms are pessimistic

• Optimistic concurrency control algorithms

- Delay the validation phase until just before the write phase

- Ti

run independently at each site on local copies of the DB (without updating the DB) - Validation test then checks whether the updates would maintain the DB consistent:

∗ If yes, all updates are performed ∗ If one fails, all Ti 's are rejected

• Potentially allow for a higher level of concurrency

Deadlock Management

• Deadlock: A set of transactions is in a deadlock situation if several transactions wait for each other. A deadlock requires an outside intervention to take place.

• Any locking-based concurrency control algorithm may result in a deadlock, since there is mutual exclusive access to data items and transactions may wait for a lock

• Some TO-based algorihtms that require the waiting of transactions may also cause deadlocks

• A Wait-for Graph (WFG) is a useful tool to identify deadlocks

- The nodes represent transactions

- An edge from Ti to Tj indicates that Ti is waiting for Tj

- If the WFG has a cycle, we have a deadlock situation

• Deadlock management in a DDBMS is more complicate, since lock management is not

centralized

• We might have global deadlock, which involves transactions running at different sites

• A Local Wait-for-Graph (LWFG) may not show the existence of global deadlocks

• A Global Wait-for Graph (GWFG), which is the union of all LWFGs, is needed

Deadlock Prevention

• Deadlock prevention: Guarantee that deadlocks never occur

- Check transaction when it is initiated, and start it only if all required resources are available.

- All resources which may be needed by a transaction must be predeclared

• Advantages

- No transaction rollback or restart is involved

- Requires no run-time support

• Disadvantages

- Reduced concurrency due to pre-allocation

- Evaluating whether an allocation is safe leads to added overhead

- Difficult to determine in advance the required resources

Conclusion

• Concurrency orders the operations of transactions such that two properties are

achieved: (i) the database is always in a consistent state and (ii) the maximum

concurrency of operations is achieved

• A schedule is some order of the operations of the given transactions. If a set of

transactions is executed one after the other, we have a serial schedule.

• There are two main groups of serializable concurrency control algorithms: locking based and timestamp based

• A transaction is deadlocked if two or more transactions are waiting for each other. A Wait-for graph (WFG) is used to identify deadlocks

• Centralized, distributed, and hierarchical schemas can be used to identify deadlocks

How can you use in kaspersky internet security in two operating system?

for dual/multi boot you can use the same license.

but you need a separate license for vmware since kaspersky detects the machine and detects it's running the same keyfile and will deactivate itself.

Hope this will helpful you.

Regards

When was Distributed Concurrent Versions System created?

Distributed Concurrent Versions System was created in 2002.

What does an operating room provide to a patient?

It provides a safe place to have surgery.

Part of being safe includes: Only qualified doctors are licensed to use an operating room.

It is a surgically 'clean' environment, and all its surfaces are washable - even the operating table and the lights, so infection is kept to a minimum. This is usually done in between patients.

It has all the necessary equipment to carry out surgery safely.

It is very well prepared to deal with any emergency that may arise.

The air is continually purified, also to prevent infection.

There is equipment to help gauge how much blood a patient has lost, and the anaesthetist will replace the fluid either with a special drip or a blood transfusion.

There are facilities for continual monitoring of the patient's vital signs, such as blood pressure, heart rate, heart rhythm etc. The anaesthetist will keep the anaesthetic deep enough to keep the patient asleep, and will sit at the patient's head and keep watch that all is well with the patient.

What is kernel what are the main function of kernel?

A kernel is the core component of an operating system that manages system resources and facilitates communication between hardware and software. Its main functions include managing memory, processing tasks, and handling input/output operations. The kernel acts as an intermediary, ensuring that applications can effectively utilize hardware resources while maintaining system stability and security. Additionally, it provides essential services such as process scheduling and inter-process communication.

What is fork in operating system?

Fork is a funciton used to duplicate a process. The newly created process is called "child process" and the origingal one is called "parent process". The two processes will differ only in PID (Process ID).

What does LPIC mean?

(LPIC) Linux Professional Institute Certification

There are 3 levels, sometimes shown as LPIC-1, LPIC-2, and LPIC-3. On-Line video training is available at O'reilly: Prepare for the Linux Professional Institute 201 and 202 Exams By Linux System Admin expert John E. Meister Jr.

As of July-2016, the first 15 study guides are free.

What other operating systems exist besides Windows?

For personal use the big ones are Windows and Leopard for MacOS (Apple computers). There are a number of Linux flavors which exist. Another OS is ReactOS. That is a free, open source clone of Windows, though it has a long ways to go.

There's a full list of Operating Systems on Wikipedia. Search "list of current operating systems"