2: Introduction to Operating Systems

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:12 PM on 2/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

54 Terms

1
New cards

What is an operating system?

A) A hardware component that manages the CPU
B) A body of software responsible for making it easy to run programs
C) A programming language for system development
D) A type of virtual machine hardware

B

2
New cards

What is another name for the operating system?
A) System Controller
B) Hardware Manager
C) Virtual Machine
D) Resource Allocator

C

3
New cards

Which of the following is NOT one of the three key roles of an operating system?
A) Virtualization
B) Compilation
C) Concurrency
D) Persistence

B

4
New cards

What does the OS do as a resource manager?
A) It creates new hardware resources
B) It manages the CPU, memory, and disk, deciding who gets what, when, and for how long
C) It prevents any program from using resources
D) It distributes resources equally to all programs

B

5
New cards

What does virtualization mean in the context of operating systems?
A) Creating virtual hardware
B) Running programs in the cloud
C) Making resources easier to use by transforming physical resources into virtual forms
D) Simulating operating systems

C

6
New cards

What does concurrency refer to in operating systems?
A) Running programs sequentially
B) Handling multiple things at once
C) Storing data permanently
D) Compiling programs simultaneously

B

7
New cards

What does persistence mean in operating systems?
A) Running programs continuously
B) Keeping the OS running without crashes
C) Storing data reliably so it survives power loss
D) Maintaining network connections

C

8
New cards

According to the Von Neumann model, what are the three steps in running a program?
A) Compile, Link, Execute
B) Load, Process, Store
C) Fetch, Decode, Execute
D) Read, Write, Delete

C

9
New cards

What is the first step in the Von Neumann model of program execution?
A) Execute an instruction
B) Decode an instruction
C) Store an instruction
D) Fetch an instruction from memory

D

10
New cards

What happens in the "Decode" step of the Von Neumann model?
A) The instruction is stored in memory
B) The instruction is executed
C) The system figures out what the instruction is
D) The instruction is deleted

C

11
New cards

What is the primary challenge the OS addresses when virtualizing the CPU?
A) Making the CPU faster
B) Running multiple programs on a single physical CPU simultaneously
C) Preventing CPU overheating
D) Upgrading CPU capabilities

B

12
New cards

What illusion does CPU virtualization create?
A) The CPU runs faster than it actually does
B) Users feel like they have many CPUs, each program believes it has the CPU to itself
C) Programs share the CPU equally
D) The CPU never stops running

B

13
New cards

What technique does the OS use to virtualize the CPU?
A) Multithreading
B) Time Sharing
C) Parallel Processing
D) Space Sharing

B

14
New cards

How does time sharing work?
A) Multiple CPUs run different programs
B) Programs take turns using resources in a scheduled manner
C) Run one process for a bit, then run another, switching back and forth
D) All programs run simultaneously on separate cores

C

15
New cards

In the cpu.c example, what happens when four instances run on one CPU?
A) Only one runs at a time
B) The system crashes
C) All four appear to run simultaneously due to time sharing
D) They run sequentially one after another

C

16
New cards

What is physical memory described as?
A) Virtual storage space
B) A hierarchical tree structure
C) A linear array of bytes
D) A circular buffer

C

17
New cards

What is an address space in memory virtualization?
A) The physical location of RAM
B) Each process's own private view of memory
C) The size of the hard drive
D) The cache memory size

B

18
New cards

How does memory virtualization achieve isolation?
A) By preventing all memory access
B) By giving each process unlimited memory
C) By ensuring processes cannot affect each other's memory
D) By storing all data on disk

C

19
New cards

What does the OS do to implement memory virtualization?
A) Increases physical RAM
B) Maps virtual addresses to physical addresses
C) Removes memory protection
D) Shares memory equally among all processes

B

20
New cards

In the mem.c example, what happens when two instances print address 0x200000?
A) They access the same physical location
B) One crashes due to conflict
C) They each have independent values at that virtual address
D) The OS prevents both from running

C

21
New cards

What does it mean that processes have "private address spaces"?
A) Their memory is encrypted
B) Address 0 for Process A is different from Address 0 for Process B
C) They can access any memory location
D) They share all memory locations

B

22
New cards

Why is concurrency important in operating systems?
A) To make programs run faster
B) The OS itself handles interrupts and multiple users; modern programs are multi-threaded
C) To reduce memory usage
D) To simplify programming

B

23
New cards

What are threads?
A) Separate programs running independently
B) Like multiple processes, but sharing the same address space
C) Hardware components
D) Network connections

B

24
New cards

What is the main problem with concurrency?
A) It uses too much memory
B) Working on many things at once leads to complex interactions
C) It makes programs slower
D) It requires multiple CPUs

B

25
New cards

What is a race condition?
A) When programs compete for CPU speed
B) When the outcome depends on the timing of thread execution, leading to unpredictable results
C) When threads run too fast
D) When programs race to finish first

B

26
New cards

How many instructions does counter++ actually consist of?
A) One instruction
B) Two instructions
C) Three instructions (Load, Add, Store)
D) Four instructions

C

27
New cards

What does "atomic" mean in the context of operations?
A) Very small operations
B) Operations that execute as a single, indivisible unit without interruption
C) Operations involving atoms
D) Operations that are very fast

B

28
New cards

What is the fix for race conditions in concurrent programs?
A) Use faster CPUs
B) Use locks and synchronization primitives to ensure atomic execution
C) Run only one thread at a time
D) Increase memory

B

29
New cards

Why is persistence necessary in operating systems?
A) To keep programs running forever
B) DRAM is volatile; if power goes out, data is lost
C) To improve CPU performance
D) To manage network connections

B

30
New cards

What hardware is used for persistent storage?
A) RAM and cache
B) CPU registers
C) Hard drives and SSDs
D) ROM only

C

31
New cards

What software component manages persistent storage?
A) Compilers
B) File systems
C) Web browsers
D) Device drivers only

B

32
New cards

Which of the following is a primary OS design goal?
A) Making hardware more expensive
B) Abstraction to make the system easy to use
C) Preventing all program execution
D) Eliminating all hardware

B

33
New cards

What does "abstraction" mean as an OS design goal?
A) Making everything more complex
B) Hide complex hardware details behind clean APIs like files and processes
C) Removing all interfaces
D) Exposing all hardware details to users

B

34
New cards

What does "performance" mean as an OS design goal?
A) Making programs run slower
B) Using more resources
C) Minimize overhead; the OS should not slow down applications
D) Maximizing power consumption

C

35
New cards

What does "protection" or "isolation" mean as an OS design goal?
A) Encrypting all data
B) A crash in one program should not crash the OS or other programs
C) Preventing all program execution
D) Sharing all resources equally

B

36
New cards

Why is protection important in operating systems?
A) To make programs run faster
B) To prevent malicious code from accessing other users' data
C) To increase memory usage
D) To reduce CPU load

B

37
New cards

What does "reliability" mean as an OS design goal?
A) The OS should restart frequently
B) The OS can crash occasionally
C) The OS must run non-stop; when it fails, everything fails
D) Only applications need to be reliable

C

38
New cards

Why is OS reliability so critical?
A) It makes programs faster
B) It saves memory
C) When the OS fails, everything fails
D) It reduces power consumption

C

39
New cards

Which of the following best describes the relationship between physical and virtual resources?
A) They are identical
B) Virtual resources are faster than physical resources
C) The OS transforms physical resources into more general, powerful, easy-to-use virtual forms
D) Physical resources don't exist in modern systems

C

40
New cards

What does the OS do to enable multiple programs to run "simultaneously" on one CPU?
A) It creates multiple physical CPUs
B) It uses time sharing to switch between programs rapidly
C) It slows down all programs equally
D) It requires programs to coordinate themselves

B

41
New cards

In memory virtualization, what prevents Process A from accessing Process B's memory?
A) Physical separation of RAM chips
B) The OS maps virtual addresses differently for each process
C) Programs voluntarily avoid each other's memory
D) Memory is read-only

B

42
New cards

What is the relationship between threads and processes?
A) Threads are larger than processes
B) Threads are like multiple processes but share the same address space
C) Threads and processes are identical
D) Threads cannot communicate with each other

B

43
New cards

What three steps make up the counter++ operation?
A) Initialize, increment, output
B) Read, write, verify
C) Load counter into register, add 1 to register, store register back to memory
D) Fetch, decode, execute

C

44
New cards

Why can timer interrupts cause race conditions?
A) They make programs run faster
B) They can switch threads in the middle of multi-step operations
C) They delete data
D) They prevent programs from running

B

45
New cards

What is DRAM's main limitation that necessitates persistence?
A) It's too expensive
B) It's too slow
C) It's volatile and loses data when power is lost
D) It's too small

C

46
New cards

Which of the following is NOT mentioned as part of the three themes (easy pieces)?
A) Virtualization
B) Networking
C) Concurrency
D) Persistence

B

47
New cards

What does "efficient use of resources" mean in OS design?
A) Using all resources all the time
B) Wasting as few resources as possible while maintaining good performance
C) Preventing resource usage
D) Buying more hardware

B

48
New cards

What API abstraction does the OS provide for persistent storage?
A) Sockets
B) Threads
C) Files
D) Registers

C

49
New cards

What API abstraction does the OS provide for the CPU?
A) Files
B) Processes
C) Networks
D) Disks

B

50
New cards

In virtualizing memory, what makes Address 0 for Process A different from Address 0 for Process B?
A) They're in different RAM chips
B) The OS's virtual-to-physical address mapping
C) Process B doesn't have an Address 0
D) They're actually the same address

B

51
New cards

What would happen without locks in the threads.c example?
A) The program would run faster
B) Race conditions would cause incorrect counter values
C) The program wouldn't compile
D) Threads couldn't be created

B

52
New cards

What does the term "overhead" mean in OS performance?
A) Extra ceiling space in a room
B) The extra time/resources the OS uses that don't directly benefit the application
C) The total amount of memory
D) The number of programs running

B

53
New cards

Why does the OS need to manage journals (as mentioned in the persistence section)?
A) To track user logins
B) To ensure reliability and consistency of file system operations
C) To speed up disk access
D) To compress files

B

54
New cards

What makes modern programs concurrent?
A) They use faster CPUs
B) They are multi-threaded, doing multiple things simultaneously
C) They run on multiple computers
D) They share memory with other programs

B