ઓપરેટિંગ સિસ્ટમ: પ્રશ્નો અને જવાબોOperating Systems: questions and answers
GPSC, GSSSB, તલાટી અને ગુજરાત પોલીસ પરીક્ષા માટે 10 ફ્રી પ્રશ્નો, દરેકનો જવાબ અને ગુજરાતી + English સમજૂતી સાથે.10 free practice questions for GPSC, GSSSB, Talati and Gujarat Police exams, each with the answer and a Gujarati + English explanation.
1. એવી સ્થિતિ કે જ્યાં બે અથવા વધુ પ્રક્રિયાઓ એવી ઘટના માટે અનિશ્ચિત સમય માટે રાહ જોઈ રહી છે જે માત્ર એક પ્રતીક્ષા પ્રક્રિયાને કારણે થઈ શકે છે તેને કહેવામાં આવે છે:The condition where two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes is called:
- AMutual ExclusionMutual Exclusion
- BStarvationStarvation
- CDeadlockDeadlock
- DRace ConditionRace Condition
જવાબ જુઓShow answer
જવાબ:Answer: (C) DeadlockDeadlock
ડેડલોક એ એવી સ્થિતિ છે જેમાં પ્રક્રિયાઓના જૂથના દરેક સભ્ય જૂથમાં કોઈ અન્ય પ્રક્રિયાની રાહ જોતા હોય છે જેથી તે કોઈ સંસાધન છોડે.Deadlock is a state in which each member of a group of processes is waiting for some other process in the group to release a resource.
2. પ્રોસેસ કંટ્રોલ બ્લોક (PCB) માં નીચેનામાંથી કયું સમાવિષ્ટ નથી?A process Control Block (PCB) does NOT contain which of the following?
- AProcess StateProcess State
- BProgram CounterProgram Counter
- CCPU RegistersCPU Registers
- Dવૈશ્વિક ચલો બધી પ્રક્રિયાઓમાં વહેંચાયેલ છેGlobal variables shared across all processes
જવાબ જુઓShow answer
જવાબ:Answer: (D) વૈશ્વિક ચલો બધી પ્રક્રિયાઓમાં વહેંચાયેલ છેGlobal variables shared across all processes
પીસીબી (અથવા ટાસ્ક કંટ્રોલ બ્લોક) એક પ્રક્રિયા માટે વિશિષ્ટ માહિતી સંગ્રહિત કરે છે, જેમ કે તેની સ્થિતિ, પીસી, રજિસ્ટર, મેમરી મર્યાદા અને ખુલ્લી ફાઇલોની સૂચિ. તે વિશિષ્ટ પ્રક્રિયાઓમાં વહેંચાયેલ વૈશ્વિક ડેટાને સંગ્રહિત કરતું નથી.The PCB (or Task Control Block) stores information specific to a single process, such as its state, PC, registers, memory limits, and list of open files. It does not store global data shared across distinct processes.
3. સેમાફોરનો ઉપયોગ આ માટે થાય છે:A semaphore is used for:
- AMemory allocationMemory allocation
- BProcess synchronizationProcess synchronization
- CFile compressionFile compression
- DNetwork routingNetwork routing
જવાબ જુઓShow answer
જવાબ:Answer: (B) Process synchronizationProcess synchronization
સેમાફોર એ એક સિંક્રનાઇઝેશન પ્રિમિટિવ છે જેનો ઉપયોગ બહુવિધ પ્રક્રિયાઓ અથવા થ્રેડો દ્વારા વહેંચાયેલ સંસાધનોની ઍક્સેસને નિયંત્રિત કરવા માટે થાય છે. તે ડિજક્સ્ટ્રા દ્વારા રજૂ કરવામાં આવ્યું હતું.A semaphore is a synchronization primitive used to control access to shared resources by multiple processes or threads. It was introduced by Dijkstra.
4. યુનિક્સમાં, પાઇપ (`|`) નો ઉપયોગ આ માટે થાય છે:In Unix, a pipe (`|`) is used to:
- Aએક આદેશના પ્રમાણભૂત આઉટપુટને બીજાના પ્રમાણભૂત ઇનપુટ સાથે જોડોConnect the standard output of one command to the standard input of another
- Bઆઉટપુટને ફાઇલ પર રીડાયરેક્ટ કરોRedirect output to a file
- Cપૃષ્ઠભૂમિમાં આદેશો ચલાવોExecute commands in the background
- Dફાઇલમાં સ્ટ્રિંગ માટે શોધોSearch for a string in a file
જવાબ જુઓShow answer
જવાબ:Answer: (A) એક આદેશના પ્રમાણભૂત આઉટપુટને બીજાના પ્રમાણભૂત ઇનપુટ સાથે જોડોConnect the standard output of one command to the standard input of another
પાઇપ એ ઇન્ટર-પ્રોસેસ કમ્યુનિકેશન (IPC) નું એક સ્વરૂપ છે જે પ્રથમ આદેશના પ્રમાણભૂત આઉટપુટને બીજા આદેશના પ્રમાણભૂત ઇનપુટમાં નિર્દેશિત કરે છે.A pipe is a form of inter-process communication (IPC) that directs the standard output of the first command into the standard input of the second command.
5. ડિસ્ક શેડ્યુલિંગમાં, C-SCAN અલ્ગોરિધમ આના દ્વારા કાર્ય કરે છે:In disk scheduling, the C-SCAN algorithm works by:
- Aતેઓ આવે તે ક્રમમાં વિનંતીઓની સેવા કરવીServicing requests in the order they arrive
- Bએક દિશામાં વિનંતીઓની સેવા કરવી, અને પછી વળતરની સફરમાં વિનંતીઓની સેવા કર્યા વિના તરત જ શરૂઆતમાં પાછા ફરવુંServicing requests in one direction, and then immediately returning to the beginning without servicing requests on the return trip
- Cબંને દિશામાં આગળ અને પાછળ સેવાની વિનંતીઓ ખસેડવીMoving back and forth servicing requests in both directions
- Dપહેલા વર્તમાન હેડ પોઝિશનની સૌથી નજીકની વિનંતીની સેવા કરવીServicing the request closest to the current head position first
જવાબ જુઓShow answer
જવાબ:Answer: (B) એક દિશામાં વિનંતીઓની સેવા કરવી, અને પછી વળતરની સફરમાં વિનંતીઓની સેવા કર્યા વિના તરત જ શરૂઆતમાં પાછા ફરવુંServicing requests in one direction, and then immediately returning to the beginning without servicing requests on the return trip
C-SCAN (સર્કુલર સ્કેન) હેડને ડિસ્કના એક છેડેથી અન્ય સર્વિસિંગ વિનંતીઓ પર ખસેડે છે અને જ્યારે તે અંત સુધી પહોંચે છે, ત્યારે તે પરત ફરતી સફરમાં કોઈપણ વિનંતીને સેવા આપ્યા વિના તરત જ ડિસ્કની શરૂઆતમાં પરત ફરે છે.C-SCAN (Circular SCAN) moves the head from one end of the disk to the other servicing requests, and when it reaches the end, it immediately returns to the beginning of the disk without servicing any requests on the return trip.
6. બેંકર્સ અલ્ગોરિધમનો ઉપયોગ આ માટે થાય છે:The Banker's Algorithm is used for:
- ASchedulingScheduling
- BDeadlock avoidanceDeadlock avoidance
- CMemory managementMemory management
- DFile managementFile management
જવાબ જુઓShow answer
જવાબ:Answer: (B) Deadlock avoidanceDeadlock avoidance
બેંકર્સ અલ્ગોરિધમ (ડીજક્સ્ટ્રા દ્વારા)નો ઉપયોગ ડેડલોક ટાળવા માટે થાય છે. તે તપાસે છે કે શું સંસાધનની વિનંતિ આપવાથી સંસાધનોની ફાળવણી કરતા પહેલા સિસ્ટમ સુરક્ષિત સ્થિતિમાં રહેશે.The Banker's Algorithm (by Dijkstra) is used for deadlock avoidance. It checks if granting a resource request would leave the system in a safe state before allocating resources.
7. કઈ ડિસ્ક શેડ્યુલિંગ અલ્ગોરિધમ માથાને એક દિશામાં ખસેડે છે અને અંત સુધી સેવાઓની વિનંતી કરે છે, પછી ઉલટાવે છે?Which disk scheduling algorithm moves the head in one direction and services requests until the end, then reverses?
- AFCFSFCFS
- BSSTFSSTF
- CSCAN (Elevator)SCAN (Elevator)
- DLOOKLOOK
જવાબ જુઓShow answer
જવાબ:Answer: (C) SCAN (Elevator)SCAN (Elevator)
SCAN (એલિવેટર એલ્ગોરિધમ) ડિસ્ક હેડને એક દિશામાં ખસેડે છે, અંત સુધી પહોંચે ત્યાં સુધી બધી વિનંતીઓને સેવા આપે છે, પછી દિશા ઉલટાવે છે. દેખાવ સમાન છે પરંતુ છેલ્લી વિનંતી પર વિપરીત.SCAN (Elevator Algorithm) moves the disk head in one direction, servicing all requests until reaching the end, then reverses direction. LOOK is similar but reverses at the last request.
8. ઓપરેટિંગ સિસ્ટમનો મુખ્ય ભાગ જે સિસ્ટમ સંસાધનોનું સંચાલન કરે છે અને OS ના અન્ય ભાગો માટે મૂળભૂત સેવાઓ પ્રદાન કરે છે તેને કહેવામાં આવે છે:The core of an operating system that manages system resources and provides basic services for other parts of the OS is called the:
- AShellShell
- BKernelKernel
- CBootloaderBootloader
- DGUIGUI
જવાબ જુઓShow answer
જવાબ:Answer: (B) KernelKernel
કર્નલ એ ઓપરેટિંગ સિસ્ટમનું કેન્દ્રિય ઘટક છે. તે કમ્પ્યુટર અને હાર્ડવેરની કામગીરીનું સંચાલન કરે છે, ખાસ કરીને મેમરી અને CPU સમય.The Kernel is the central component of an operating system. It manages operations of computer and hardware, most notably memory and CPU time.
9. કયા શેડ્યુલિંગ અલ્ગોરિધમ ન્યૂનતમ સરેરાશ રાહ સમય આપે છે?Which scheduling algorithm gives the minimum average waiting time?
- AFCFSFCFS
- BSJF (Shortest Job First)SJF (Shortest Job First)
- CRound RobinRound Robin
- DPriority SchedulingPriority Scheduling
જવાબ જુઓShow answer
જવાબ:Answer: (B) SJF (Shortest Job First)SJF (Shortest Job First)
શોર્ટેસ્ટ જોબ ફર્સ્ટ (SJF) શેડ્યુલિંગ અલ્ગોરિધમ બિન-પ્રીમેપ્ટિવ એલ્ગોરિધમ્સમાં ન્યૂનતમ સરેરાશ રાહ સમય આપવા માટે સાબિત થયું છે. તે પ્રથમ ટૂંકા વિસ્ફોટ સમય સાથે પ્રક્રિયાઓ સુનિશ્ચિત કરે છે.Shortest Job First (SJF) scheduling algorithm is proven to give the minimum average waiting time among non-preemptive algorithms. It schedules processes with the shortest burst time first.
10. Linux/Unix માં, ફાઇલ પરવાનગીઓ બદલવા માટે કયો આદેશ વપરાય છે?In Linux/Unix, what command is used to change file permissions?
- Achownchown
- Bchmodchmod
- Cchgrpchgrp
- Dattribattrib
જવાબ જુઓShow answer
જવાબ:Answer: (B) chmodchmod
chmod (ચેન્જ મોડ) આદેશનો ઉપયોગ યુનિક્સ જેવી ઓપરેટિંગ સિસ્ટમમાં ફાઇલ સિસ્ટમ ઑબ્જેક્ટ્સ (ફાઇલો અને ડિરેક્ટરીઓ) ની ઍક્સેસ પરવાનગી બદલવા માટે થાય છે.The chmod (change mode) command is used to change the access permissions of file system objects (files and directories) in Unix-like operating systems.
ઓપરેટિંગ સિસ્ટમ ના વધુ 4 સેટ4 more sets of Operating Systems
પ્રેક્ટિસમાં દરેક પ્રશ્ન પછી તરત જવાબ મળે છે. ફુલ મોક ટેસ્ટમાં અસલી પરીક્ષા જેવો સમય હોય છે.Practice gives the answer right after each question. Full mock tests time you like the real exam.