There are two modes of operation in the operating system to make sure it works correctly. These are user mode and kernel mode.They are explained as follows −User ModeThe system is in user mode when the operating system is running a user application such as handling a text editor. The transition from user mode to kernel mode occurs when the application requests the help of operating system or an interrupt or a system call occurs.The mode bit is set to 1 in the user mode. It is changed from 1 to 0 when switching from user mode to kernel mode.Kernel ... Read More
Supervisor mode or privileged mode is a computer system mode in which all instructions such as privileged instructions can be performed by the processor. Some of these privileged instructions are interrupt instructions, input output management etcThe privilege levels of different components in a system is given as follows −The kernel is the most privileged part of the computer system. There are some privileged instructions that can only be executed in kernel mode or supervisor mode. The the privilege reduces for device drivers and applications respectively.Features of Supervisor ModeSome of the important features of supervisor mode are as follows −Supervisor mode ... Read More
There are two modes of operation in the operating system to make sure it works correctly. These are user mode and kernel mode.A diagram that illustrates the transition from user mode to kernel mode and back again is as follows −The following are the modes −User Mode:The system is in user mode when the operating system is running a user application such as handling a text editor. The transition from user mode to kernel mode occurs when the application requests the help of operating system or an interrupt or a system call occurs.The mode bit is set to 1 in ... Read More
With the help of the following query we can create a stored procedure to generate five random numbers −mysql> DELIMITER // mysql> DROP PROCEDURE IF EXISTS RandomNumbers; -> CREATE PROCEDURE RandomNumbers() -> BEGIN -> SET @i = 0; -> REPEAT -> SELECT RAND() AS 'Random Number'; -> SET @i = @i + 1; -> UNTIL @i >=5 END REPEAT; -> END -> // Query OK, 0 rows affected (0.16 sec) Query OK, 0 rows affected (0.16 sec)Now, invoke the procedure to ... Read More
Real time systems are those systems that work within strict time constraints and provide a worst case time estimate for critical situations. Embedded systems provide a specific function in a much larger system. When there is an embedded component in a real time system, it is known as a real time embedded system.Types of Real Time Embedded SystemsThere are primarily two types of real time embedded systems i.e. hard and soft. An illustration to explain this further is −Hard Real Time Embedded SystemThis type of system makes sure that all critical processes are completed within the given time frame. This ... Read More
Following is a procedure that counts the number of rows get affected by MySQL query −mysql> Delimiter // mysql> CREATE PROCEDURE `query`.`row_cnt` (IN command VarChar(60000)) -> BEGIN -> SET @query = command; -> PREPARE stmt FROM @query; -> EXECUTE stmt; -> SELECT ROW_COUNT() AS 'Affected rows'; -> END // Query OK, 0 rows affected (0.00 sec) mysql> Delimiter ; mysql> Create table Testing123(First Varchar(20), Second Varchar(20)); Query OK, 0 rows affected (0.48 sec) mysql> CALL row_cnt("INSERT INTO testing123(First,Second) Values('Testing First','Testing Second');"); +---------------+ | Affected rows | +---------------+ | 1 | +---------------+ 1 row in set (0.10 sec) Query OK, 0 rows affected (0.11 sec)
Open Source operating systems are released under a license where the copyright holder allows others to study, change as well as distribute the software to other people. This can be done for any reason. The different open source operating system available in the market are −CosmosThis is an open source operating system written mostly in programming language C#. Its full form is C# Open Source Managed Operating System. Till 2016, Cosmos did not intend to be a fully fledged operating system but a system that allowed other developers to easily build their own operating systems. It also hid the inner ... Read More
Files are used to provide a uniform view of data storage by the operating system. All the files are mapped onto physical devices that are usually non volatile so data is safe in the case of system failure.File AttributesThe attributes of a file may vary a little on different operating systems. However, the common file attributes are −NameThis denotes the symbolic name of the file. The file name is the only attribute that is readable by humans easily.IdentifierThis denotes the file name for the system. It is usually a number and uniquely identifies a file in the file system.TypeIf there ... Read More
MySQL scalar subquery returns exactly one column value from one row and we can use it where a single column is permissible. Followings are the cases when scalar subqueries return value other than one row −Case1 − When it returns 0 rowsIn case if the subquery returns 0 rows then the value of scalar subquery expression would be NULL.Case2 − When it returns more than one rowsIn case if the subquery returns more than one row then, due to the property of scalar subquery, MySQL returns an error.It can be understood with the help of an example which uses the ... Read More
Storage management plays an important part in operating system. It deals with the storage procedures in the computer system using an operating system. Details about this is as follows −Memory ManagementMemory management plays an important part in operating system. It deals with memory and the moving of processes from disk to primary memory for execution and back again.The most important concepts in memory management are paging and segmentation. Details about these topics are given below −PagingIn a computer system, virtual memory can be created that is more than the actual memory available i.e. physical memory. To implement this, the concept ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP