0% found this document useful (0 votes)
14 views8 pages

OS+&+SP+Recall+Quiz+Questions

Uploaded by

avi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views8 pages

OS+&+SP+Recall+Quiz+Questions

Uploaded by

avi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

OS & SP Recall Quiz

1) An Operating System is
- facilitator
- application
- text Editor
- government

2) Which command is used to know the current working directory?


- pwd
- cwd
- ls
- cd

3) Which command is used to rename a file?


- mv
- rename
- cp
- rnm

4) Which command is used to copy a file?


- cmp
- cpy
- cp
- copy

5) Which command helps to know about the details of a command?


- man
- date
- cut
- help

6) How do you redirect the error messages to a file error.txt?


- > error.txt
- < error.txt
- 2> error.txt
- >> error.txt

7) Which of the following metacharacter represents any character (except newline)


- .
- *
- ?
- +
8) In vi command mode, what is the command to copy 5 lines?
- 5copy
- 5yy
- 5cpy
- 5cp

9) _____ helps output of one process become input of other (most effective way).
- >
- <
- >>
- |

10) Which is the best way to search for data in a text file?
- Search
- Find
- Look
- Grep

11) Which is the first line in a shell script?


- #!/bin/bash
- #Hello World
- #!/bash
- #!/bin

12) In shell script, which symbol is used to denote a comment?


- /* */
- //
- #
- %

13) Shell math can be performed with


- Expr
- [ ]
- a and b
- math
14) To execute a script file FILE1, how do you set the permissions?
- Chmod +rw FILE1
- Chmod +w FILE1
- Chmod +r FILE1
- Chmod +x FILE1

15) What is the output for the following code snippet?


val=15
$ echo “The cost of the item is val”

- The cost of the item is 15


- The cost of the item is $val
- The cost of the item is val
- The cost of the item is $15

16) Which special variable holds the exit status of the last executed command?
- $?
- $#
- $!
- #!

17) In an if conditional statement how do you check the condition?


- Test command can be used
- [ condition ]
- a or b
- expr

18) how do you compare numerical values in a if statement?


- If test $n1 eq $n2
- If [ $n1 eq $n2 ]
- If test $n1 = $n2
- a or b

19) Which environment variable helps in identifying field separators?


- IFS
- PATH
- HOME
- PS
20) What are looping statement?
- While
- For
- Until
- All the above

21) What is the unique identification for every file in a hard disk?
- file descriptor
- inode number
- file pointer
- file identifier

22) Which is the flag for opening a file in Read-Write mode?


- O_READWRITE
- O_RDWRONLY
- "rw"
- O_RDWR

23) The stages of instruction pipelining are


- Fetch, decode, execute, memory read, write back
- Fetch, execute, decode, write back, memory read
- Decode, fetch, execute, memory read, write back
- Memory read, decode, execute, fetch, write back

24) What is NOT true about interrupts?


- Interrupts are caused by hardware
- Interrupt handler is executed
- Processor execution mode switches to protected/kernel mode
- Interrupts result in always aborting the application

25) What would the following code snippet do?


creat(“sample”,0555);
- create a file called as sample with r-xr-xr-x permission
- create and open a file called as sample for reading only
- change the mode of the file called as sample to r-xr-xr-x
- create and open a file called as sample for reading & writing
26) A system call is NOT
- A part of processor instruction set architecture
- Enforces the processor to switch from user mode to kernel mode
- The interface for the services of the OS
- An application programming interface(API)

27) Which of the following is NOT a file management related system call
- read()
- Write()
- fork()
- close()

28) Which of the signals cannot be handled ?


- SIGINT
- SIGSTOP
- SIGTERM
- SIGCHLD

29) Which system call is used for waiting for a particular process?
- wait()
- hold()
- waitpid()
- stall()

30) What is shared and is common between parent & child?


- data
- open file descriptors
- stack
- all of the options

31) How is fifo different from pipes, with the context of IPC
- fifo has a name
- all the options are true
- fifo can be used for unrelated processes
- fifo can be created using commands too
32) Threads do not have the overhead of:
- all the options seem true
- having PID, PPID
- managing IPCS
- managing user & group IDs

33) The process of saving the state of one process/thread and restoring the state of another for
execution is called
- Loading
- Context switching
- Dispatching
- Linking

34) If multi processes are reading from the same fifo sequentially, then:
- data will be shared
- all the data will be stored by the latest process
- fifo will not allow multi processes sequentially
- data once read will be deleted, and the new process only gets remaining data

35) File descriptors are _________ between threads of a process


- Private
- shared
- partially shared
- restricted

36) An IPC mechanism provides at least two operations.


- Write and delete a message
- Delete and receive a message
- Send and delete a message
- Receive and send a message

37) What are the models of IPC?


- Shared memory model
- Message passing
- Both A and B
- None
38) Which IPC mechanism is suitable for processes with parent-child relationship?
- FIFO
- Pipe
- Shared memory
- Message queue

39) Which IPC takes care of synchronization?


- Message Queue
- Shared Memory
- Pipe
- FIFO

40) POSIX stands for


- Portable Operating System Interaction
- Portable Operating System Interface
- Preemptive Operating System Interface
- Preemptive Operating Sleep Interface

41) All the static data is stored in


- Stack
- Heap
- data segment
- text segment

42) Which of the following command is used for remote connection:


- Ssh
- Send
- Ipcs
- write

43) The address generated by the CPU is


- Physical address
- Logical address
- Virtual address
- Logical or Virtual address
44) The command used for checking connectivity and connection speed is
- Poke
- Test
- Check
- ping

45) The address generated by the MMU is


- Physical address
- Logical address
- Virtual address
- None of the above

46) Version control systems support tracking which kind of files?


- Text files, Word Documents
- Source code files
- Audio files, Images
- All of the options

47) GIT is a
- Centralized version control system
- Distributed version control system
- Integrated Development Environment
- Dubugging system

48) “Git init” command is used to ______________


- To start git
- To initialize git
- To create or initialize a repository
- To initialize the project

49) Where is the project folder stored in git?


- .git folder
- .profile folder
- .repository folder
- .stage folder

You might also like