Sunday, November 29, 2009

CompTIA Security+ Practice Test Answers

Question 1
(corresponding objective: 1.3)

Creating a basic standard for application settings, security settings, and active services on every company laptop would be considered...

A. group policy
B. baseline configuration
C. patch management
*D. a security template

Question 2
(corresponding objective: 3.7)

All of the following are correct about LDAP EXCEPT:

A. some implementations use x.509 certificates for securing communications
B. some of the implementations use default TCP ports 389 and 636
* C. all attributes will be encrypted
D. most of the implementations use the x.500 directory model

Question 3
(corresponding objective: 1.6)

Which of the following is a key reason for using virtual machines in a test lab where attackers or malware may compromise a machine?

A. Easier for the attacker to compromise the machine
B. Harder for the attacker to compromise the machine
* C. Easier to restore the system to the original state
D. Harder to restore the system to the original state

Question 4
(corresponding objective: 1.1)

Which of the following is more of an irritation than a security threat?

A. Rootkit
* B. Adware
C. Spyware
D. Trojan

Question 5
(corresponding objective: 3.1)

Least privilege is defined as giving access to information:

A. based on tenure at the company
B. based on sense of urgency from management
C. that may be revealed to the public
* D. needed to complete the task

Question 6
(corresponding objective: 1.1)

Which of the following describes a piece of malicious code that is activated when specified conditions are met?

A. Trojan
B. Spyware
* C. Logic Bomb
D. Virus

Question 7
(corresponding objective: 4.6)

An administrator wishes to enable network auditing policies. Which of the following should the security administrator log?

A. Only logon failures
B. Only logon success
*C. Both logon successes and logon failures
D. Only logon failures for non-existent users

Question 8
(corresponding objective: 4.4)

From a security perspective a performance baseline is MOST useful for:

* A. detecting performance anomalies that may be due to security breaches
B. assuring that systems are working to their optimal capacity
C. knowing when security scans are going to finish
D. predicting the end of useful life for the firewall


Question 9
(corresponding objective: 2.5)

A company creates its own application that accesses the company databases and requires a unique login, based on the user’s domain account. The developer has an undocumented login for testing that does not need to be authenticated against the domain. Which of the following is a security issue regarding this scenario?

A. The login should be the same as the domain account for authentication purposes
* B. It can be used as a backdoor into the company’s databases
C. The application should not be deployed if it is not fully tested
D. It is not considered best practice to have a user remember multiple logins


Question 10
(corresponding objective: 2.1)

In order to perform a TCP hijacking attack, an attacker would be required to:

A. have a protocol analyzer intercept traffic between two hosts
* B. know the IP addresses of both hosts and sequence numbers of the TCP/IP packets
C. perform a man-in-the-middle attack and communicate directly with two hosts
D. obtain the MAC address of the both hosts

Linux+ Quesions

1. customer wants internal office information to be accessible by employees through a Web browser. Which of the following Linux services should be used?

A. Squid
B. MySQL
C. Apache
D. sendmail

Ans : C

2 : Which of the following should be done before installing Linux on a home computer?

A. Upgrade the computer's memory to at least 64 MB
B. Create ext2 and swap partitions on the hard drive
C. Verify the hardware on the Linux hardware compatibility list
D. Defragment the drive using the computer's current operating system

Ans : C

3. Which of the following packages is usually more important for a "workstation" installation than a "server" installation?

A. DNS Server
B. DHCP Server
C. Proxy Server
D. XFree86 Server

Ans : D


4. A new employee having a problem with account login has the following entry in the /etc/passwd file:
user1:*:51:501:John Doe:/home/user1:/bin/bash
What is wrong with this entry in the /etc/passwd file?

A. The UID is not valid.
B. The account is locked.
C. The UID and GID must match.
D. Spaces are not permitted between the first and last name.

Ans : B

5. After having worked for several months, a PC fails to boot and indicates that the HDD has bad sectors. Which is the first action to take?

A. Reboot the system to remove the message.
B. Run the manufacturer's Diagnostic Utility.
C. Replace the defective HDD and reload the system.
D. Run Scandisk and Defrag to repair the damaged sectors.

Ans: B


6. A customer wants to determine which TCP ports are in use on his Linux server. Which of the following commands should be used?

A. tftp
B. lsport
C. minicom
D. netstat

Ans : D


7. A Linux superuser is unable to delete a file. The user is also unable to change permission for the file. What is the problem?

A. The file is actually a hard link.
B. The file has the immutable flag set.
C. The file has been fragmented across directories.
D. The superuser does not have permission to access the file.

Ans : B


8. Which of the following commands can be used to save and resume editing the file in the vi editor?

A. :w
B. :x
C. :v
D. :s!

Ans : A

9. A system technician needs to determine which hardware modules are loaded on a particular Linux server. Which of the following commands will perform this task?

A. lsmod
B. modules
C. insmod -list
D. modprobe -list

Ans : lsmod

10. What is the first step in troubleshooting a system problem?

A. Collect information
B. Test a possible solution
C. Make a hypothesis about a solution
D. Try to modify the configuration files

Ans : A

Thursday, November 12, 2009

FresherQuestionPaper

001. In Linux, how can you only see the first 14 lines of a file?



002. In Linux, what can you type at a command line to determine which shell you are using?




003. In Linux, what is the command to list ALL (hidden also) files of current directory & it’s subdirectories?




004. List out some popular linux distributions.


005. What is an ip address and what is the use of it?






006. What are the 7 layers of OSI model ?






007. What does HTML stand for?




008. What does CSS stand for?




009. What does PHP stand for?




010. What does SQL stand for?



011. What does PERL stand for ?



012. Which SQL statement is used to extract data from a database?



013. Explain about cache memory and virtual memory.







014. What is a compiler and give an example for compiler?


.
015. Diffrence between Stack and Queue?




016. What is union and structure?





017. Diffrence between pass by value and pass ny reference?




018. What is the difference between "calloc(...)" and "malloc(...)"?




019. What is the difference between "printf(...)" and "sprintf(...)"?





020. What is the difference between an Interface and an Abstract class?





021. What is the purpose of garbage collection in Java, and when is it used?




022. Explain differences between Swing and Awt.




023. Explain about Overriding, Encapsulation and Inheritence.








024. What is serialization?





025. List out different types of JDBC drivers. Briefly explain about each type.





026. Explain the life cycle methods of a Servlet.?





027. What is the difference between servlets and JSP?




028. What is Throughput, Turnaround time?





029. Explain about the paging systems?





030. What is Deadlock?





031. Explain the meaning of the expression ACID transaction?







032. In SQL a statement, How can you compare a part of the name rather than the entire name?






033. How do you delete a record from a database?

034. How do you delete a table from a database?


035. In SQL, Explain usage of "GROUP BY" clause ?



036. In SQL, Differenciate between a "where" clause and a "having" clause ?




037. What's the difference between a primary key and a unique key?



038. Explain about cursors.




039. Explain about triggers.



040.
What is a self join?




041. Explain about normalization.






042. How do we find ip address in Windows and Linux?





043. Diffrence between WAN and LAN?





044. What is protocol?




045. Diffrence between HTTP and HTTPS?



046. What are the ports associated with the following Applications/Services?
FTP
Telnet
http
ssh
smtp




047. Explain about configuration management and list out some configuration management tools.




048. What is Remote Procedure Call (RPC)?





049. Explain about Symmetric and Asymmetric Encryptions.






050. Explain about following terms.
Bug
Testcase

Wednesday, November 11, 2009

System Admin Interview Questions

1. What port does telnet use?
2. What is SMTP?
3. How would you troubleshoot a printer?
4. How does traceroute work?
5. Walk me through everything that happens in the network from the moment you punch in www.google.com in the address bar to when the browser displays the page?
6. Can you work this weekend?
7. What kind of people are your current users? Do you like them?
8. What role do you think computer support analysts should play in the company?
9. Assuming you have to work for a living and all jobs pay the same, how would you describe the job you want?
10. When conflict arises on your team, how do you handle it?

11. How do you stay current?
12. What operating system do you prefer and why?
13. What part of the project life cycle have you worked on?
14. Describe the project or situation that best demonstrates your coding (or analytical) skills.
15. What is the differece between local, global and universal groups?
16. What is the major difference between FAT and NTFS?
17. Name the FMSO roles and their functions.
18. You’ve just been asked to create 20 new Users and update 2 GPOs, ASAP! You go to the Administrative Tools, and discover they are all gone. What do you do? What do you suspect happened?
19. What is a Global Catalog?
20. Explain the function of DNS.
21. Explain a “Two-Way Transitive” trust.
22. In speaking about trusts, what does “Non-transitive” mean?
23. Describe the lease process of DHCP.
24. Explain NTP.
25. What is the 568B wiring scheme?
26. What us your highest achievement while working in the IT field?
27. What are your short term goals to achieve?
28. You have a user call for support for the 5th time on the same issue. How would you handle the call and what would you do differently?
29. List as many ways you can think of to move a file from a Windows machine to a Linux machine.
30. Demonstrate recursiveness by implementing a factorial function.

Important Unix Shell Questions

1. There can be multiple Kernels and shells running on your system. True or False?
2. Why shell is called Command Interpreter?
3. Two UNIX systems may or may not use the same system calls. True or False?
4. To obtain help on any feature of the system, what are the possible help sources available?
5. Why are the directories /bin and /usr/bin usually found first in the output of echo $PATH?
6. If two commands with the same filename exist in two directories in PATH, how can they be executed.
7. How is the Current directory is indicated in the value of the PATH?
8. Use the type command with the following arguments—cd, date, pwd and ls. Which are the internal commands in the list?
9. What is the difference between an argument and an option?
10. if the command ls –all works on your system, which flavor of UNIX could you be using?
11. What does the secondary prompt look like and when does it appear?
12. You located the string crontab in a man page by searching with /crontab [Enter]. How do you find out the other occurrences of this string in the page?
13. What is a pager? Name the two standard pagers used by man.
14. If a command doesn’t seem to complete, which key will you press to interrupt it?
15. Do you need to wait for a command to finish before entering the next one?
16. What do the | and the three dots in the SYNOPSIS section of these man pages indicate as shown below?
/usr/xpg4/bin/tail [ -f | -r ]
/usr/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ] [file .. ]
17. How do you direct man to use a specific pager, say less?
18. What is a whitespace? Explain the treatment the shell metes out to a command that contains a lot of whitespace.
19. A Program file named foo exists in the current directory, but when we try to execute it by entering foo, we see the message foo: command not found. Explain how that can happen?
20. What do multiprogramming, multiuser and multitasking mean?
21. Why are many UNIX commands designed to perform simple rather than complex tasks?

Linux/Unix Shell related questions

1. How do you find out what’s your shell? - echo $SHELL
2. What’s the command to find out today’s date? - date
3. What’s the command to find out users on the system? - who
4. How do you find out the current directory you’re in? - pwd
5. How do you remove a file? - rm
6. How do you remove a directory and its subdirectories - rm -rf
7. How do you find out your own username? - whoami
8. How do you send a mail message to somebody? - mail somebody@techinterviews.com -s ‘Your subject’ -c ‘cc@techinterviews.com‘

9. How do you count words, lines and characters in a file? - wc
10. How do you search for a string inside a given file? - grep string filename
11. How do you search for a string inside a directory? - grep string *
12. How do you search for a string in a directory with the subdirectories recursed? - grep -r string *
13. What are PIDs? - They are process IDs given to processes. A PID can vary from 0 to 65535.
14. How do you list currently running process? - ps
15. How do you stop a process? - kill pid
16. How do you find out about all running processes? - ps -ag
17. How do you stop all the processes, except the shell window? - kill 0
18. How do you fire a process in the background? - ./process-name &
19. How do you refer to the arguments passed to a shell script? - $1, $2 and so on. $0 is your script name.
20. What’s the conditional statement in shell scripting? - if {condition} then … fi
21. How do you do number comparison in shell scripts? - -eq, -ne, -lt, -le, -gt, -ge
22. How do you test for file properties in shell scripts? - -s filename tells you if the file is not empty, -f filename tells you whether the argument is a file, and not a directory, -d filename tests if the argument is a directory, and not a file, -w filename tests for writeability, -r filename tests for readability, -x filename tests for executability
23. How do you do Boolean logic operators in shell scripting? - ! tests for logical not, -a tests for logical and, and -o tests for logical or.
24. How do you find out the number of arguments passed to the shell script? - $#
25. What’s a way to do multilevel if-else’s in shell scripting? - if {condition} then {statement} elif {condition} {statement} fi
26. How do you write a for loop in shell? - for {variable name} in {list} do {statement} done
27. How do you write a while loop in shell? - while {condition} do {statement} done
28. How does a case statement look in shell scripts? - case {variable} in {possible-value-1}) {statement};; {possible-value-2}) {statement};; esac
29. How do you read keyboard input in shell scripts? - read {variable-name}
30. How do you define a function in a shell script? - function-name() { #some code here return }
31. How does getopts command work? - The parameters to your script can be passed as -n 15 -x 20. Inside the script, you can iterate through the getopts array as while getopts n:x option, and the variable $option contains the value of the entered option.

Operating system questions

What is MUTEX ?
What isthe difference between a ‘thread’ and a ‘process’?
What is INODE?
Explain the working of Virtual Memory.
How does Windows NT supports Multitasking?

Explain the Unix Kernel.
What is Concurrency? Expain with example Deadlock and Starvation.
What are your solution strategies for “Dining Philosophers Problem” ?
Explain Memory Partitioning, Paging, Segmentation.
Explain Scheduling.
Operating System Security.
What is Semaphore?
Explain the following file systems : NTFS, Macintosh(HPFS), FAT .
What are the different process states?
What is Marshalling?
Define and explain COM?
What is Marshalling?
Difference - Loading and Linking ?

Basic Computer Networks Questions

Some of the Top Basic Computer Networks Questions, that must be Answered and known if you even think of attending any Networks/Network Admin Interviews.

1. Virtual meetings on Internet are called………….
2. LAN can be connected by devices called………..
3. The bit pattern …………… is the preamble of 802.3 frame format.
4. Basic SONET frame is a block of ……………. bytes.
5. The amount of thermal noise is measured by ………………..
6. Explain the Frequency Modulation.
7. What is WAN and where it is used? how it is different from LAN and MAN.
8. Explain single error detecting code with example.
9. What is Flow control? Explain.
10. Explain CSMA/CD Protocol.
11. Describe Multitasking.
12. Describe Service Primitives.
13. Explain briefly PCM and its requirements.
14. What is Concession Control describe i) Load shedding ii) Jitter Control. Under it.
15. What is QoS?
16. Token Bucket Algorithm is employed to prevent congestion. The capacity of the bucket is 250k byes Arriving rate of the token is 2MB/sec. if the maximum output rate is 25MB/sec, calculate the burst length in time.
17. Describe principles considered in the design of network layer in the internet.
18. Describe Address format used in Internet. [ With figure ]
19. A Network on the Internet has a Subnet mask of 255.255.240.0. What is the maximum No. of hosts it can handle?
20. What are basic difference between IPV4 and IPV6?
21. Describe Address Resolution Protocol, use diagram if required.
22. What is the difference between Interior gateway protocol and Exterior gateway protocol.
23. What is the function of ATM adaptation layer.
24. Illustrate the phenomenon of Silly Window Syndrome in TCP.
25. What is delayed duplicate problem?
26. Explain Unicast addresses, Multicast adresses, and broadcast address.

Networking Interview Questions and Answers

Networking Interview Questions and Answers :

1. What is an Object server?

With an object server, the Client/Server application is written as a set of communicating objects. Client object communicate with server objects using an Object Request Broker (ORB). The client invokes a method on a remote object. The ORB locates an instance of that object server class, invokes the requested method and returns the results to the client object. Server objects must provide support for concurrency and sharing. The ORB brings it all together.

2. What is a Transaction server?

With a transaction server, the client invokes remote procedures that reside on the server with an SQL database engine. These remote procedures on the server execute a group of SQL statements. The network exchange consists of a single request/reply message. The SQL statements either all succeed or fail as a unit.

3. What is a Database Server?

With a database server, the client passes SQL requests as messages to the database server. The results of each SQL command are returned over the network. The server uses its own processing power to find the request data instead of passing all the records back to the client and then getting it find its own data. The result is a much more efficient use of distributed processing power. It is also known as SQL engine.

4. What are the most typical functional units of the Client/Server applications?

* User interface
* Business Logic and
* Shared data.

5. What are all the Extended services provided by the OS?

* Ubiquitous communications
* Network OS extension
* Binary large objects (BLOBs)
* Global directories and Network yellow pages
* Authentication and Authorization services
* System management
* Network time
* Database and transaction services
* Internet services
* Object- oriented services

6. What are Triggers and Rules?

Triggers are special user defined actions usually in the form of stored procedures, that are automatically invoked by the server based on data related events. It can perform complex actions and can use the full power of procedural languages.
A rule is a special type of trigger that is used to perform simple checks on data.

7. What is meant by Transparency?

Transparency really means hiding the network and its servers from the users and even the application programmers.

8. What are TP-Lite and TP-Heavy Monitors?

TP-Lite is simply the integration of TP Monitor functions in the database engines. TP-Heavy are TP Monitors which supports the Client/Server architecture and allow PC to initiate some very complex multiserver transaction from the desktop.

9. What are the two types of OLTP?

TP lite, based on stored procedures. TP heavy, based on the TP monitors.

10. What is a Web server?

This new model of Client/Server consists of thin, protable, "universal" clients that talk to superfat servers. In the simplet form, a web server returns documents when clients ask for them by name. The clients and server communicate using an RPC-like protocol called HTTP.
11. What are Super servers?

These are fully-loaded machines which includes multiprocessors, high-speed disk arrays for intervive I/O and fault tolerant features.

12. What is a TP Monitor?

There is no commonly accepted definition for a TP monitor. According to Jeri Edwards' a TP Monitor is "an OS for transaction processing".

13. TP Monitor does mainly two things extremely well. They are Process management and Transaction management.?

They were originally introduced to run classes of applications that could service hundreds and sometimes thousands of clients. TP Monitors provide an OS - on top of existing OS - that connects in real time these thousands of humans with a pool of shared server processes.

14. What is meant by Asymmetrical protocols?

There is a many-to-one relationship between clients and server. Clients always initiate the dialog by requesting a service. Servers are passively awaiting for requests from clients.

15. What are the types of Transparencies?

The types of transparencies the NOS middleware is expected to provide are:-

* Location transparency
* Namespace transparency
* Logon transparency
* Replication transparency
* Local/Remote access transparency
* Distributed time transparency
* Failure transparency and
* Administration transparency.

16. What is the difference between trigger and rule?

The triggers are called implicitly by database generated events, while stored procedures are called explicitly by client applications.

17. What are called Transactions?

The grouped SQL statements are called Transactions (or) A transaction is a collection of actions embused with ACID properties.

18. What are the building blocks of Client/Server?

* The client
* The server and
* Middleware.

19. Explain the building blocks of Client/Server?

The client side building block runs the client side of the application.
The server side building block runs the server side of the application.

20. The middleware buliding block runs on both the client and server sides of an application. It is broken into three categories:-

* Transport stack
* Network OS
* Service-specific middleware.

21. What are all the Base services provided by the OS?

* Task preemption
* Task priority
* Semaphores
* Interprocess communications (IPC)
* Local/Remote Interprocess communication
* Threads
* Intertask protection
* Multiuser
* High performance file system
* Efficient memory management and
* Dynamically linked Run-time extensions.

22. What are the roles of SQL?

* SQL is an interactive query language for ad hoc database queries.
* SQL is a database programming language.
* SQL is a data definition and data administration language.
* SQL is the language of networked database servers
* SQL helps protect the data in a multi-user networked environment.
* Because of these multifacted roles it plays, physicists might call SQL as "The grand unified theory of database".

23. What is Structured Query Langauge (SQL)?

SQL is a powerful set-oriented language which was developed by IBM research for the databases that adhere to the relational model. It consists of a short list of powerful, yet highly flexible, commands that can be used to manipulate information collected in tables. Through SQL, we can manipulate and control sets of records at a time.

24. What are the characteristics of Client/Server?

* Service
* Shared resources
* Asymmentrical protocols
* Transparency of location
* Mix-and-match
* Message based exchanges
* Encapsulation of services
* Scalability
* Integrity

Client/Server computing is the ultimate "Open platform". It gives the freedom to mix-and-match components of almost any level. Clients and servers are loosely coupled systems that interact through a message-passing mechanism.

25. What is Remote Procedure Call (RPC)?

RPC hides the intricacies of the network by using the ordinary procedure call mechanism familiar to every programmer. A client process calls a function on a remote server and suspends itself until it gets back the results. Parameters are passed like in any ordinary procedure. The RPC, like an ordinary procedure, is synchoronous. The process that issues the call waits until it gets the results.

Under the covers, the RPC run-time software collects values for the parameters, forms a message, and sends it to the remote server. The server receives the request, unpack the parameters, calls the procedures, and sends the reply back to the client. It is a telephone-like metaphor.

26. What are the main components of Transaction-based Systems?

* Resource Manager
* Transaction Manager and
* Application Program.

27. What are the three types of SQL database server architecture?

* Process-per-client Architecture. (Example: Oracle 6, Informix )
* Multithreaded Architecture. (Example: Sybase, SQL server)
* Hybrid Architecture (Example: Oracle 7)

28. What are the Classification of clients?

Non-GUI clients - Two types are:-

1. Non-GUI clients that do not need multi-tasking
(Example: Automatic Teller Machines (ATM), Cell phone)
2. Non-GUI clients that need multi-tasking
(Example: ROBOTs)
GUI clients
OOUI clients

29. What are called Non-GUI clients, GUI Clients and OOUI Clients?

Non-GUI Client: These are applications, generate server requests with a minimal amount of human interaction.
GUI Clients: These are applicatoins, where occassional requests to the server result from a human interacting with a GUI
(Example: Windows 3.x, NT 3.5)
OOUI clients : These are applications, which are highly-iconic, object-oriented user interface that provides seamless access to information in very visual formats.
(Example: MAC OS, Windows 95, NT 4.0)

30. What is Message Oriented Middleware (MOM)?

MOM allows general purpose messages to be exchanged in a Client/Server system using message queues. Applications communicate over networks by simply putting messages in the queues and getting messages from queues. It typically provides a very simple high level APIs to its services.
MOM's messaging and queuing allow clients and servers to communicate across a network without being linked by a private, dedicated, logical connection. The clients and server can run at different times. It is a post-office like metaphor.

31. What is meant by Middleware?

Middleware is a distributed software needed to support interaction between clients and servers. In short, it is the software that is in the middle of the Client/Server systems and it acts as a bridge between the clients and servers. It starts with the API set on the client side that is used to invoke a service and it covers the transmission of the request over the network and the resulting response.
It neither includes the software that provides the actual service - that is in the servers domain nor the user interface or the application login - that's in clients domain.

32. What are the functions of the typical server program?

It waits for client-initiated requests. Executes many requests at the same time. Takes care of VIP clients first. Initiates and runs background task activity. Keeps running. Grown bigger and faster.

33. What is meant by Symmentric Multiprocessing (SMP)?

It treats all processors as equal. Any processor can do the work of any other processor. Applications are divided into threads that can run concurrently on any available processor. Any processor in the pool can run the OS kernel and execute user-written threads.

34. What are Service-specific middleware?

It is needed to accomplish a particular Client/Server type of services which includes:-

* Database specific middleware
* OLTP specific middleware
* Groupware specific middleware
* Object specific middleware
* Internet specific middleware and
* System management specific middleware.

35. What are General Middleware?

It includes the communication stacks, distributed directories, authentication services, network time, RPC, Queuing services along with the network OS extensions such as the distributed file and print services.

36. What is meant by Asymmetric Multiprocessing (AMP)?

It imposses hierarchy and a division of labour among processors. Only one designated processor, the master, controls (in a tightly coupled arrangement) slave processors dedicated to specific functions.

37. What is OLTP?

In the transaction server, the client component usually includes GUI and the server components usually consists of SQL transactions against a database. These applications are called OLTP (Online Transaction Processing) OLTP Applications typically,
Receive a fixed set of inputs from remote clients. Perform multiple pre-compiled SQL comments against a local database. Commit the work and Return a fixed set of results.

38. What is meant by 3-Tier architecture?

In 3-tier Client/Server systems, the application logic (or process) lives in the middle tier and it is separated from the data and the user interface. In theory, the 3-tier Client/Server systems are more scalable, robust and flexible.
Example: TP monitor, Web.

39. What is meant by 2-Tier architecture?

In 2-tier Client/Server systems, the application logic is either burried inside the user interface on the client or within the database on the server.
Example: File servers and Database servers with stored procedures.

40. What is Load balancing?

If the number of incoming clients requests exceeds the number of processes in a server class, the TP Monitor may dynamically start new ones and this is called Load balancing.

41. What are called Fat clients and Fat servers?

If the bulk of the application runs on the Client side, then it is Fat clients. It is used for decision support and personal software.
If the bulk of the application runs on the Server side, then it is Fat servers. It tries to minimize network interchanges by creating more abstract levels of services.

42. What is meant by Horizontal scaling and Vertical scaling?

Horizontal scaling means adding or removing client workstations with only a slight performance impact. Vertical scaling means migrating to a larger and faster server machine or multiservers.

43. What is Groupware server?

Groupware addresses the management of semi-structured information such as text, image, mail, bulletin boards and the flow of work. These Client/Server systems have people in direct contact with other people.

44. What are the two broad classes of middleware?

* General middleware
* Service-specific middleware.

45. What are the types of Servers?

* File servers
* Database servers Transaction servers Groupware servers
* Object servers Web servers.

46. What is a File server?

File servers are useful for sharing files across a network. With a file server, the client passes requests for file records over nerwork to file server.

47. What are the five major technologies that can be used to create Client/Server applications?

* Database Servers
* TP Monitors
* Groupware
* Distributed Objects
* Intranets.

48. What is Client/Server?

Clients and Servers are separate logical entities that work together over a network to accomplish a task. Many systems with very different architectures that are connected together are also called Client/Server.

49. List out the benefits obtained by using the Client/Server oriented TP Monitors?

* Client/Server applications development framework.
* Firewalls of protection.
* High availability.
* Load balancing.
* MOM integration.
* Scalability of functions.
* Reduced system cost.

50. What are the services provided by the Operating System?

Extended services - These are add-on modular software components that are layered on top of base service.

UNIX - LINUX Interview Questions and Answers :


1. How are devices represented in UNIX?

All devices are represented by files called special files that are located in/dev directory. Thus, device files and other files are named and accessed in the same way. A 'regular file' is just an ordinary data file in the disk. A 'block special file' represents a device with characteristics similar to a disk (data transfer in terms of blocks). A 'character special file' represents a device with characteristics similar to a keyboard (data transfer is by stream of bits in sequential order).

2. What is 'inode'?

All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode. In addition to descriptions about the file, the inode contains pointers to the data blocks of the file. If the file is large, inode has indirect pointer to a block of pointers to additional data blocks (this further aggregates for larger files). A block is typically 8k.
Inode consists of the following fields:

  • File owner identifier
  • File type
  • File access permissions
  • File access times
  • Number of links
  • File size
  • Location of the file data

3. Brief about the directory representation in UNIX

A Unix directory is a file containing a correspondence between filenames and inodes. A directory is a special file that the kernel maintains. Only kernel modifies directories, but processes can read directories. The contents of a directory are a list of filename and inode number pairs. When new directories are created, kernel makes two entries named '.' (refers to the directory itself) and '..' (refers to parent directory).
System call for creating directory is mkdir (pathname, mode).

4. What are the Unix system calls for I/O?

  • open(pathname,flag,mode) - open file
  • creat(pathname,mode) - create file
  • close(filedes) - close an open file
  • read(filedes,buffer,bytes) - read data from an open file
  • write(filedes,buffer,bytes) - write data to an open file
  • lseek(filedes,offset,from) - position an open file
  • dup(filedes) - duplicate an existing file descriptor
  • dup2(oldfd,newfd) - duplicate to a desired file descriptor
  • fcntl(filedes,cmd,arg) - change properties of an open file
  • ioctl(filedes,request,arg) - change the behaviour of an open file

The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations.

5. How do you change File Access Permissions?

Every file has following attributes:
owner's user ID ( 16 bit integer )
owner's group ID ( 16 bit integer )
File access mode word

'r w x -r w x- r w x'


(user permission-group permission-others permission)
r-read, w-write, x-execute
To change the access mode, we use chmod(filename,mode).
Example 1:
To change mode of myfile to 'rw-rw-r–' (ie. read, write permission for user - read,write permission for group - only read permission for others) we give the args as:
chmod(myfile,0664) .
Each operation is represented by discrete values

'r' is 4
'w' is 2
'x' is 1


Therefore, for 'rw' the value is 6(4+2).
Example 2:
To change mode of myfile to 'rwxr–r–' we give the args as:

chmod(myfile,0744).

6. What are links and symbolic links in UNIX file system?

A link is a second name (not a file) for a file. Links can be used to assign more than one name to a file, but cannot be used to assign a directory more than one name or link filenames on different computers.
Symbolic link 'is' a file that only contains the name of another file.Operation on the symbolic link is directed to the file pointed by the it.Both the limitations of links are eliminated in symbolic links.
Commands for linking files are:

Link ln filename1 filename2
Symbolic link ln -s filename1 filename2


7. What is a FIFO?

FIFO are otherwise called as 'named pipes'. FIFO (first-in-first-out) is a special file which is said to be data transient. Once data is read from named pipe, it cannot be read again. Also, data can be read only in the order written. It is used in interprocess communication where a process writes to one end of the pipe (producer) and the other reads from the other end (consumer).

8. How do you create special files like named pipes and device files?

The system call mknod creates special files in the following sequence.
1. kernel assigns new inode,
2. sets the file type to indicate that the file is a pipe, directory or special file,
3. If it is a device file, it makes the other entries like major, minor device numbers.
For example:
If the device is a disk, major device number refers to the disk controller and minor device number is the disk.

9. Discuss the mount and unmount system calls

The privileged mount system call is used to attach a file system to a directory of another file system; the unmount system call detaches a file system. When you mount another file system on to your directory, you are essentially splicing one directory tree onto a branch in another directory tree. The first argument to mount call is the mount point, that is , a directory in the current file naming system. The second argument is the file system to mount to that point. When you insert a cdrom to your unix system's drive, the file system in the cdrom automatically mounts to /dev/cdrom in your system.

10. How does the inode map to data block of a file?

Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large maximum file size with efficient access to large files, but also small files are accessed directly in one disk read.

11. What is a shell?

A shell is an interactive user interface to an operating system services that allows an user to enter commands as character strings or through a graphical user interface. The shell converts them to system calls to the OS or forks off a process to execute the command. System call results and other information from the OS are presented to the user through an interactive interface. Commonly used shells are sh,csh,ks etc.

12. Brief about the initial process sequence while the system boots up.

While booting, special process called the 'swapper' or 'scheduler' is created with Process-ID 0. The swapper manages memory allocation for processes and influences CPU allocation. The swapper inturn creates 3 children:

  • the process dispatcher,
  • vhand and
  • dbflush

with IDs 1,2 and 3 respectively.
This is done by executing the file /etc/init. Process dispatcher gives birth to the shell. Unix keeps track of all the processes in an internal data structure called the Process Table (listing command is ps -el).

13. What are various IDs associated with a process?

Unix identifies each process with a unique integer called ProcessID. The process that executes the request for creation of a process is called the 'parent process' whose PID is 'Parent Process ID'. Every process is associated with a particular user called the 'owner' who has privileges over the process. The identification for the user is 'UserID'. Owner is the user who executes the process. Process also has 'Effective User ID' which determines the access privileges for accessing resources like files.

  • getpid() -process id
  • getppid() -parent process id
  • getuid() -user id
  • geteuid() -effective user id

14. Explain fork() system call.

The `fork()' used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. We can tell which is which by checking the return value from `fork()'. The parent gets the child's pid returned to him, but the child gets 0 returned to him.

15. Predict the output of the following program code

main()
{
fork();
printf("Hello World!");
}


Answer:

Hello World!Hello World!


Explanation:

The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process.

16. Predict the output of the following program code

main()
{
fork(); fork(); fork();
printf("Hello World!");
}


Answer:
"Hello World" will be printed 8 times.
Explanation:
2^n times where n is the number of calls to fork()

17. List the system calls used for process management:

System calls Description

  • fork() To create a new process
  • exec() To execute a new program in a process
  • wait() To wait until a created process completes its execution
  • exit() To exit from a process execution
  • getpid() To get a process identifier of the current process
  • getppid() To get parent process identifier
  • nice() To bias the existing priority of a process
  • brk() To increase/decrease the data segment size of a process.

18. How can you get/set an environment variable from a program?

Getting the value of an environment variable is done by using `getenv()'. Setting the value of an environment variable is done by using `putenv()'.

19. How can a parent and child process communicate?

A parent and child can communicate through any of the normal inter-process communication schemes (pipes, sockets, message queues, shared memory), but also have some special ways to communicate that take advantage of their relationship as a parent and child. One of the most obvious is that the parent can get the exit status of the child.

20. What is a zombie?

When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls `wait()'; In the interval between the child terminating and the parent calling `wait()', the child is said to be a `zombie' (If you do `ps', the child will have a `Z' in its status field to indicate this.)

21. What are the process states in Unix?

As a process executes it changes state according to its circumstances. Unix processes have the following states:
Running : The process is either running or it is ready to run .
Waiting : The process is waiting for an event or for a resource.
Stopped : The process has been stopped, usually by receiving a signal.
Zombie : The process is dead but have not been removed from the process table.

CISCO (October, 2004)

CISCO (October, 2004)

1. In order to find out stack fault of a three input nand gate how many necessary input vectors
are needed ?

2. What is parity generation ?

3. A nand gate becomes ___ gate when used with negative logic ?

4. What is the advantage of cmos over nmos ?

5. What is the advantage of synchronous circuits over asynchronous circuits ?

6. What is the function of ALE in 8085 ?

7. A voice signal sample is stored as one byte. Frequency range is 16 Hz to 20 Hz. What is the
memory size required to store 4 minutes voice signal?

8. What will the controller do before interrupting CPU?

9. In a normalized floating point representation, mantissa is represented using 24 bits and exponent
with 8 bits using signed representation. What is range ?

10. The stack uses which policy out of the following-- LIFO, FIFO, Round Robin or none of these ?

11. Where will be the actual address of the subroutine is placed for vectored interrupts?

12. Give the equivalent Gray code representation of AC2H.

13.What is the memory space required if two unsigned 8 bit numbers are multiplied ?

14. The vector address of RST 7.5 in 8085 processor is _______.
Ans. 003C (multiply 7.5 by 8 and convert to hex)

15. Subtract the following hexadecimal numbers--- 8416 - 2A16

16. Add the following BCD numbers--- 1001 and 0100

17. How much time does a serial link of 64 Kbps take to transmit a picture with 540 pixels.

18. Give the output when the input of a D-flip flop is tied to the output through the XOR gate.

19. Simplify the ex-pression AB + A( B + C ) + B ( B + C )

20. Determine the logic gate to implement the following terms--ABC, A+B+C

21. Implement the NOR gate as an inverter.

22. What is the effect of temperature on the Icb in a transistor

23. What is the bit storage capacity of a ROM with a 512*4 organization?

24. What is the reason of the refresh operation in dynamic RAM's ?

25. Suppose that the D input of a flip flop changes from low to high in the middle of a clock pulse.
Describe what happens if the flip flop is a positive edge triggered type?

26. How many flip flops are required to produce a divide by 32 device ?

27. An active HIGH input S-R latch has a 1 on the S input and a 0 on the R input. What state is the
latch in?

28. Implement the logic equation Y = C^BA^ + CB^A + CBA with a multiplexer.
(where C^ stands for C complement)

29. Equivalent Gray code representation of AC2H.

30. What does a PLL consist of ?

We advice you to know the design of PLL as questions pertaining to this may be asked


II - Software Section

1. The starting location of an array is 1000. If the array[1..5/...4] is stored in row major order,
what is the location of element [4,3]. Each word occupies 4 bytes.

2. In a tertiary tree, which has three childs for every node, if the number of internal nodes are N,
then the total number of leaf nodes are

3. Explain the term "locality of reference" ?

4. What is the language used for Artificial Intelligence
Ans: lisp

5. What is the character set used in JAVA 2.0 ?
Ans: Unicode
6. char a =0xAA ;
int b ;
b = (int) a ;
b = b >> 4 ;
printf("%x",b);
What is the output of the above program segment ?

7. struct s1 { struct { struct { int x; } s2 } s3 }y; How does one access x in the above given structure
definition ?

8. Why there is no recursion in Fortran ?
Ans. There is no dynamic allocation.

9. What is the worst case complexity of Quick sort?
Ans. O(n2)

10. What will be sequence of operating system activities when an interrupt occurs ?

11. In a sequential search, what is the average number of comparisons it takes to search through n
elements ?
Ans: (n+1)/2.

12. What is the size of the array declared as double * X[5] ?
Ans. 5 * sizeof ( double * )

13. A binary search tree with node information as 1,2,3,4,5,6,7,8 is given. Write the result obtained
on preorder traversal of the binary search tree ?
Ans : 53124768

14. If size of the physical memory is 232-1, then what is the size of the virtual memory ?

15. S -> A0B A-> BB|0 B-> AA|1
How many strings of length 5 are possible with the above productions?

16. (3*4096+15*256+3*16+3). How many 1's are there in the binary representation of the result ?
Ans. 10

17. In memory mapped I/O how is I/O is accessed ?

18. What is the use of ALE in 8085 ?
Ans. To latch the lower byte of the address.

19. If the logical memory of 8 X 1024 is mapped into 32 frames, then the number of bits for the logical
address are____ ?
Ans. 13

20. Context free grammar is useful for which purpose ?

21. In ternary number representation, numbers are represented as 0,1,-1.(Here -1 is represented
as 1 bar.) How is 352/9 represented in ternary number representation?

22. There are processes which take 4,1,8,1 machine cycles respectively. If these are executed in round
robin fashion with a time quantum of 1, what is the time it take for process 4 to complete ?
Ans. 9

23. The minimum frequency of operation is specified for every processor because......
a) for interfacing slow peripherals
b) dynamic memory refreshing.
c) to make compatible with other processor.

24. For linked list implementation , which search is not applicable ?
Ans: Binary search.

25. Each character is represented by 7 bits, 1 bit is used to represent error bit and another bit for parity.
If total number of bits transmitted is 1200 bits, then what is the number of symbols that can be transmitted ?
Ans: 133

26. Explain set associatively of cache ?

27. Write the postfix form of the following ex-pression : A+[[(B+C)+( D+E)*F]/G]

28. What is the function of the linker?

29. void f(int y)
{
struct s *ptr;
ptr = malloc (sizeof (struct)+99*sizeof(int));
}
struct s
{
int i;
float p;
};
when free (ptr) is executed, what will happen?

30. To concatenate two linked lists strings, the order is O(1) is obtained for what kind of list

FAQ : OS concepts

Following are a few basic questions that cover the essentials of OS:

1. Explain the concept of Reentrancy.
It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.
Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

2. Explain Belady's Anomaly.
Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns.

3. What is a binary semaphore? What is its use?
A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.

4. What is thrashing?
It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.

5. List the Coffman's conditions that lead to a deadlock.
 Mutual Exclusion: Only one process may use a critical resource at a time.
 Hold & Wait: A process may be allocated some resources while waiting for others.
 No Pre-emption: No resource can be forcible removed from a process holding it.
 Circular Wait: A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain.


6. What are short-, long- and medium-term scheduling?
Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process.
Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria.
Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption.

7. What are turnaround time and response time?
Turnaround time is the interval between the submission of a job and its completion. Response time is the interval between submission of a request, and the first response to that request.

8. What are the typical elements of a process image?
*User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified.
* User program: The instructions to be executed.
* System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls.
* Process control Block (PCB): Info needed by the OS to control processes.

9. What is the Translation Lookaside Buffer (TLB)?
In a cached system, the base addresses of the last few referenced pages is maintained in registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced to just one physical memory access in cases of TLB-hit.

10. What is the resident set and working set of a process?
Resident set is that portion of the process image that is actually in real-memory at a particular instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.)
11. When is a system in safe state?
The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock.

12. What is cycle stealing?
We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle.

13. What is meant by arm-stickiness?
If one or a few processes have a high access rate to data on one track of a storage disk, then they may monopolize the device by repeated requests to that track. This generally happens with most common device scheduling algorithms (LIFO, SSTF, C-SCAN, etc). High-density multisurface disks are more likely to be affected by this than low density ones.

14. What are the stipulations of C2 level security?
C2 level security provides for:
 Discretionary Access Control
 Identification and Authentication
 Auditing
 Resource reuse

15. What is busy waiting?
The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.

16. Explain the popular multiprocessor thread-scheduling strategies.
 Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis.
 Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy.
 Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool.
 Dynamic scheduling: The number of thread in a program can be altered during the course of execution.

17. When does the condition 'rendezvous' arise?
In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered.

18. What is a trap and trapdoor?
Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition.

19. What are local and global page replacements?
Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only.

20. Define latency, transfer and seek time with respect to disk I/O.
Seek time is the time required to move the disk arm to the required track. Rotational delay or latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (if any) and latency is the access time. Time taken to actually transfer a span of data is transfer time.
22. What is time-stamping?
It is a technique proposed by Lamport, used to order events in a distributed system without the use of clocks. This scheme is intended to order events consisting of the transmission of messages. Each system 'i' in the network maintains a counter Ci. Every time a system transmits a message, it increments its counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receiving system 'j' sets its counter Cj to 1 more than the maximum of its current value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules: For messages x from site i and y from site j, x precedes y if one of the following conditions holds....(a) if Ti<Tj or (b) if Ti=Tj and i<j.

23. How are the wait/signal operations for monitor different from those for semaphores?
If a process in a monitor signal and no task is waiting on the condition variable, the signal is lost. So this allows easier program design. Whereas in semaphores, every operation affects the value of the semaphore, so the wait and signal operations should be perfectly balanced in the program.

24. In the context of memory management, what are placement and replacement algorithms?
Placement algorithms determine where in available real-memory to load a program. Common methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and one process (or part of a process) needs to be swapped out to accommodate a new program. The replacement algorithm determines which are the partitions to be swapped out.

25. In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?
For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the references are updated to a relative address from the start base address of the application module.
With run-time dynamic loading: Some of the linking is postponed until actual reference during execution. Then the correct module is loaded and linked.

26. What are demand- and pre-paging?
With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution. With pre-paging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices.

27. Paging a memory management function, while multiprogramming a processor management function, are the two interdependent?
Yes.

28. What is page cannibalizing?
Page swapping or page replacements are called page cannibalizing.

29. What has triggered the need for multitasking in PCs?
Increased speed and memory capacity of microprocessors together with the support fir virtual memory and
Growth of client server computing

30. What are the four layers that Windows NT have in order to achieve independence?
Hardware abstraction layer
Kernel
Subsystems
System Services.

31. What is SMP?
To achieve maximum efficiency and reliability a mode of operation known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.

32. What are the key object oriented concepts used by Windows NT?
Encapsulation
Object class and instance

33. Is Windows NT a full blown object oriented operating system? Give reasons.
No Windows NT is not so, because its not implemented in object oriented language and the data structures reside within one executive component and are not represented as objects and it does not support object oriented capabilities .

34. What is a drawback of MVT?
It does not have the features like
ability to support multiple processors
virtual storage
source level debugging

35. What is process spawning?
When the OS at the explicit request of another process creates a process, this action is called process spawning.

36. How many jobs can be run concurrently on MVT?
15 jobs

37. List out some reasons for process termination.
Normal completion
Time limit exceeded
Memory unavailable
Bounds violation
Protection error
Arithmetic error
Time overrun
I/O failure
Invalid instruction
Privileged instruction
Data misuse
Operator or OS intervention
Parent termination.

38. What are the reasons for process suspension?
  1. swapping
  2. interactive user request
  3. timing
  4. parent process request

39. What is process migration?
It is the transfer of sufficient amount of the state of process from one machine to the target machine

40. What is mutant?
In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.

41. What is an idle thread?
The special thread a dispatcher will execute when no ready thread is found.

42. What is FtDisk?
It is a fault tolerance disk driver for Windows NT.

43. What are the possible threads a thread can have?
 Ready
 Standby
 Running
 Waiting
 Transition
 Terminated.

44. What are rings in Windows NT?
Windows NT uses protection mechanism called rings provides by the process to implement separation between the user mode and kernel mode.

45. What is Executive in Windows NT?
In Windows NT, executive refers to the operating system code that runs in kernel mode.

46. What are the sub-components of I/O manager in Windows NT?
 Network redirector/ Server
 Cache manager.
 File systems
 Network driver
 Device driver

47. What are DDks? Name an operating system that includes this feature.
DDks are device driver kits, which are equivalent to SDKs for writing device drivers. Windows NT includes DDks.

48. What level of security does Windows NT meets?
C2 level security.

Linux 100 Questions

  1. You attempt to use shadow passwords but are unsuccessful. What characteristic of the /etc/passwd file may cause this? Choose one: a. The login command is missing. b. The username is too long. c. The password field is blank. d. The password field is prefaced by an asterick.
  2. You create a new user account by adding the following line to your /etc/passwd file. bobm:baddog:501:501:Bob Morris:/home/bobm:/bin/bash Bob calls you and tells you that he cannot logon. You verify that he is using the correct username and password. What is the problem? Choose one: a. The UID and GID cannot be identical. b. You cannot have spaces in the line unless they are surrounded with double quotes. c. You cannot directly enter the password; rather you have to use the passwd command to assign a password to the user. d. The username is too short, it must be at least six characters long.
  3. Which of the following tasks is not necessary when creating a new user by editing the /etc/passwd file? Choose one: a. Create a link from the user’s home directory to the shell the user will use. b. Create the user’s home directory c. Use the passwd command to assign a password to the account. d. Add the user to the specified group.
  4. You create a new user by adding the following line to the /etc/passwd file bobm::501:501:Bob Morris:/home/bobm:/bin/bash You then create the user’s home directory and use the passwd command to set his password. However, the user calls you and says that he cannot log on. What is the problem? Choose one: a. The user did not change his password. b. bobm does not have permission to /home/bobm. c. The user did not type his username in all caps. d. You cannot leave the password field blank when creating a new user.
  5. When using useradd to create a new user account, which of the following tasks is not done automatically. Choose one: a. Assign a UID. b. Assign a default shell. c. Create the user’s home directory. d. Define the user’s home directory.
  6. You issue the following command useradd -m bobm But the user cannot logon. What is the problem? Choose one: a. You need to assign a password to bobm’s account using the passwd command. b. You need to create bobm’s home directory and set the appropriate permissions. c. You need to edit the /etc/passwd file and assign a shell for bobm’s account. d. The username must be at least five characters long.
  7. You have created special configuration files that you want copied to each user’s home directories when creating new user accounts. You copy the files to /etc/skel. Which of the following commands will make this happen? Choose one: a. useradd -m username b. useradd -mk username c. useradd -k username d. useradd -Dk username
  8. Mary has recently gotten married and wants to change her username from mstone to mknight. Which of the following commands should you run to accomplish this? Choose one: a. usermod -l mknight mstone b. usermod -l mstone mknight c. usermod -u mknight mstone d. usermod -u mstone mknight
  9. After bob leaves the company you issue the command userdel bob. Although his entry in the /etc/passwd file has been deleted, his home directory is still there. What command could you have used to make sure that his home directory was also deleted? Choose one: a. userdel -m bob b. userdel -u bob c. userdel -l bob d. userdel -r bob
  10. All groups are defined in the /etc/group file. Each entry contains four fields in the following order. Choose one: a. groupname, password, GID, member list b. GID, groupname, password, member list c. groupname, GID, password, member list d. GID, member list, groupname, password
  11. You need to create a new group called sales with Bob, Mary and Joe as members. Which of the following would accomplish this? Choose one: a. Add the following line to the /etc/group file: sales:44:bob,mary,joe b. Issue the command groupadd sales. c. Issue the command groupadd -a sales bob,mary,joe d. Add the following line to the /etc/group file: sales::44:bob,mary,joe
  12. What command is used to remove the password assigned to a group?
  13. You changed the GID of the sales group by editing the /etc/group file. All of the members can change to the group without any problem except for Joe. He cannot even login to the system. What is the problem? Choose one: a. Joe forgot the password for the group. b. You need to add Joe to the group again. c. Joe had the original GID specified as his default group in the /etc/passwd file. d. You need to delete Joe’s account and recreate it.
  14. You need to delete the group dataproject. Which two of the following tasks should you do first before deleting the group? A. Check the /etc/passwd file to make sure no one has this group as his default group. B. Change the members of the dataproject group to another group besides users. C. Make sure that the members listed in the /etc/group file are given new login names. D. Verify that no file or directory has this group listed as its owner. Choose one: a. A and C b. A and D c. B and C d. B and D
  15. When you look at the /etc/group file you see the group kmem listed. Since it does not own any files and no one is using it as a default group, can you delete this group?
  16. When looking at the /etc/passwd file, you notice that all the password fields contain ‘x’. What does this mean? Choose one: a. That the password is encrypted. b. That you are using shadow passwords. c. That all passwords are blank. d. That all passwords have expired.
  17. In order to improve your system’s security you decide to implement shadow passwords. What command should you use?
  18. What file contains the default environment variables when using the bash shell? Choose one: a. ~/.profile b. /bash c. /etc/profile d. ~/bash
  19. You have created a subdirectory of your home directory containing your scripts. Since you use the bash shell, what file would you edit to put this directory on your path? Choose one: a. ~/.profile b. /etc/profile c. /etc/bash d. ~/.bash
  20. Which of the following interprets your actions when typing at the command line for the operating system? Choose One a. Utility b. Application c. Shell d. Command
  21. What can you type at a command line to determine which shell you are using?
  22. You want to enter a series of commands from the command-line. What would be the quickest way to do this? Choose One a. Press enter after entering each command and its arguments b. Put them in a script and execute the script c. Separate each command with a semi-colon (;) and press enter after the last command d. Separate each command with a / and press enter after the last command
  23. You are entering a long, complex command line and you reach the right side of your screen before you have finished typing. You want to finish typing the necessary commands but have the display wrap around to the left. Which of the following key combinations would achieve this? Choose One a. Esc, /, Enter b. /, Enter c. ctrl-d, enter d. esc, /, ctrl-d
  24. After typing in a new command and pressing enter, you receive an error message indicating incorrect syntax. This error message originated from.. Choose one a. The shell b. The operating system c. The command d. The kernel
  25. When typing at the command line, the default editor is the _____________ library.
  26. You typed the following at the command line ls -al /home/ hadden. What key strokes would you enter to remove the space between the ‘/’ and ‘hadden’ without having to retype the entire line? Choose one a. Ctrl-B, Del b. Esc-b, Del c. Esc-Del, Del d. Ctrl-b, Del
  27. You would like to temporarily change your command line editor to be vi. What command should you type to change it?
  28. After experimenting with vi as your command line editor, you decide that you want to have vi your default editor every time you log in. What would be the appropriate way to do this? Choose one a. Change the /etc/inputrc file b. Change the /etc/profile file c. Change the ~/.inputrc file d. Change the ~/.profile file
  29. You have to type your name and title frequently throughout the day and would like to decrease the number of key strokes you use to type this. Which one of your configuration files would you edit to bind this information to one of the function keys?
  30. In your present working directory, you have the files maryletter memo1 MyTelephoneandAddressBook What is the fewest number of keys you can type to open the file MyTelephoneandAddressBook with vi? Choose one a. 6 b. 28 c. 25 d. 4
  31. A variable that you can name and assign a value to is called a _____________ variable.
  32. You have installed a new application but when you type in the command to start it you get the error message Command not found. What do you need to do to fix this problem? Choose one a. Add the directory containing the application to your path b. Specify the directory’s name whenever you run the application c. Verify that the execute permission has been applied to the command. d. Give everyone read, write and execute permission to the application’s directory.
  33. You telnet into several of your servers simultaneously. During the day, you sometimes get confused as to which telnet session is connected to which server. Which of the following commands in your .profile file would make it obvious to which server you are attached? Choose one a. PS1=’\h: \w>’ b. PS1=’\s: \W>’ c. PS1=’\!: \t>’ d. PS1=’\a: \n>’
  34. Which of the following environment variables determines your working directory at the completion of a successful login? Choose one a. HOME b. BASH_ENV c. PWD d. BLENDERDIR
  35. Every time you attempt to delete a file using the rm utility, the operating system prompts you for confirmation. You know that this is not the customary behavior for the rm command. What is wrong? Choose one a. rm has been aliased as rm -i b. The version of rm installed on your system is incorrect. c. This is the normal behavior of the newest version of rm. d. There is an incorrect link on your system.
  36. You are running out of space in your home directory. While looking for files to delete or compress you find a large file called .bash_history and delete it. A few days later, it is back and as large as before. What do you need to do to ensure that its size is smaller? Choose one a. Set the HISTFILESIZE variable to a smaller number. b. Set the HISTSIZE to a smaller number. c. Set the NOHISTFILE variable to true. d. Set the HISTAPPEND variable to true.
  37. In order to display the last five commands you have entered using the history command, you would type ___________.
  38. In order to display the last five commands you have entered using the fc command, you would type ___________.
  39. You previously ran the find command to locate a particular file. You want to run that command again. What would be the quickest way to do this? Choose one a. fc -l find fc n b. history -l find history n c. Retype the command d. fc -n find
  40. Using command substitution, how would you display the value of the present working directory? Choose one a. echo $(pwd) b. echo pwd c. $pwd d. pwd | echo
  41. You need to search the entire directory structure to locate a specific file. How could you do this and still be able to run other commands while the find command is still searching for your file? Choose one a. find / -name filename & b. find / -name filename c. bg find / -name filename d. &find / -name filename &
  42. In order to create a file called DirContents containing the contents of the /etc directory you would type ____________.
  43. What would be displayed as the result of issuing the command ps ef? Choose one a. A listing of the user’s running processes formatted as a tree. b. A listing of the stopped processes c. A listing of all the running processes formatted as a tree. d. A listing of all system processes formatted as a tree.
  44. What utility can you use to show a dynamic listing of running processes? __________
  45. The top utility can be used to change the priority of a running process? Another utility that can also be used to change priority is ___________?
  46. What key combination can you press to suspend a running job and place it in the background?
  47. You issue the command jobs and receive the following output: [1]- Stopped (tty output) pine [2]+ Stopped (tty output) MyScript How would you bring the MyScript process to the foreground? Choose one: a. fg %2 b. ctrl-c c. fg MyScript d. ctrl-z
  48. You enter the command cat MyFile | sort > DirList & and the operating system displays [4] 3499 What does this mean? Choose one a. This is job number 4 and the PID of the sort command is 3499. b. This is job number 4 and the PID of the job is 3499. c. This is job number 3499 and the PID of the cat command is 4. d. This is job number 4 and the PID of the cat command is 3499.
  49. You attempt to log out but receive an error message that you cannot. When you issue the jobs command, you see a process that is running in the background. How can you fix this so that you can logout? Choose one a. Issue the kill command with the PID of each running command of the pipeline as an argument. b. Issue the kill command with the job number as an argument. c. Issue the kill command with the PID of the last command as an argument. d. Issue the kill command without any arguments.
  50. You have been given the job of administering a new server. It houses a database used by the sales people. This information is changed frequently and is not duplicated anywhere else. What should you do to ensure that this information is not lost? Choose one a. Create a backup strategy that includes backing up this information at least daily. b. Prepare a proposal to purchase a backup server c. Recommend that the server be made part of a cluster. d. Install an additional hard drive in the server.
  51. When planning your backup strategy you need to consider how often you will perform a backup, how much time the backup takes and what media you will use. What other factor must you consider when planning your backup strategy? _________
  52. Many factors are taken into account when planning a backup strategy. The one most important one is how often does the file ____________.
  53. Which one of the following factors does not play a role in choosing the type of backup media to use? Choose one: a. How frequently a file changes b. How long you need to retain the backup c. How much data needs to be backed up d. How frequently the backed up data needs to be accessed
  54. When you only back up one partition, this is called a ______ backup. Choose one a. Differential b. Full c. Partial d. Copy
  55. When you back up only the files that have changed since the last backup, this is called a ______ backup. Choose one a. Partial b. Differential c. Full d. Copy
  56. The easiest, most basic form of backing up a file is to _____ it to another location.
  57. When is the most important time to restore a file from your backup? Choose one a. On a regular scheduled basis to verify that the data is available. b. When the system crashes. c. When a user inadvertently loses a file. d. When your boss asks to see how restoring a file works.
  58. As a system administrator, you are instructed to backup all the users’ home directories. Which of the following commands would accomplish this? Choose one a. tar rf usersbkup home/* b. tar cf usersbkup home/* c. tar cbf usersbkup home/* d. tar rvf usersbkup home/*
  59. What is wrong with the following command? tar cvfb / /dev/tape 20 Choose one a. You cannot use the c option with the b option. b. The correct line should be tar -cvfb / /dev/tape20. c. The arguments are not in the same order as the corresponding modifiers. d. The files to be backed up have not been specified.
  60. You need to view the contents of the tarfile called MyBackup.tar. What command would you use? __________
  61. After creating a backup of the users’ home directories called backup.cpio you are asked to restore a file called memo.ben. What command should you type?
  62. You want to create a compressed backup of the users’ home directories so you issue the command gzip /home/* backup.gz but it fails. The reason that it failed is that gzip will only compress one _______ at a time.
  63. You want to create a compressed backup of the users’ home directories. What utility should you use?
  64. You routinely compress old log files. You now need to examine a log from two months ago. In order to view its contents without first having to decompress it, use the _________ utility.
  65. Which two utilities can you use to set up a job to run at a specified time? Choose one: a. at and crond b. atrun and crontab c. at and crontab d. atd and crond
  66. You have written a script called usrs to parse the passwd file and create a list of usernames. You want to have this run at tomorrow so you can see the results when you get to work. Which of the following commands will work? Choose one: a. at wed usrs b. at wed -b usrs c. at wed -l usrs d. at wed -d usrs
  67. Several of your users have been scheduling large at jobs to run during peak load times. How can you prevent anyone from scheduling an at job? Choose one: a. delete the file /etc/at.deny b. create an empty file called /etc/at.deny c. create two empty files: /etc/at.deny and /etc/at.allow file d. create an empty file called /etc/at.allow
  68. How can you determine who has scheduled at jobs? Choose one: a. at -l b. at -q c. at -d d. atwho
  69. When defining a cronjob, there are five fields used to specify when the job will run. What are these fields and what is the correct order? Choose one: a. minute, hour, day of week, day of month, month b. minute, hour, month, day of month, day of week c. minute, hour, day of month, month, day of week d. hour, minute, day of month, month, day of week
  70. You have entered the following cronjob. When will it run? 15 * * * 1,3,5 myscript Choose one: a. at 15 minutes after every hour on the 1st, 3rd and 5th of each month. b. at , 3:15 am, and every day c. at on the 1st, 3rd, and 5th of each month d. at 15 minutes after every hour every Monday, Wednesday, and Friday
  71. As the system administrator you need to review Bob’s cronjobs. What command would you use? Choose one: a. crontab -lu bob b. crontab -u bob c. crontab -l d. cronq -lu bob
  72. In order to schedule a cronjob, the first task is to create a text file containing the jobs to be run along with the time they are to run. Which of the following commands will run the script MyScript every day at ? Choose one: a. * 23 45 * * MyScript b. 23 45 * * * MyScript c. 45 23 * * * MyScript d. * * * 23 45 MyScript
  73. Which daemon must be running in order to have any scheduled jobs run as scheduled? Choose one: a. crond b. atd c. atrun d. crontab
  74. You want to ensure that your system is not overloaded with users running multiple scheduled jobs. A policy has been established that only the system administrators can create any scheduled jobs. It is your job to implement this policy. How are you going to do this? Choose one: a. create an empty file called /etc/cron.deny b. create a file called /etc/cron.allow which contains the names of those allowed to schedule jobs. c. create a file called /etc/cron.deny containing all regular usernames. d. create two empty files called /etc/cron.allow and /etc/cron.deny
  75. You notice that your server load is exceptionally high during the hours of to 2 . When investigating the cause, you suspect that it may be a cron job scheduled by one of your users. What command can you use to determine if your suspicions are correct? Choose one: a. crontab -u b. crond -u c. crontab -l d. crond -l
  76. One of your users, Bob, has created a script to reindex his database. Now he has it scheduled to run every day at . What command should you use to delete this job. Choose one: a. crontab -ru bob b. crontab -u bob c. crontab -du bob d. crontab -lu bob
  77. What daemon is responsible for tracking events on your system?
  78. What is the name and path of the default configuration file used by the syslogd daemon?
  79. You have made changes to the /etc/syslog.conf file. Which of the following commands will cause these changes to be implemented without having to reboot your computer? Choose one: a. kill SIGHINT `cat /var/run/syslogd.pid` b. kill SIGHUP `cat /var/run/syslogd.pid` c. kill SIGHUP syslogd d. kill SIGHINT syslogd
  80. Which of the following lines in your /etc/syslog.conf file will cause all critical messages to be logged to the file /var/log/critmessages? Choose one: a. *.=crit /var/log/critmessages b. *crit /var/log/critmessages c. *=crit /var/log/critmessages d. *.crit /var/log/critmessages
  81. You wish to have all mail messages except those of type info to the /var/log/mailmessages file. Which of the following lines in your /etc/syslogd.conf file would accomplish this? Choose one: a. mail.*;mail!=info /var/log/mailmessages b. mail.*;mail.=info /var/log/mailmessages c. mail.*;mail.info /var/log/mailmessages d. mail.*;mail.!=info /var/log/mailmessages
  82. What is the name and path of the main system log?
  83. Which log contains information on currently logged in users? Choose one: a. /var/log/utmp b. /var/log/wtmp c. /var/log/lastlog d. /var/log/messages
  84. You have been assigned the task of determining if there are any user accounts defined on your system that have not been used during the last three months. Which log file should you examine to determine this information? Choose one: a. /var/log/wtmp b. /var/log/lastlog c. /var/log/utmp d. /var/log/messages
  85. You have been told to configure a method of rotating log files on your system. Which of the following factors do you not need to consider? Choose one: a. date and time of messages b. log size c. frequency of rotation d. amount of available disk space
  86. What utility can you use to automate rotation of logs?
  87. You wish to rotate all your logs weekly except for the /var/log/wtmp log which you wish to rotate monthly. How could you accomplish this. Choose one: a. Assign a global option to rotate all logs weekly and a local option to rotate the /var/log/wtmp log monthly. b. Assign a local option to rotate all logs weekly and a global option to rotate the /var/log/wtmp log monthly. c. Move the /var/log/wtmp log to a different directory. Run logrotate against the new location. d. Configure logrotate to not rotate the /var/log/wtmp log. Rotate it manually every month.
  88. You have configured logrotate to rotate your logs weekly and keep them for eight weeks. You are running our of disk space. What should you do? Choose one: a. Quit using logrotate and manually save old logs to another location. b. Reconfigure logrotate to only save logs for four weeks. c. Configure logrotate to save old files to another location. d. Use the prerotate command to run a script to move the older logs to another location.
  89. What command can you use to review boot messages?
  90. What file defines the levels of messages written to system log files?
  91. What account is created when you install Linux?
  92. While logged on as a regular user, your boss calls up and wants you to create a new user account immediately. How can you do this without first having to close your work, log off and logon as root? Choose one: a. Issue the command rootlog. b. Issue the command su and type exit when finished. c. Issue the command su and type logoff when finished. d. Issue the command logon root and type exit when finished.
  93. Which file defines all users on your system? Choose one: a. /etc/passwd b. /etc/users c. /etc/password d. /etc/user.conf
  94. There are seven fields in the /etc/passwd file. Which of the following lists all the fields in the correct order? Choose one: a. username, UID, GID, home directory, command, comment b. username, UID, GID, comment, home directory, command c. UID, username, GID, home directory, comment, command d. username, UID, group name, GID, home directory, comment
  95. Which of the following user names is invalid? Choose one: a. Theresa Hadden b. thadden c. TheresaH d. T.H.
  96. In order to prevent a user from logging in, you can add a(n) ________at the beginning of the password field.
  97. The beginning user identifier is defined in the _________ file.
  98. Which field is used to define the user’s default shell?
  99. Bob Armstrong, who has a username of boba, calls to tell you he forgot his password. What command should you use to reset his command?
  100. Your company has implemented a policy that users’ passwords must be reset every ninety days. Since you have over 100 users you created a file with each username and the new password. How are you going to change the old passwords to the new ones? Choose one: a. Use the chpasswd command along with the name of the file containing the new passwords. b. Use the passwd command with the -f option and the name of the file containing the new passwords. c. Open the /etc/passwd file in a text editor and manually change each password. d. Use the passwd command with the -u option.