Write syntax for following commands: i)Sleep ii)Kill

1 Answer

Answer :

i)sleep

Syntax:

sleep NUMBER[SUFFIX]…

sleep OPTION

ii) kill

Syntax: kill pid

Related questions

Description : Write Unix command for following: i)create a folder OSY ii) create a file FIRST in OSY folder iii) List/display all files and directories. iv) Write command to clear the screen

Last Answer : i) create a folder OSY: $mkdir OSY ii)create a file FIRST in OSY folder: $cd OSY $cat>FIRST or $ touch FIRST iii) List/display all files and directories: $ls iv) to clear screen: $clear

Description : List any four features of open source operating system.

Last Answer : 1. Open Source: open source OS code is freely available and it is community based development project. Multiple team's works in collaboration to enhance the capability of operating system and it is ... issuing a command in Linux Terminal or Shell. Linux can also run Windows applications if needed.

Description : Enlist different file allocation methods? Explain contiguous allocation method in detail.

Last Answer : From the user's point of view, a file is an abstract data type. It can be created, opened, written, read, closed and deleted without any real concern for its implementation. The implementation of a ... a times is difficult to estimate. 4. Compaction may be required and it can be very expensive.

Description : List free space management techniques? Describe any one in detail.

Last Answer : A file system is responsible to allocate the free blocks to the file therefore it has to keep track of all the free blocks present in the disk. There are mainly four approaches by using which, the free ... block. This block contains a pointer to the next free disk block, and so on.

Description : Explain LRU page replacement algorithm for following reference string. 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 Calculate the page fault.

Last Answer : LRU: The Least Recently Used (LRU) page replacement policy replaces the page that has not been used for the longest period of time. LRU replacement associates with each page the time of that page's last use. ... in question so assume frame size as 3 or 4) LRU: Assume frame size=3

Description : Explain multithreading model in detail.

Last Answer : Many systems provide support for both user and kernel threads, resulting in different multithreading models. Following are three multithreading model: Many-to-One Model The many-to- ... True concurrency cannot be achieved. Multiple threads of kernel is an overhead for operating system

Description : Enlist the operating system tools. Explain any two in detail.

Last Answer : Following are the operating tools: User Management Security policy Device Management Performance Monitor Task Scheduler A) User management: User management includes everything ... routing tables, interface statistics, masquerade connections, and multicast memberships. # netstat -tulpn

Description : Explain PCB with diagram.

Last Answer : Each process is represented as a process control block (PCB) in the operating system. It contains information associated with specific process. Process State: It indicates current state of a process. ... . Each PCB gives information about a particular process for which it is designed.

Description : Explain Round Robin algorithm with suitable example.

Last Answer : It is preemptive scheduling algorithm. A small unit of time known as a time quantum or time slice is used for pre-emption of a currently running process. Ready queue is implemented as a circular ... has received 1 time quantum, the CPU returns to process P1 for an additional time quantum. 

Description : State and describe types of scheduler.

Last Answer : There are three types of scheduler: Long term scheduler Short term scheduler Medium term scheduler 1. Long term scheduler: It selects programs from job pool and loads them into the ... scheduler works in close communication with long term scheduler for loading process into the main memory. 

Description : What is purpose of system call? State two system calls with their functions.

Last Answer : System call provides an interface between a running program and operating system. It allows user to access services provided by operating system. This system calls are procedures written using C, ... send, receive messages transfer status information attach or detach remote devices. 

Description : Describe sequential and direct access method.

Last Answer : Sequential access: Information from the file is processed in order i.e. one record after another. It is commonly used access mode. For example, editors and compilers access files in sequence. A read ... prevent the user from accessing portions of the file system that may not be part of his file.

Description : Explain partitioning and its types.

Last Answer : An important operation of memory management is to bring programs into main memory for execution by the processor. Partitioning is a technique that divides a memory into multiple partitions. These partitions ... in memory. For example: Consider following table with process and memory space.

Description : Explain deadlock? What are necessary conditions for deadlock?

Last Answer : In multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources and if the resources are not available then the process enters into the ... Each process is waiting for the resources held by other waiting processes in circular form.

Description : Describe I/O Burst and CPU Burst cycle with neat diagram.

Last Answer : CPU burst cycle: It is a time period when process is busy with CPU.  I/O burst cycle: It is a time period when process is busy in working with I/O resources. A process execution consists ... cycle and so on. The final CPU burst cycle ends with a system request to terminate execution.

Description : With neat diagram explain inter process communication model.

Last Answer : Inter-process communication: Cooperating processes require an Interprocess communication (IPC) mechanism that will allow them to exchange data and information. There are two models of IPC 1. ... a communication link between them. Between each pair of processes exactly one communication link.

Description : List components of OS. Explain process management in detail.

Last Answer : List of System Components: 1. Process management 2. Main memory management 3. File management 4. I/O system management 5. Secondary storage management Process Management: The operating ... synchronization. 4. A mechanism for process communication. 5. A mechanism for deadlock handling.

Description : Enlist types of operating system. Explain multiprogramming OS in detail.

Last Answer : Types of operating system 1.Batch Systems 2.Multiprogramming 3.Multitasking 4.Time-Sharing Systems 5.Desktop Systems 6.Distributed system 7.Clustered system 8.Real Time system: Multiprogramming ... multiprogramming: user can open word, excel, access and other applications in a system.

Description : Describe any four file attributes

Last Answer : File attributes: Name: The symbolic file name is the only information kept in human readable form. Identifier: File system gives a unique tag or number that identifies file within file ... Last modification and last use. These data can be useful for protection, security and usage monitoring.

Description : Define virtual memory

Last Answer : Virtual memory is a memory management capability of an operating system (OS) that uses hardware and software to allow a computer to compensate for physical memory shortages by temporarily transferring data ... can be placed in overlays, but can concentrate instead on the problem to be programmed. 

Description : Explain any four scheduling criteria.

Last Answer : 1. CPU utilization: In multiprogramming the main objective is to keep CPU as busy as possible. CPU utilization can range from 0 to 100 percent. 2.Throughput: It is the number of processes ... fairly early and can continue computing new results while previous results are being output to the user.

Description : Draw process state diagram.

Last Answer : process state diagram

Description : Explain any 4 services provided by OS.

Last Answer : 1.User Interface: All operating systems have a user interface that allows users to communicate with the system. Three types of user interfaces are available: a. Command line interface ( ... to system resources. Security is provided by user authentication such as password for accessing information.

Description : Define real time operating system. List its any four applications of it.

Last Answer : Real time Operating System: A real time system has well defined fixed time constraints. Processing should be done within the defined constraints -Hard and Soft real time system. OR The ... Applications: 1. Flight Control System 2. Simulations 3. Industrial control 4. Military applications

Description : With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below: -Technology

Last Answer : (i) select TName, Passenger from Train T, Reservation R where T.TrainId=R.TrainId;(ii) select T.* from Train T, Reservation R where T.TrainId!=R.TrainId;(iii)TrainIdTNameSourceDestination3424Lucknow MailLucknowNew Delhi5400Century ExpressNew DelhiKanpur

Description : Write the output for the following commands: (i) ls –a (ii) date “+%D”

Last Answer : i) ls –a : list all files including hidden files. These are files that start with “.”. ii) date “+%D” : Display date as mm/dd/yy. output: 11/26/19

Description : Which of the following commands would return process_id of sleep command? (A) Sleep 1 and echo $? (B) Sleep 1 and echo $# (C) Sleep 1 and echo $x (D) Sleep 1 and echo $!

Last Answer : (D) Sleep 1 and echo $!

Description : Consider the following two commands C1 and C2 on the relation R from an SQL database:  C1: drop table R; C2: delete from R; Which of the following statements is TRUE? I. Both C1 and C2 delete the schema for R. II. C2 ... R. (A) I only (B) I and II only (C) II and III only (D) I, II and III

Last Answer : (C) II and III only

Description : Describe use of following commands with example: i) route ii) net stat

Last Answer : Route: Packets are transmitted from one computer to another. The route determines where the process starts and what computer system needs to send the packet for it to reach its destination. In ... or softwaredefined network interface) and network protocol statistics. Options of Netstat:

Description : Which of the syntax is correct for insert statement? i) insert into values ii) insert into (column list) values A) i-only B) ii-only C) Both of them D) None of them

Last Answer : C) Both of them

Description : Give the syntax and use of following with respect to (i) get() (ii) put().

Last Answer : (i) get() function: The get() function is member of istream class. It is used to read a single character from the keyboard. Syntax of get() function: get(variable_name); example:  char c; ... /variable_name); example: cout.put( X ); The above example displays character X on the screen.

Description : Which one of the following describes the syntax of prolog program ? I. Rules and facts are terminated by full stop (.) II. Rules and facts are terminated by semicolon (;) III. Variables names must start with upper case alphabets. ... alphabets. Codes : (A) I, II (B) III, IV (C) I, III (D) II, IV

Last Answer : (C) I, III

Description : Consider the following statements related to compiler construction: I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. II. Syntax Analysis is specified by regular expressions and implemented by ... Only l (2) Only ll (3) Both I and II (4) Neither I nor Il

Last Answer : Answer: 4

Description : Write the commands to do the following operations on the dataframes given above : (i) To add dataframes df1 and df2. -Technology

Last Answer : import numpy as npimport pandas as pddf1 = pd.DataFrame({'mark1':[30,40,15,40],'mark2':[20,45,30,70]});df2 = pd.DataFrame({'mark1':[10,20,20,50],'mark2':[15,25,30,30]});print(df1)print(df2)(i) ... , inplace=True) print(df1)(iv) df1.rename(index = {0: 'zero', 1:'one'}, inplace = True) print(df1)

Description : Consider the following table Furniture. Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x). -Technology

Last Answer : SQL commands for the given statements (i) to (viii) ;1. SELECT FCODE, NAME. PRICE FROM Furniture WHERE PRICE < 5000;2. SELECT NAME. PRICE FROM Furniture3.4. WHERE NAME LIKE %table% ;5. SELECT DISTINCT WCODE ... ;15.16. Output for SQL queries (ix) and (x)(ix)SUM(PRICE)6500(x)COUNT(DISTINCT PRICE)5

Description : Write SQL Query commands based on the following table: -Technology

Last Answer : This answer was deleted by our moderators...

Description : Consider the decimal number x with value 8459.2654. Write commands in SQL to: i. round it off to a whole number -Technology

Last Answer : i. select round(8459.2654);ii.select round(8459.2654,-2);

Description : Consider the following SQL string: “Preoccupied” Write commands to display: (a)“occupied” (b)“cup” -Technology

Last Answer : commands to display:(a)“occupied” (b)“cup”

Description : Considering the same string “Preoccupied” Write SQL commands to display: (a) the position of the substring ‘cup’ in the string “Preoccupied” -Technology

Last Answer : (a)select instr 'Preoccupied' , ‘ 'cup'));(b)select left 'Preoccupied',4);

Description : Write the general formats for file opening and file closing commands?

Last Answer : Ans: For Opening:- fp=fopen(“filename” , “mode”); where ‘fp’ refers to the file pointer. ‘filename’ refers to the name of the file to be opened. ‘mode’ refers to the mode of accessing data. For Closing:- fclose(fp); where fp denotes the file pointer.

Description : What is function definition? (OR) what is user defined function? (OR) Write syntax of user defined function?

Last Answer : Function Definition : The program module that is written to achieve a specific task is called function definition. Syntax : type function-name(parameter list) // function header. { declaration of variables; body of function; // ... and b ); scanf( %d%d ,&a,&b); c=a+b; printf( %d ,c); }

Description : Write syntax to define a derived class

Last Answer : Syntax: class derived_class_name : visibility_mode/access_specifier base_class_name { class body };

Description : Write the syntax of switch case statement. 

Last Answer : switch(variable) { case value1: statements break; case value2: statements; break; . . . default: statements; break; }

Description : Define pointer. Write syntax for pointer declaration.

Last Answer : Definition: A pointer is a variable that stores memory address of another variable which is of similar data type.  Declaration: datatype *pointer_variable_name; 

Description : Write syntax and use of pow ()function of header file.

Last Answer : pow()- compute the power of a input value Syntax: double pow (double x, double y);

Description : Write syntax and example of : 1) drawRect() 2)drawOval()

Last Answer : 1)drawRect() : drawRect () method display an outlined rectangle. Syntax: void drawRect(int top,int left, int width,int height) The upper-left corner of the Rectangle is at top and left. The ... and height the following program draws several ellipses and circle. Example: g.drawOval(10,10,50,50);

Description : Write the syntax of try-catch-finally blocks.

Last Answer : try{ //Statements to be monitored for any exception } catch(ThrowableInstance1 obj) { //Statements to execute if this type of exception occurs } catch(ThrowableInstance2 obj2) { //Statements }finally{ //Statements which should be executed even if any exception happens }

Description : Write syntax to create view.

Last Answer : Create view as select OR CREATE VIEW name ASSELECT column1, column2.....FROM table_nameWHERE [condition];

Description : Write Syntax for create table.

Last Answer : Syntax of Create table: CREATE TABLE table_name(  column1 datatype (size),  column2 datatype(size),  column3 datatype(size),  ..... columnNdatatype(size)  );

Description : Write the syntax of entity and architecture used in VHDL and explain it.

Last Answer : Entity declaration: It defines the names. Input output signals and modes of a hardware module. Also it provides the external interface of an entity. It is a black box view. Syntax ... _name of entity_ name  Architecture_ declaration_ name;  begin  Statement;  end architecture_ name;