Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views7 pages

Core CS

An operating system manages computer hardware and software resources and provides common services for programs. It performs functions like process management, memory management, file system management, device management, and user interface management. A process represents a running program and threads allow concurrent execution within a process by sharing its resources. The kernel interacts directly with hardware while the shell provides a user interface. Virtual memory uses disk space to create an illusion of larger memory. A database management system facilitates data storage, retrieval, manipulation and security. It ensures data integrity and reduces redundancy. Normalization organizes data to eliminate issues like redundancy and dependency. Transactions maintain data consistency and integrity through ACID properties even during failures or crashes.

Uploaded by

Ritik Prajapati
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)
44 views7 pages

Core CS

An operating system manages computer hardware and software resources and provides common services for programs. It performs functions like process management, memory management, file system management, device management, and user interface management. A process represents a running program and threads allow concurrent execution within a process by sharing its resources. The kernel interacts directly with hardware while the shell provides a user interface. Virtual memory uses disk space to create an illusion of larger memory. A database management system facilitates data storage, retrieval, manipulation and security. It ensures data integrity and reduces redundancy. Normalization organizes data to eliminate issues like redundancy and dependency. Transactions maintain data consistency and integrity through ACID properties even during failures or crashes.

Uploaded by

Ritik Prajapati
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/ 7

Operating System

1. What is an Operating System?


Answer: An Operating System (OS) is a software that manages computer hardware and provides services for
computer programs. It acts as an intermediary between the hardware and software, enabling applications to
run and interact with the underlying hardware resources.

2. What are the main functions of an Operating System?


Answer: The main functions of an Operating System include process management, memory management,
file system management, device management, and user interface management.

3. Explain the difference between multitasking and multiprogramming.


Answer: Multitasking refers to the ability of an OS to execute multiple tasks concurrently, giving an illusion of
parallelism to the user. Multiprogramming, on the other hand, allows multiple programs to reside in memory
simultaneously and switches between them to improve CPU utilization.

4. What is a process in the context of an Operating System?


Answer: A process is a program in execution. It represents the current state of a running program, including
its code, data, and execution context.

5. Explain the concept of a thread.


Answer: A thread is the smallest unit of execution within a process. Threads share the same code and data
space of a process, allowing them to execute concurrently and share resources efficiently.

6. What is the difference between a kernel and a shell?


Answer: The kernel is the core part of the operating system that interacts directly with the hardware. The
shell is a user interface that allows users to interact with the kernel and run commands.

7. What is virtual memory, and why is it used?


Answer: Virtual memory is a memory management technique that allows the execution of processes that are
larger than the available physical memory. It uses a combination of RAM and disk space to create an illusion
of a larger memory space.

8. Explain the concept of deadlock.


Answer: Deadlock is a situation where two or more processes are unable to proceed because each is waiting
for the other to release a resource, resulting in a standstill.

9. What is the purpose of a file system in an Operating System?


Answer: A file system organizes and stores data on disk drives, making it accessible and manageable for
applications and users.

10. What are the different types of scheduling algorithms used in an OS?
Answer: Some common scheduling algorithms are First-Come-First-Serve (FCFS), Shortest Job Next (SJN),
Round Robin (RR), and Priority-based scheduling.

11. Explain the concept of paging in memory management.


Answer: Paging is a memory management technique that eliminates the need for contiguous allocation of
physical memory, allowing the OS to allocate memory in fixed-size blocks called pages.

12. What is the purpose of an I/O scheduler in an Operating System?


Answer: The I/O scheduler manages the order and priority of I/O requests to improve overall system
performance and reduce I/O wait times.
13. What is a device driver?
Answer: A device driver is a software component that allows the operating system to communicate with and
control hardware devices such as printers, graphics cards, and storage devices.

14. Explain the difference between a monolithic kernel and a microkernel.


Answer: A monolithic kernel incorporates all OS functionalities in a single large kernel, while a microkernel
keeps only the essential services in the kernel space and moves additional functionalities to user space.

15. What is a context switch?


Answer: A context switch is the process of saving the current state of a running process and restoring the
saved state of another process to allow multitasking.

16. What are system calls?


Answer: System calls are interfaces provided by the OS to allow applications to request services from the
kernel, such as file operations, process management, and device access.

17. Explain the difference between a mutex and a semaphore.


Answer: A mutex is a synchronization primitive that allows only one thread to access a shared resource at a
time, while a semaphore can allow multiple threads to access the resource simultaneously, based on its
value.

18. What is thrashing, and how can it be avoided?


Answer: Thrashing occurs when a system spends more time swapping data between RAM and disk than
executing tasks. It can be avoided by using proper memory management techniques like increasing the
amount of physical memory or optimizing the page replacement algorithm.

19. What is the purpose of virtualization in an OS?


Answer: Virtualization allows multiple virtual machines (VMs) to run on a single physical machine, enabling
better resource utilization, isolation, and flexibility.

20. What are the different file access methods used in an OS?
Answer: Common file access methods include sequential access, random access, and direct access.
Sequential access reads data in a linear order, random access allows direct access to any data location, and
direct access uses a file pointer to read data from any specified location.

Database Management System


1. What is a DBMS, and why is it essential in the field of data management?
Answer: A DBMS is software that facilitates the management of data by providing functionalities like data
storage, retrieval, manipulation, and security. It is vital because it ensures data integrity, reduces data
redundancy, and allows efficient data organization.

2. Explain the differences between a database and a database management system.


Answer: A database is a structured collection of data, while a database management system is software that
manages and controls access to the database.

3. What is normalization, and why is it crucial in database design?


Answer: Normalization is the process of organizing data in a database to eliminate redundancy and
dependency issues. It helps maintain data consistency and reduces the chances of data anomalies.

4. Describe the ACID properties in the context of database transactions.


Answer: ACID stands for Atomicity, Consistency, Isolation, and Durability. It ensures that database
transactions are reliable, robust, and maintain data integrity even in the presence of failures.
5. What are primary keys and foreign keys in a database?
Answer: A primary key is a unique identifier for each record in a table, while a foreign key is a field that refers
to the primary key of another table, establishing relationships between tables.

6. Explain the differences between a clustered and a non-clustered index.


Answer: A clustered index determines the physical order of data in a table, while a non-clustered index
creates a separate data structure to store index values.

7. What is a transaction in the context of a database, and what are its properties?
Answer: A transaction is a sequence of one or more operations that must be executed as a unit. Its
properties are Atomicity, Consistency, Isolation, and Durability (ACID).

8. What are the advantages and disadvantages of using a NoSQL database over a traditional relational
database?
Answer: NoSQL databases offer scalability, flexibility, and ease of handling unstructured data. However, they
may lack support for complex queries and transactions.

9. Explain the differences between OLTP (Online Transaction Processing) and OLAP (Online Analytical
Processing) databases.
Answer: OLTP databases are used for day-to-day transactional operations, while OLAP databases are
designed for complex analytical queries and reporting.

10. What is the role of the JOIN operation in database queries?


Answer: The JOIN operation combines rows from two or more tables based on a related column, allowing
the retrieval of data from multiple tables in a single query.

11. What are the different types of database relationships, and how are they represented?
Answer: The main types of relationships are one-to-one, one-to-many, and many-to-many. They are
represented through primary keys, foreign keys, and associative tables.

12. Explain the concept of data integrity constraints in a database.


Answer: Data integrity constraints define rules that the data in a database must follow to maintain accuracy
and consistency.

13. What is the purpose of a database transaction log?


Answer: The transaction log records all modifications made to a database, providing a recovery mechanism
in case of system failures.

14. Explain the differences between DELETE and TRUNCATE commands in SQL.
Answer: DELETE removes rows one by one from a table, while TRUNCATE removes all rows from a table in
one operation, resetting the table's identity.

15. What is the role of the COMMIT and ROLLBACK statements in database transactions?
Answer: COMMIT saves all changes made in a transaction to the database, while ROLLBACK undoes all the
changes made in a transaction.

16. What are the advantages and disadvantages of using indexes in a database?
Answer: Indexes improve query performance by allowing faster data retrieval but may incur additional
overhead during data modifications.

17. Explain the concept of data warehousing and its importance in decision-making.
Answer: Data warehousing involves the extraction, transformation, and loading of data from various sources
into a centralized repository. It provides a consolidated view of data for analytical purposes, aiding in
decision-making.
18. What is the purpose of the SQL SELECT statement?
Answer: The SQL SELECT statement is used to retrieve data from one or more tables in a database.

19. Explain the differences between the INNER JOIN and OUTER JOIN operations in SQL.
Answer: INNER JOIN returns only matching rows from both tables, while OUTER JOIN returns all rows from
one table and matching rows from the other table.

20. What are database triggers, and how do they work?


Answer: Database triggers are stored procedures that are automatically executed when certain events
(INSERT, UPDATE, DELETE) occur in a table.

Object Oriented Programming


21. What is Object-Oriented Programming (OOP)?
Answer: OOP is a programming paradigm that organizes code into objects, each representing a real-world
entity with attributes (data) and behaviors (methods).

22. Explain the four pillars of OOP.


Answer: The four pillars of OOP are:

o Encapsulation: Bundling data and methods that operate on the data within a single unit (object).
o Inheritance: Allowing one class (subclass) to inherit properties and behaviors from another class
(superclass).
o Polymorphism: The ability of objects of different classes to be treated as objects of a common
superclass.
o Abstraction: Representing the essential features of an object while hiding the unnecessary details.
23. What is a class in OOP?
Answer: A class is a blueprint or template for creating objects. It defines the properties and behaviors that
the objects will have.

24. What is an object in OOP?


Answer: An object is an instance of a class. It represents a specific entity with its unique state and behavior.

25. Explain the difference between a class and an object.


Answer: A class is a blueprint or template, whereas an object is an instance created based on that template
with specific values.

26. What is constructor overloading in OOP?


Answer: Constructor overloading is a concept where a class can have multiple constructors with different
parameters, allowing object creation with different initializations.

27. What is method overloading in OOP?


Answer: Method overloading is a concept where a class can have multiple methods with the same name but
different parameters, enabling different implementations for different input types.

28. What is inheritance in OOP, and how does it promote code reusability?
Answer: Inheritance allows a subclass to inherit properties and behaviors from a superclass. It promotes code
reusability by avoiding redundant code and enabling the creation of specialized classes based on existing
ones.

29. Explain the difference between method overriding and method overloading.
Answer: Method overriding occurs when a subclass provides a specific implementation for a method that is
already defined in its superclass. Method overloading occurs when a class has multiple methods with the
same name but different parameters.

30. What is the role of the "super" keyword in OOP?


Answer: The "super" keyword is used to refer to the superclass's members from a subclass, allowing access to
overridden methods or constructors.

31. What is encapsulation, and why is it important in OOP?


Answer: Encapsulation is the concept of bundling data and methods that operate on the data within a single
unit (object). It is important for data hiding and protection, promoting data integrity and security.

32. What is a static method in OOP, and how is it different from an instance method?
Answer: A static method belongs to the class rather than to any specific instance of the class. It can be called
using the class name, while an instance method is called using an object of the class.

33. Explain the concept of abstract classes in OOP.


Answer: An abstract class is a class that cannot be instantiated directly. It serves as a blueprint for other
classes and may contain abstract methods that must be implemented by its subclasses.

34. What is a final class in OOP, and why is it used?


Answer: A final class is a class that cannot be subclassed. It is used to prevent further inheritance and ensure
that the class remains unchanged.

35. What is the purpose of the "this" keyword in OOP?


Answer: The "this" keyword refers to the current instance of the class and is used to differentiate between
instance variables and parameters with the same names.

36. Explain the concept of interfaces in OOP.


Answer: An interface is a collection of abstract methods that provide a contract for the classes implementing
it. It enables multiple inheritance in Java.

37. What is polymorphism, and how is it achieved in OOP?


Answer: Polymorphism is the ability of objects of different classes to be treated as objects of a common
superclass. It is achieved through method overriding and method overloading.

38. What is a destructor in OOP, and when is it called?


Answer: A destructor is a special method that is automatically called when an object goes out of scope or is
explicitly deleted. In languages like Java, it is managed automatically by the garbage collector.

39. What is a composition in OOP, and how is it different from inheritance?


Answer: Composition is a design principle where a class contains objects of other classes as members. It
differs from inheritance as it promotes a "has-a" relationship instead of an "is-a" relationship.

40. Explain the concept of method visibility in OOP (public, private, protected).
Answer: Method visibility refers to the accessibility of methods within and outside the class. "Public"
methods can be accessed from anywhere, "private" methods can only be accessed within the class, and
"protected" methods can be accessed within the class and its subclasses.

Computer Networks
1. What is a computer network?
Answer: A computer network is a collection of interconnected devices (computers, printers, routers, etc.) that
communicate and share resources with each other.
2. Explain the OSI model and its seven layers.
Answer: The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the
functions of a telecommunication or computing system. The seven layers are: Physical, Data Link, Network,
Transport, Session, Presentation, and Application.

3. What is the difference between a LAN and a WAN?


Answer: A LAN (Local Area Network) is a network that connects devices within a limited geographical area,
such as a home or office. A WAN (Wide Area Network) covers a larger geographical area and connects
multiple LANs or devices over long distances, often across different cities or countries.

4. Explain the role of IP addresses in computer networks.


Answer: IP addresses uniquely identify devices on a network, enabling data to be routed between them. They
are essential for establishing communication and ensuring data delivery to the correct destination.

5. What is a subnet mask, and how is it used with IP addresses?


Answer: A subnet mask is used to divide an IP address into a network address and host address. It helps
determine which part of the IP address represents the network and which part represents the specific device.

6. What is DNS (Domain Name System)?


Answer: DNS is a system that translates human-readable domain names (e.g., www.example.com) into
numerical IP addresses used by computers to locate resources on the internet.

7. Explain the difference between TCP (Transmission Control Protocol) and UDP (User Datagram
Protocol).
Answer: TCP is a connection-oriented protocol that ensures reliable data transmission with error checking
and flow control. UDP is a connectionless protocol that provides fast and lightweight data transmission
without error recovery or retransmission.

8. What is a router, and what is its role in computer networks?


Answer: A router is a network device that connects multiple networks and forwards data packets between
them. It determines the best path for data to reach its destination.

9. What is a firewall, and how does it enhance network security?


Answer: A firewall is a security device or software that monitors and controls incoming and outgoing
network traffic based on predefined rules. It helps protect a network from unauthorized access and potential
threats.

10. Explain the concept of port numbers in computer networks.


Answer: Port numbers are used to identify specific services or processes running on a device within a
network. They enable proper data routing to the correct application or service.

11. What is NAT (Network Address Translation)?


Answer: NAT is a technique that allows multiple devices on a private network to share a single public IP
address when accessing the internet. It enhances security and conserves IP addresses.

12. What is the purpose of the MAC address in a network?


Answer: The MAC (Media Access Control) address is a unique identifier assigned to a network interface card
(NIC) of a device. It is used to ensure data delivery within a local network segment.

13. What is the difference between half-duplex and full-duplex communication?


Answer: In half-duplex communication, data can be transmitted in both directions, but not simultaneously. In
full-duplex communication, data can be transmitted simultaneously in both directions.
14. Explain the concept of packet switching.
Answer: Packet switching is a method of data transmission where data is broken down into small packets,
sent independently through the network, and reassembled at the destination. It enables efficient use of
network resources.

15. What is QoS (Quality of Service) in computer networks?


Answer: QoS refers to the ability to prioritize certain types of network traffic over others, ensuring that critical
services or applications receive preferential treatment to meet specific performance requirements.

16. What are the different types of network topologies?


Answer: The main network topologies include star, bus, ring, mesh, and tree. Each topology has its
advantages and disadvantages based on factors like scalability and fault tolerance.

17. Explain the purpose of ARP (Address Resolution Protocol) in computer networks.
Answer: ARP is used to map an IP address to the corresponding MAC address on a local network, facilitating
communication between devices.

18. What is a proxy server, and how does it work?


Answer: A proxy server acts as an intermediary between clients and servers, forwarding requests and
responses to provide anonymity, caching, and content filtering.

19. What is a VPN (Virtual Private Network)?


Answer: A VPN creates a secure and encrypted connection over a public network, enabling users to access
resources on a private network as if they were directly connected to it.

20. What is the role of ICMP (Internet Control Message Protocol) in computer networks?
Answer: ICMP is used to send error messages, test network connectivity, and provide feedback about
network issues, such as unreachable hosts or network congestion.

You might also like